Merge branch 'master-redesign' of https://github.com/sharelatex/web-sharelatex into master-redesign

This commit is contained in:
Henry Oswald 2014-07-22 14:56:41 +01:00
commit 234bc5e0e9
10 changed files with 121 additions and 2 deletions

View file

@ -64,6 +64,8 @@ block content
.ui-layout-east
include ./editor/chat
include ./editor/hotkeys
script(type="text/ng-template", id="genericMessageModalTemplate")
.modal-header

View file

@ -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

View file

@ -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",

View file

@ -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

View file

@ -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()"

View file

@ -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"

View file

@ -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()

View file

@ -0,0 +1,3 @@
define [
"ide/hotkeys/controllers/HotkeysController"
], () ->

View file

@ -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;

View file

@ -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;
}
}