mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
25 lines
700 B
CoffeeScript
25 lines
700 B
CoffeeScript
define [
|
|
"base"
|
|
"ace/ace"
|
|
], (App) ->
|
|
App.controller "HotkeysController", ($scope, $modal, event_tracking) ->
|
|
$scope.openHotkeysModal = ->
|
|
event_tracking.sendMB "ide-open-hotkeys-modal"
|
|
|
|
$modal.open {
|
|
templateUrl: "hotkeysModalTemplate"
|
|
controller: "HotkeysModalController"
|
|
size: "lg"
|
|
resolve:
|
|
trackChangesVisible: () -> $scope.project.features.trackChangesVisible
|
|
}
|
|
|
|
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()
|