2014-07-22 09:38:32 -04:00
|
|
|
define [
|
|
|
|
"base"
|
|
|
|
"ace/ace"
|
|
|
|
], (App) ->
|
2016-07-05 10:16:55 -04:00
|
|
|
App.controller "HotkeysController", ($scope, $modal, event_tracking) ->
|
2014-07-22 09:38:32 -04:00
|
|
|
$scope.openHotkeysModal = ->
|
2016-08-10 12:29:43 -04:00
|
|
|
event_tracking.sendMB "ide-open-hotkeys-modal"
|
2016-07-05 10:16:55 -04:00
|
|
|
|
2014-07-22 09:38:32 -04:00
|
|
|
$modal.open {
|
|
|
|
templateUrl: "hotkeysModalTemplate"
|
|
|
|
controller: "HotkeysModalController"
|
2017-05-19 10:51:32 -04:00
|
|
|
size: "lg"
|
2017-08-03 10:16:54 -04:00
|
|
|
resolve:
|
|
|
|
trackChangesVisible: () -> $scope.project.features.trackChangesVisible
|
2014-07-22 09:38:32 -04:00
|
|
|
}
|
|
|
|
|
2017-08-03 10:16:54 -04:00
|
|
|
App.controller "HotkeysModalController", ($scope, $modalInstance, trackChangesVisible)->
|
|
|
|
$scope.trackChangesVisible = trackChangesVisible
|
2014-07-22 09:38:32 -04:00
|
|
|
if ace.require("ace/lib/useragent").isMac
|
|
|
|
$scope.ctrl = "Cmd"
|
|
|
|
else
|
|
|
|
$scope.ctrl = "Ctrl"
|
|
|
|
|
|
|
|
$scope.cancel = () ->
|
2017-08-03 10:16:54 -04:00
|
|
|
$modalInstance.dismiss()
|