diff --git a/services/web/app/views/project/editor.jade b/services/web/app/views/project/editor.jade index b2d6f773a0..977470c71a 100644 --- a/services/web/app/views/project/editor.jade +++ b/services/web/app/views/project/editor.jade @@ -64,6 +64,8 @@ block content .ui-layout-east include ./editor/chat + + include ./editor/hotkeys script(type="text/ng-template", id="genericMessageModalTemplate") .modal-header diff --git a/services/web/app/views/project/editor/hotkeys.jade b/services/web/app/views/project/editor/hotkeys.jade new file mode 100644 index 0000000000..e1f76039ef --- /dev/null +++ b/services/web/app/views/project/editor/hotkeys.jade @@ -0,0 +1,66 @@ +script(type="text/ng-template", id="hotkeysModalTemplate") + .modal-header + button.close( + type="button" + data-dismiss="modal" + ng-click="cancel()" + ) × + h3 Hotkeys + .modal-body.modal-hotkeys + h3 Common + .row + .col-xs-6 + .hotkey + span.combination {{ctrl}} + F + span.description Find (and replace) + .hotkey + span.combination {{ctrl}} + Enter + span.description Compile + .col-xs-6 + .hotkey + span.combination {{ctrl}} + Z + span.description Undo + .hotkey + span.combination {{ctrl}} + Y + span.description Redo + + h3 Navigation + .row + .col-xs-6 + .hotkey + span.combination {{ctrl}} + Home + span.description Beginning of document + .hotkey + span.combination {{ctrl}} + End + span.description End of document + .col-xs-6 + .hotkey + span.combination {{ctrl}} + L + span.description Go To Line + + h3 Editing + .row + .col-xs-6 + .hotkey + span.combination {{ctrl}} + / + span.description Toggle Comment + .hotkey + span.combination {{ctrl}} + D + span.description Delete Current Line + .hotkey + span.combination {{ctrl}} + A + span.description Select All + .col-xs-6 + .hotkey + span.combination Tab + span.description Indent Selection + .hotkey + span.combination {{ctrl}} + U + span.description To Uppercase + .hotkey + span.combination Ctrl + Shift + U + span.description To Lowercase + .modal-footer + button.btn.btn-default( + ng-click="cancel()" + ) OK \ No newline at end of file diff --git a/services/web/app/views/project/editor/left-menu.jade b/services/web/app/views/project/editor/left-menu.jade index 0ffd3bfdea..4dde278bf3 100644 --- a/services/web/app/views/project/editor/left-menu.jade +++ b/services/web/app/views/project/editor/left-menu.jade @@ -135,6 +135,12 @@ aside#left-menu.full-size( option(value="pdfjs") Built-In option(value="native") Native + h4 Hotkeys + ul.list-unstyled.nav + li(ng-controller="HotkeysController") + a(ng-click="openHotkeysModal()") + i.fa.fa-keyboard-o.fa-fw + |    Show Hotkeys #left-menu-mask( ng-show="ui.leftMenuShown", diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 41c5d0a60d..fd7e1dc8f1 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -15,7 +15,7 @@ div.full-size.pdf(ng-controller="PdfController") href ng-click="toggleLogs()" ng-class="{ 'active': (pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled }" - tooltip="Logs" + tooltip="Logs and output files" tooltip-placement="bottom" ) i.fa.fa-file-text-o diff --git a/services/web/app/views/project/editor/share.jade b/services/web/app/views/project/editor/share.jade index 2262484c60..fb47236cc8 100644 --- a/services/web/app/views/project/editor/share.jade +++ b/services/web/app/views/project/editor/share.jade @@ -115,7 +115,7 @@ script(type="text/ng-template", id="makePrivateModalTemplate") ) × h3 Make project private? .modal-body.modal-body-share - p If you make your project public then only the people you choose to share it with will have access. + p If you make your project private then only the people you choose to share it with will have access. .modal-footer button.btn.btn-default( ng-click="cancel()" diff --git a/services/web/public/coffee/ide.coffee b/services/web/public/coffee/ide.coffee index 1cd92c2dd0..795037cbbf 100644 --- a/services/web/public/coffee/ide.coffee +++ b/services/web/public/coffee/ide.coffee @@ -14,6 +14,7 @@ define [ "ide/clone/index" "ide/templates/index" "ide/dropbox/index" + "ide/hotkeys/index" "ide/directives/layout" "ide/services/ide" "directives/focus" diff --git a/services/web/public/coffee/ide/hotkeys/controllers/HotkeysController.coffee b/services/web/public/coffee/ide/hotkeys/controllers/HotkeysController.coffee new file mode 100644 index 0000000000..4d0adef4fa --- /dev/null +++ b/services/web/public/coffee/ide/hotkeys/controllers/HotkeysController.coffee @@ -0,0 +1,19 @@ +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() \ No newline at end of file diff --git a/services/web/public/coffee/ide/hotkeys/index.coffee b/services/web/public/coffee/ide/hotkeys/index.coffee new file mode 100644 index 0000000000..acc7577c6d --- /dev/null +++ b/services/web/public/coffee/ide/hotkeys/index.coffee @@ -0,0 +1,3 @@ +define [ + "ide/hotkeys/controllers/HotkeysController" +], () -> \ No newline at end of file diff --git a/services/web/public/stylesheets/app/editor.less b/services/web/public/stylesheets/app/editor.less index 72fb4df63f..b02f8ab46b 100644 --- a/services/web/public/stylesheets/app/editor.less +++ b/services/web/public/stylesheets/app/editor.less @@ -9,6 +9,7 @@ @import "./editor/search.less"; @import "./editor/publish-template.less"; @import "./editor/online-users.less"; +@import "./editor/hotkeys.less"; .full-size { position: absolute; diff --git a/services/web/public/stylesheets/app/editor/hotkeys.less b/services/web/public/stylesheets/app/editor/hotkeys.less new file mode 100644 index 0000000000..17533c412b --- /dev/null +++ b/services/web/public/stylesheets/app/editor/hotkeys.less @@ -0,0 +1,21 @@ +.modal-hotkeys { + font-size: 14px; + + h3:first-child { + margin-top: 0; + } + + .hotkey { + margin-bottom: @line-height-computed / 4; + } + + .combination { + padding: 4px 8px; + border-radius: 3px; + background-color: @gray-dark; + color: white; + font-family: @font-family-sans-serif; + font-weight: 600; + margin-right: @line-height-computed / 4; + } +} \ No newline at end of file