editor.jade 2.1 KB

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