overleaf/services/web/public/coffee/ide/hotkeys/controllers/HotkeysController.coffee

19 lines
456 B
CoffeeScript
Raw Normal View History

2014-07-22 09:38:32 -04:00
define [
"base"
"ace/ace"
], (App) ->
App.controller "HotkeysController", ($scope, $modal) ->
$scope.openHotkeysModal = ->
$modal.open {
templateUrl: "hotkeysModalTemplate"
controller: "HotkeysModalController"
}
App.controller "HotkeysModalController", ($scope, $modalInstance)->
if ace.require("ace/lib/useragent").isMac
$scope.ctrl = "Cmd"
else
$scope.ctrl = "Ctrl"
$scope.cancel = () ->
$modalInstance.dismiss()