If track-changes is not enabled, don't show hotkeys for it.

This commit is contained in:
Shane Kilkelly 2017-08-03 15:16:54 +01:00
parent 47c8ca82fa
commit 670d4438dc
2 changed files with 8 additions and 5 deletions

View file

@ -90,8 +90,8 @@ script(type="text/ng-template", id="hotkeysModalTemplate")
span.combination Ctrl + Space
span.description Search References
h3 #{translate("review")}
.row
h3(ng-if="trackChangesVisible") #{translate("review")}
.row(ng-if="trackChangesVisible")
.col-xs-4
.hotkey
span.combination {{ctrl}} + J
@ -108,4 +108,4 @@ script(type="text/ng-template", id="hotkeysModalTemplate")
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
) #{translate("ok")}
) #{translate("ok")}

View file

@ -10,13 +10,16 @@ define [
templateUrl: "hotkeysModalTemplate"
controller: "HotkeysModalController"
size: "lg"
resolve:
trackChangesVisible: () -> $scope.project.features.trackChangesVisible
}
App.controller "HotkeysModalController", ($scope, $modalInstance)->
App.controller "HotkeysModalController", ($scope, $modalInstance, trackChangesVisible)->
$scope.trackChangesVisible = trackChangesVisible
if ace.require("ace/lib/useragent").isMac
$scope.ctrl = "Cmd"
else
$scope.ctrl = "Ctrl"
$scope.cancel = () ->
$modalInstance.dismiss()
$modalInstance.dismiss()