overleaf/services/web/public/coffee/ide/hotkeys/controllers/HotkeysController.coffee
2017-05-19 15:51:32 +01:00

22 lines
No EOL
538 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"
}
App.controller "HotkeysModalController", ($scope, $modalInstance)->
if ace.require("ace/lib/useragent").isMac
$scope.ctrl = "Cmd"
else
$scope.ctrl = "Ctrl"
$scope.cancel = () ->
$modalInstance.dismiss()