editor.jade 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. extends ../layout
  2. block content
  3. #loadingScreen
  4. h3 Loading...
  5. p#loadingMessage Loading editor
  6. #errorMessages
  7. #connectionLostMessage(style="display: none;")
  8. | Lost connection.
  9. span#trying-reconnect
  10. | Reconnecting in
  11. span#reconnection-countdown ?
  12. | seconds.
  13. a(href='#')#try-reconnect-now Try now.
  14. span#reconnecting
  15. | Reconnecting...
  16. #savingProblems(style="display: none")
  17. | Saving...
  18. div#toolbar.sidebar-navigation
  19. ul#tabs
  20. #toolbar-footer
  21. #tab-content.tab-content
  22. include ../templates
  23. include ../templates/dropbox
  24. script(src='/socket.io/socket.io.js')
  25. script(type='text/javascript').
  26. window.sharelatex = !{sharelatexObject};
  27. window.userSettings = !{userSettingsObject};
  28. window.user = !{userObject};
  29. window.csrfToken = "!{csrfToken}";
  30. window.requirejs = {
  31. "paths" : {
  32. "underscore": "libs/underscore",
  33. "mathjax": "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML",
  34. "moment": "libs/moment"
  35. },
  36. "urlArgs" : "fingerprint=#{fingerprint(jsPath + 'ide.js')}",
  37. "waitSeconds": 0,
  38. "shim": {
  39. "libs/backbone": {
  40. deps: ["libs/underscore"]
  41. },
  42. "libs/pdfListView/PdfListView": {
  43. deps: ["libs/pdf"]
  44. },
  45. "libs/pdf": {
  46. deps: ["libs/compatibility"]
  47. }
  48. }
  49. };
  50. script(type='text/javascript').
  51. ga('send', 'event', 'editor-interaction', 'editor-opened')
  52. - locals.supressDefaultJs = true
  53. - var fingerprintedPath = fingerprint(jsPath+'libs/pdf.worker.js')
  54. - var pdfJsWorkerPath = jsPath+'libs/pdf.worker.js?fingerprint='+fingerprintedPath
  55. script
  56. window.sharelatex.pdfJsWorkerPath = "#{pdfJsWorkerPath}"
  57. script(
  58. data-main=jsPath+'ide.js',
  59. baseurl=jsPath,
  60. data-ace-base=jsPath+'ace',
  61. src=jsPath+'libs/require.js?fingerprint='+fingerprint(jsPath + 'libs/require.js')
  62. )
  63. - if (!anonymous)
  64. script(type="text/javascript").
  65. var chatReq = require.config({
  66. context: "chat",
  67. baseUrl: "#{chatUrl}/chat"
  68. });
  69. chatReq(["require", "chat"], function(require, Chat) {
  70. new Chat({
  71. room: {
  72. project_id: window.userSettings.project_id
  73. },
  74. url: "#{chatUrl}"
  75. })
  76. });