mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 04:35:26 -05:00
Move all editor manager binding logic into the managers
This commit is contained in:
parent
f5e5e55457
commit
f86c9cf853
6 changed files with 40 additions and 7 deletions
|
@ -8,7 +8,7 @@ block vars
|
||||||
block scripts
|
block scripts
|
||||||
//- Only use the native bootstrap on the editor page,
|
//- Only use the native bootstrap on the editor page,
|
||||||
//- since we use the Angular-based bootstrap elsewhere.
|
//- since we use the Angular-based bootstrap elsewhere.
|
||||||
script(src=jsPath+'libs/bootstrap-3.1.1.js')
|
//- script(src=jsPath+'libs/bootstrap-3.1.1.js')
|
||||||
script(src=jsPath+'libs/jquery-layout.js')
|
script(src=jsPath+'libs/jquery-layout.js')
|
||||||
script(src=jsPath+'libs/jquery.storage.js')
|
script(src=jsPath+'libs/jquery.storage.js')
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,20 @@ aside#left-menu.full-size(
|
||||||
ng-class="{ 'shown': ui.leftMenuShown }"
|
ng-class="{ 'shown': ui.leftMenuShown }"
|
||||||
ng-cloak
|
ng-cloak
|
||||||
)
|
)
|
||||||
|
h4 Download
|
||||||
|
|
||||||
|
ul.unformatted-list.nav.nav-downloads
|
||||||
|
li
|
||||||
|
a(ng-href="/project/{{project_id}}/download/zip")
|
||||||
|
i.fa.fa-file-archive-o.fa-2x
|
||||||
|
br
|
||||||
|
| Source
|
||||||
|
li
|
||||||
|
a(ng-href="/project/{{project_id}}/output/output.pdf")
|
||||||
|
i.fa.fa-file-pdf-o.fa-2x
|
||||||
|
br
|
||||||
|
| PDF
|
||||||
|
|
||||||
h4 Settings
|
h4 Settings
|
||||||
form.settings(ng-controller="SettingsController")
|
form.settings(ng-controller="SettingsController")
|
||||||
.containter-fluid
|
.containter-fluid
|
||||||
|
|
|
@ -10,7 +10,7 @@ define [
|
||||||
"ace/keyboard/emacs"
|
"ace/keyboard/emacs"
|
||||||
"ace/mode/latex"
|
"ace/mode/latex"
|
||||||
"ace/edit_session"
|
"ace/edit_session"
|
||||||
], (App, Ace, UndoManager, AutoCompleteManager, SpellCheckManager, AnnotationsManager, CursorPositionManager) ->
|
], (App, Ace, UndoManager, AutoCompleteManager, SpellCheckManager, HighlightsManager, CursorPositionManager) ->
|
||||||
LatexMode = require("ace/mode/latex").Mode
|
LatexMode = require("ace/mode/latex").Mode
|
||||||
EditSession = require('ace/edit_session').EditSession
|
EditSession = require('ace/edit_session').EditSession
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ define [
|
||||||
autoCompleteManager = new AutoCompleteManager(scope, editor, element)
|
autoCompleteManager = new AutoCompleteManager(scope, editor, element)
|
||||||
spellCheckManager = new SpellCheckManager(scope, editor, element)
|
spellCheckManager = new SpellCheckManager(scope, editor, element)
|
||||||
undoManager = new UndoManager(scope, editor, element)
|
undoManager = new UndoManager(scope, editor, element)
|
||||||
annotationsManager = new AnnotationsManager(scope, editor, element)
|
highlightsManager = new HighlightsManager(scope, editor, element)
|
||||||
cursorPositionManager = new CursorPositionManager(scope, editor, element)
|
cursorPositionManager = new CursorPositionManager(scope, editor, element)
|
||||||
|
|
||||||
# Prevert Ctrl|Cmd-S from triggering save dialog
|
# Prevert Ctrl|Cmd-S from triggering save dialog
|
||||||
|
@ -119,9 +119,6 @@ define [
|
||||||
resetSession()
|
resetSession()
|
||||||
session = editor.getSession()
|
session = editor.getSession()
|
||||||
|
|
||||||
autoCompleteManager.bindToSession(session)
|
|
||||||
annotationsManager.redrawAnnotations()
|
|
||||||
|
|
||||||
doc = session.getDocument()
|
doc = session.getDocument()
|
||||||
doc.on "change", () ->
|
doc.on "change", () ->
|
||||||
scope.$apply () ->
|
scope.$apply () ->
|
||||||
|
|
|
@ -29,6 +29,9 @@ define [
|
||||||
e.position = position
|
e.position = position
|
||||||
@showAnnotationLabels(position)
|
@showAnnotationLabels(position)
|
||||||
|
|
||||||
|
@editor.on "changeSession", () =>
|
||||||
|
@redrawAnnotations()
|
||||||
|
|
||||||
redrawAnnotations: () ->
|
redrawAnnotations: () ->
|
||||||
@_clearMarkers()
|
@_clearMarkers()
|
||||||
@_clearLabels()
|
@_clearLabels()
|
||||||
|
|
|
@ -31,6 +31,24 @@
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.nav-downloads {
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
width: 100px;
|
||||||
|
a {
|
||||||
|
color: @gray-dark;
|
||||||
|
&:hover, &:active {
|
||||||
|
background-color: @link-color;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
margin-bottom: (@line-height-computed / 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
form.settings {
|
form.settings {
|
||||||
label {
|
label {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-right: 1px solid @toolbar-border-color;
|
border-right: 1px solid @toolbar-border-color;
|
||||||
color: @link-color;
|
color: @link-color;
|
||||||
padding: 6px 12px 8px;
|
padding: 3px 10px 5px;
|
||||||
|
font-size: 20px;
|
||||||
&:hover {
|
&:hover {
|
||||||
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
|
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
|
||||||
background-color: darken(white, 10%);
|
background-color: darken(white, 10%);
|
||||||
|
|
Loading…
Reference in a new issue