mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #571 from sharelatex/sk-fully-hide-trackchanges
Sk fully hide trackchanges when not enabled
This commit is contained in:
commit
cce2f93ab3
4 changed files with 14 additions and 5 deletions
|
@ -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")}
|
||||
|
|
|
@ -90,6 +90,8 @@ define [
|
|||
$scope.chat = {}
|
||||
|
||||
ide.toggleReviewPanel = $scope.toggleReviewPanel = () ->
|
||||
if !$scope.project.features.trackChangesVisible
|
||||
return
|
||||
$scope.ui.reviewPanelOpen = !$scope.ui.reviewPanelOpen
|
||||
event_tracking.sendMB "rp-toggle-panel", { value : $scope.ui.reviewPanelOpen }
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -416,6 +416,8 @@ define [
|
|||
$scope.toggleReviewPanel()
|
||||
|
||||
$scope.addNewCommentFromKbdShortcut = () ->
|
||||
if !$scope.project.features.trackChangesVisible
|
||||
return
|
||||
$scope.$broadcast "comment:select_line"
|
||||
if !$scope.ui.reviewPanelOpen
|
||||
$scope.toggleReviewPanel()
|
||||
|
@ -575,6 +577,8 @@ define [
|
|||
$scope.openTrackChangesUpgradeModal()
|
||||
|
||||
$scope.toggleTrackChangesFromKbdShortcut = () ->
|
||||
if !$scope.project.features.trackChangesVisible
|
||||
return
|
||||
if $scope.editor.wantTrackChanges
|
||||
$scope.toggleTrackChanges false
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue