editor.jade 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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="recompile"
  38. )
  39. .ui-layout-east
  40. div(ng-if="ui.pdfLayout == 'sideBySide'")
  41. include ./pdf
  42. .ui-layout-resizer-controls.synctex-controls(
  43. ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs'"
  44. ng-controller="PdfSynctexController"
  45. )
  46. a.btn.btn-default.btn-xs(
  47. tooltip="#{translate('go_to_code_location_in_pdf')}"
  48. tooltip-placement="right"
  49. tooltip-append-to-body="true"
  50. ng-click="syncToPdf()"
  51. )
  52. i.fa.fa-long-arrow-right
  53. br
  54. a.btn.btn-default.btn-xs(
  55. tooltip-html="'#{translate('go_to_pdf_location_in_code')}'"
  56. tooltip-placement="right"
  57. tooltip-append-to-body="true"
  58. ng-click="syncToCode()"
  59. )
  60. i.fa.fa-long-arrow-left
  61. div.full-size(
  62. ng-if="ui.pdfLayout == 'flat'"
  63. ng-show="ui.view == 'pdf'"
  64. )
  65. include ./pdf