editor.jade 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. div.full-size(
  2. ng-show="ui.view == 'editor'"
  3. layout="pdf"
  4. layout-disabled="ui.pdfLayout != 'sideBySide'"
  5. mask-iframes-on-resize="true"
  6. resize-on="layout:main:resize"
  7. resize-proportionally="true"
  8. initial-size-east="'50%'"
  9. minimum-restore-size-east="300"
  10. )
  11. .ui-layout-center
  12. .loading-panel(ng-show="!editor.sharejs_doc || editor.opening")
  13. span(ng-show="editor.open_doc_id")
  14. i.fa.fa-spin.fa-refresh
  15. |   #{translate("loading")}...
  16. span(ng-show="!editor.open_doc_id")
  17. i.fa.fa-arrow-left
  18. |   #{translate("open_a_file_on_the_left")}
  19. #editor(
  20. ace-editor="editor",
  21. ng-show="!!editor.sharejs_doc && !editor.opening"
  22. theme="settings.theme",
  23. keybindings="settings.mode",
  24. font-size="settings.fontSize",
  25. auto-complete="settings.autoComplete",
  26. spell-check="true",
  27. spell-check-language="project.spellCheckLanguage",
  28. highlights="onlineUserCursorHighlights[editor.open_doc_id]"
  29. show-print-margin="false",
  30. sharejs-doc="editor.sharejs_doc",
  31. last-updated="editor.last_updated",
  32. cursor-position="editor.cursorPosition",
  33. goto-line="editor.gotoLine",
  34. resize-on="layout:main:resize,layout:pdf:resize",
  35. annotations="pdf.logEntryAnnotations[editor.open_doc_id]",
  36. read-only="!permissions.write",
  37. on-ctrl-enter="recompileViaKey"
  38. syntax-validation="settings.syntaxValidation"
  39. )
  40. .ui-layout-east
  41. div(ng-if="ui.pdfLayout == 'sideBySide'")
  42. include ./pdf
  43. .ui-layout-resizer-controls.synctex-controls(
  44. ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs'"
  45. ng-controller="PdfSynctexController"
  46. )
  47. a.btn.btn-default.btn-xs(
  48. tooltip="#{translate('go_to_code_location_in_pdf')}"
  49. tooltip-placement="right"
  50. tooltip-append-to-body="true"
  51. ng-click="syncToPdf()"
  52. )
  53. i.fa.fa-long-arrow-right
  54. br
  55. a.btn.btn-default.btn-xs(
  56. tooltip-html="'#{translate('go_to_pdf_location_in_code')}'"
  57. tooltip-placement="right"
  58. tooltip-append-to-body="true"
  59. ng-click="syncToCode()"
  60. )
  61. i.fa.fa-long-arrow-left
  62. div.full-size(
  63. ng-if="ui.pdfLayout == 'flat'"
  64. ng-show="ui.view == 'pdf'"
  65. )
  66. include ./pdf