mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Clean up comments and callbacks
This commit is contained in:
parent
42ac8faaae
commit
b847638ed1
1 changed files with 2 additions and 5 deletions
|
@ -109,23 +109,20 @@ define [
|
||||||
metadataManager = new MetadataManager(scope, editor, element, metadata)
|
metadataManager = new MetadataManager(scope, editor, element, metadata)
|
||||||
autoCompleteManager = new AutoCompleteManager(scope, editor, element, metadataManager, graphics, preamble, files)
|
autoCompleteManager = new AutoCompleteManager(scope, editor, element, metadataManager, graphics, preamble, files)
|
||||||
|
|
||||||
# Prevert Ctrl|Cmd-S from triggering save dialog
|
|
||||||
scope.$watch "onSave", (callback) ->
|
scope.$watch "onSave", (callback) ->
|
||||||
if callback?
|
if callback?
|
||||||
Vim.defineEx 'write', 'w', callback
|
Vim.defineEx 'write', 'w', callback
|
||||||
editor.commands.addCommand
|
editor.commands.addCommand
|
||||||
name: "save",
|
name: "save",
|
||||||
bindKey: win: "Ctrl-S", mac: "Command-S"
|
bindKey: win: "Ctrl-S", mac: "Command-S"
|
||||||
exec: () ->
|
exec: callback
|
||||||
callback()
|
|
||||||
readOnly: true
|
readOnly: true
|
||||||
# Not technically 'save', but Ctrl-. recompiles in OL v1
|
# Not technically 'save', but Ctrl-. recompiles in OL v1
|
||||||
# so maintain compatibility
|
# so maintain compatibility
|
||||||
editor.commands.addCommand
|
editor.commands.addCommand
|
||||||
name: "recompile_v1",
|
name: "recompile_v1",
|
||||||
bindKey: win: "Ctrl-.", mac: "Ctrl-."
|
bindKey: win: "Ctrl-.", mac: "Ctrl-."
|
||||||
exec: () ->
|
exec: callback
|
||||||
callback()
|
|
||||||
readOnly: true
|
readOnly: true
|
||||||
editor.commands.removeCommand "transposeletters"
|
editor.commands.removeCommand "transposeletters"
|
||||||
editor.commands.removeCommand "showSettingsMenu"
|
editor.commands.removeCommand "showSettingsMenu"
|
||||||
|
|
Loading…
Reference in a new issue