locomotivecms 4.1.1 → 4.2.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (301) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +4 -3
  4. data/Rakefile +4 -0
  5. data/app/api/locomotive/api.rb +1 -1
  6. data/app/assets/config/locomotive_manifest.js +2 -0
  7. data/app/assets/javascripts/locomotive.js +2 -2
  8. data/app/assets/stylesheets/locomotive/account.scss +0 -1
  9. data/app/assets/stylesheets/locomotive/application.scss +0 -1
  10. data/app/assets/stylesheets/locomotive/live_editing_error.scss +0 -1
  11. data/app/assets/stylesheets/locomotive/live_editing_iframe.scss +0 -1
  12. data/app/controllers/locomotive/base_controller.rb +1 -1
  13. data/app/controllers/locomotive/concerns/authorization_controller.rb +1 -1
  14. data/app/controllers/locomotive/concerns/redirect_to_main_host_controller.rb +1 -1
  15. data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +1 -1
  16. data/app/controllers/locomotive/errors_controller.rb +1 -1
  17. data/app/controllers/locomotive/my_account_controller.rb +1 -1
  18. data/app/controllers/locomotive/passwords_controller.rb +3 -1
  19. data/app/controllers/locomotive/registrations_controller.rb +3 -1
  20. data/app/controllers/locomotive/sessions_controller.rb +3 -1
  21. data/app/controllers/locomotive/sites_controller.rb +1 -1
  22. data/app/helpers/locomotive/base_helper.rb +2 -2
  23. data/app/helpers/locomotive/custom_fields_helper.rb +2 -2
  24. data/app/helpers/locomotive/shared/activities_helper.rb +1 -1
  25. data/app/inputs/locomotive/api_key_input.rb +1 -1
  26. data/app/mailers/locomotive/notifications.rb +1 -1
  27. data/app/models/locomotive/account.rb +1 -1
  28. data/app/models/locomotive/concerns/account/api_key.rb +1 -1
  29. data/app/models/locomotive/concerns/content_entry/csv.rb +1 -1
  30. data/app/models/locomotive/concerns/content_entry/slug.rb +5 -5
  31. data/app/models/locomotive/concerns/content_type/entry_template.rb +3 -3
  32. data/app/models/locomotive/concerns/page/templatized.rb +1 -1
  33. data/app/models/locomotive/concerns/shared/json_attribute.rb +21 -2
  34. data/app/models/locomotive/concerns/site/routes.rb +1 -1
  35. data/app/models/locomotive/content_entry.rb +2 -2
  36. data/app/models/locomotive/page.rb +3 -3
  37. data/app/models/locomotive/section.rb +1 -1
  38. data/app/models/locomotive/snippet.rb +1 -1
  39. data/app/models/locomotive/translation.rb +1 -1
  40. data/app/services/locomotive/content_entry_import_service.rb +1 -1
  41. data/app/services/locomotive/content_entry_service.rb +2 -2
  42. data/app/services/locomotive/content_type_service.rb +13 -3
  43. data/app/services/locomotive/custom_field_service.rb +2 -2
  44. data/app/services/locomotive/editor_service.rb +1 -1
  45. data/app/uploaders/locomotive/base_uploader.rb +0 -10
  46. data/app/views/locomotive/dashboard/_activity.html.slim +1 -1
  47. data/app/views/locomotive/page_content/_edit.json.jbuilder +50 -0
  48. data/app/views/locomotive/page_content/edit.html.erb +1 -1
  49. data/app/views/locomotive/page_content/edit.json.jbuilder +52 -50
  50. data/config/initializers/devise.rb +5 -2
  51. data/lib/generators/locomotive/install/templates/locomotive.rb +0 -5
  52. data/lib/locomotive/action_controller/responder.rb +1 -1
  53. data/lib/locomotive/configuration.rb +2 -2
  54. data/lib/locomotive/dependencies.rb +0 -2
  55. data/lib/locomotive/engine.rb +14 -2
  56. data/lib/locomotive/mongoid/patches.rb +25 -65
  57. data/lib/locomotive/steam/services/api_entry_submission_service.rb +1 -0
  58. data/lib/locomotive/version.rb +1 -1
  59. data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/comment.js +203 -0
  60. data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/continuecomment.js +85 -0
  61. data/vendor/assets/javascripts/locomotive/codemirror/addons/dialog/dialog.js +157 -0
  62. data/vendor/assets/javascripts/locomotive/codemirror/addons/display/autorefresh.js +47 -0
  63. data/vendor/assets/javascripts/locomotive/codemirror/addons/display/fullscreen.js +41 -0
  64. data/vendor/assets/javascripts/locomotive/codemirror/addons/display/panel.js +112 -0
  65. data/vendor/assets/javascripts/locomotive/codemirror/addons/display/placeholder.js +62 -0
  66. data/vendor/assets/javascripts/locomotive/codemirror/addons/display/rulers.js +51 -0
  67. data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closebrackets.js +195 -0
  68. data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closetag.js +169 -0
  69. data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/continuelist.js +51 -0
  70. data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchbrackets.js +120 -0
  71. data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchtags.js +66 -0
  72. data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/trailingspace.js +27 -0
  73. data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/brace-fold.js +105 -0
  74. data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/comment-fold.js +59 -0
  75. data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldcode.js +150 -0
  76. data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldgutter.js +146 -0
  77. data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/indent-fold.js +44 -0
  78. data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/markdown-fold.js +49 -0
  79. data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/xml-fold.js +182 -0
  80. data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/anyword-hint.js +41 -0
  81. data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/css-hint.js +60 -0
  82. data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/html-hint.js +348 -0
  83. data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/javascript-hint.js +146 -0
  84. data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/show-hint.js +437 -0
  85. data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/sql-hint.js +271 -0
  86. data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/xml-hint.js +110 -0
  87. data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/coffeescript-lint.js +41 -0
  88. data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/css-lint.js +35 -0
  89. data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/html-lint.js +46 -0
  90. data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/javascript-lint.js +136 -0
  91. data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/json-lint.js +31 -0
  92. data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/lint.js +239 -0
  93. data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/yaml-lint.js +28 -0
  94. data/vendor/assets/javascripts/locomotive/codemirror/addons/merge/merge.js +773 -0
  95. data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/loadmode.js +64 -0
  96. data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/multiplex.js +123 -0
  97. data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/overlay.js +85 -0
  98. data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/simple.js +213 -0
  99. data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/colorize.js +40 -0
  100. data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode-standalone.js +157 -0
  101. data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.js +72 -0
  102. data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.node.js +179 -0
  103. data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/annotatescrollbar.js +118 -0
  104. data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/scrollpastend.js +48 -0
  105. data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/simplescrollbars.js +152 -0
  106. data/vendor/assets/javascripts/locomotive/codemirror/addons/search/jump-to-line.js +49 -0
  107. data/vendor/assets/javascripts/locomotive/codemirror/addons/search/match-highlighter.js +146 -0
  108. data/vendor/assets/javascripts/locomotive/codemirror/addons/search/matchesonscrollbar.js +97 -0
  109. data/vendor/assets/javascripts/locomotive/codemirror/addons/search/search.js +249 -0
  110. data/vendor/assets/javascripts/locomotive/codemirror/addons/search/searchcursor.js +189 -0
  111. data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/active-line.js +74 -0
  112. data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/mark-selection.js +118 -0
  113. data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/selection-pointer.js +98 -0
  114. data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/tern.js +701 -0
  115. data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/worker.js +44 -0
  116. data/vendor/assets/javascripts/locomotive/codemirror/addons/wrap/hardwrap.js +144 -0
  117. data/vendor/assets/javascripts/locomotive/codemirror/keymaps/emacs.js +412 -0
  118. data/vendor/assets/javascripts/locomotive/codemirror/keymaps/sublime.js +580 -0
  119. data/vendor/assets/javascripts/locomotive/codemirror/keymaps/vim.js +5065 -0
  120. data/vendor/assets/javascripts/locomotive/codemirror/modes/apl.js +174 -0
  121. data/vendor/assets/javascripts/locomotive/codemirror/modes/asciiarmor.js +73 -0
  122. data/vendor/assets/javascripts/locomotive/codemirror/modes/asn.1.js +204 -0
  123. data/vendor/assets/javascripts/locomotive/codemirror/modes/asterisk.js +196 -0
  124. data/vendor/assets/javascripts/locomotive/codemirror/modes/brainfuck.js +85 -0
  125. data/vendor/assets/javascripts/locomotive/codemirror/modes/clike.js +786 -0
  126. data/vendor/assets/javascripts/locomotive/codemirror/modes/clojure.js +306 -0
  127. data/vendor/assets/javascripts/locomotive/codemirror/modes/cmake.js +97 -0
  128. data/vendor/assets/javascripts/locomotive/codemirror/modes/cobol.js +255 -0
  129. data/vendor/assets/javascripts/locomotive/codemirror/modes/coffeescript.js +355 -0
  130. data/vendor/assets/javascripts/locomotive/codemirror/modes/commonlisp.js +123 -0
  131. data/vendor/assets/javascripts/locomotive/codemirror/modes/crystal.js +391 -0
  132. data/vendor/assets/javascripts/locomotive/codemirror/modes/css.js +825 -0
  133. data/vendor/assets/javascripts/locomotive/codemirror/modes/cypher.js +146 -0
  134. data/vendor/assets/javascripts/locomotive/codemirror/modes/d.js +218 -0
  135. data/vendor/assets/javascripts/locomotive/codemirror/modes/dart.js +157 -0
  136. data/vendor/assets/javascripts/locomotive/codemirror/modes/diff.js +47 -0
  137. data/vendor/assets/javascripts/locomotive/codemirror/modes/django.js +356 -0
  138. data/vendor/assets/javascripts/locomotive/codemirror/modes/dockerfile.js +79 -0
  139. data/vendor/assets/javascripts/locomotive/codemirror/modes/dtd.js +142 -0
  140. data/vendor/assets/javascripts/locomotive/codemirror/modes/dylan.js +344 -0
  141. data/vendor/assets/javascripts/locomotive/codemirror/modes/ebnf.js +195 -0
  142. data/vendor/assets/javascripts/locomotive/codemirror/modes/ecl.js +206 -0
  143. data/vendor/assets/javascripts/locomotive/codemirror/modes/eiffel.js +160 -0
  144. data/vendor/assets/javascripts/locomotive/codemirror/modes/elm.js +205 -0
  145. data/vendor/assets/javascripts/locomotive/codemirror/modes/erlang.js +618 -0
  146. data/vendor/assets/javascripts/locomotive/codemirror/modes/factor.js +83 -0
  147. data/vendor/assets/javascripts/locomotive/codemirror/modes/fcl.js +173 -0
  148. data/vendor/assets/javascripts/locomotive/codemirror/modes/forth.js +180 -0
  149. data/vendor/assets/javascripts/locomotive/codemirror/modes/fortran.js +188 -0
  150. data/vendor/assets/javascripts/locomotive/codemirror/modes/gas.js +345 -0
  151. data/vendor/assets/javascripts/locomotive/codemirror/modes/gfm.js +130 -0
  152. data/vendor/assets/javascripts/locomotive/codemirror/modes/gherkin.js +178 -0
  153. data/vendor/assets/javascripts/locomotive/codemirror/modes/go.js +185 -0
  154. data/vendor/assets/javascripts/locomotive/codemirror/modes/groovy.js +230 -0
  155. data/vendor/assets/javascripts/locomotive/codemirror/modes/haml.js +161 -0
  156. data/vendor/assets/javascripts/locomotive/codemirror/modes/handlebars.js +62 -0
  157. data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell-literate.js +43 -0
  158. data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell.js +267 -0
  159. data/vendor/assets/javascripts/locomotive/codemirror/modes/haxe.js +515 -0
  160. data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlembedded.js +28 -0
  161. data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlmixed.js +152 -0
  162. data/vendor/assets/javascripts/locomotive/codemirror/modes/http.js +113 -0
  163. data/vendor/assets/javascripts/locomotive/codemirror/modes/idl.js +290 -0
  164. data/vendor/assets/javascripts/locomotive/codemirror/modes/jade.js +590 -0
  165. data/vendor/assets/javascripts/locomotive/codemirror/modes/javascript.js +748 -0
  166. data/vendor/assets/javascripts/locomotive/codemirror/modes/jinja2.js +142 -0
  167. data/vendor/assets/javascripts/locomotive/codemirror/modes/jsx.js +147 -0
  168. data/vendor/assets/javascripts/locomotive/codemirror/modes/julia.js +392 -0
  169. data/vendor/assets/javascripts/locomotive/codemirror/modes/livescript.js +280 -0
  170. data/vendor/assets/javascripts/locomotive/codemirror/modes/lua.js +159 -0
  171. data/vendor/assets/javascripts/locomotive/codemirror/modes/markdown.js +797 -0
  172. data/vendor/assets/javascripts/locomotive/codemirror/modes/mathematica.js +176 -0
  173. data/vendor/assets/javascripts/locomotive/codemirror/modes/mbox.js +129 -0
  174. data/vendor/assets/javascripts/locomotive/codemirror/modes/mirc.js +193 -0
  175. data/vendor/assets/javascripts/locomotive/codemirror/modes/mllike.js +205 -0
  176. data/vendor/assets/javascripts/locomotive/codemirror/modes/modelica.js +245 -0
  177. data/vendor/assets/javascripts/locomotive/codemirror/modes/mscgen.js +169 -0
  178. data/vendor/assets/javascripts/locomotive/codemirror/modes/mumps.js +148 -0
  179. data/vendor/assets/javascripts/locomotive/codemirror/modes/nginx.js +178 -0
  180. data/vendor/assets/javascripts/locomotive/codemirror/modes/nsis.js +95 -0
  181. data/vendor/assets/javascripts/locomotive/codemirror/modes/ntriples.js +186 -0
  182. data/vendor/assets/javascripts/locomotive/codemirror/modes/octave.js +135 -0
  183. data/vendor/assets/javascripts/locomotive/codemirror/modes/oz.js +252 -0
  184. data/vendor/assets/javascripts/locomotive/codemirror/modes/pascal.js +109 -0
  185. data/vendor/assets/javascripts/locomotive/codemirror/modes/pegjs.js +114 -0
  186. data/vendor/assets/javascripts/locomotive/codemirror/modes/perl.js +837 -0
  187. data/vendor/assets/javascripts/locomotive/codemirror/modes/php.js +234 -0
  188. data/vendor/assets/javascripts/locomotive/codemirror/modes/pig.js +178 -0
  189. data/vendor/assets/javascripts/locomotive/codemirror/modes/powershell.js +396 -0
  190. data/vendor/assets/javascripts/locomotive/codemirror/modes/properties.js +78 -0
  191. data/vendor/assets/javascripts/locomotive/codemirror/modes/protobuf.js +68 -0
  192. data/vendor/assets/javascripts/locomotive/codemirror/modes/puppet.js +220 -0
  193. data/vendor/assets/javascripts/locomotive/codemirror/modes/python.js +340 -0
  194. data/vendor/assets/javascripts/locomotive/codemirror/modes/q.js +139 -0
  195. data/vendor/assets/javascripts/locomotive/codemirror/modes/r.js +164 -0
  196. data/vendor/assets/javascripts/locomotive/codemirror/modes/rpm.js +109 -0
  197. data/vendor/assets/javascripts/locomotive/codemirror/modes/rst.js +557 -0
  198. data/vendor/assets/javascripts/locomotive/codemirror/modes/ruby.js +285 -0
  199. data/vendor/assets/javascripts/locomotive/codemirror/modes/rust.js +71 -0
  200. data/vendor/assets/javascripts/locomotive/codemirror/modes/sas.js +315 -0
  201. data/vendor/assets/javascripts/locomotive/codemirror/modes/sass.js +414 -0
  202. data/vendor/assets/javascripts/locomotive/codemirror/modes/scheme.js +249 -0
  203. data/vendor/assets/javascripts/locomotive/codemirror/modes/shell.js +139 -0
  204. data/vendor/assets/javascripts/locomotive/codemirror/modes/sieve.js +193 -0
  205. data/vendor/assets/javascripts/locomotive/codemirror/modes/slim.js +575 -0
  206. data/vendor/assets/javascripts/locomotive/codemirror/modes/smalltalk.js +168 -0
  207. data/vendor/assets/javascripts/locomotive/codemirror/modes/smarty.js +225 -0
  208. data/vendor/assets/javascripts/locomotive/codemirror/modes/solr.js +104 -0
  209. data/vendor/assets/javascripts/locomotive/codemirror/modes/soy.js +199 -0
  210. data/vendor/assets/javascripts/locomotive/codemirror/modes/sparql.js +180 -0
  211. data/vendor/assets/javascripts/locomotive/codemirror/modes/spreadsheet.js +112 -0
  212. data/vendor/assets/javascripts/locomotive/codemirror/modes/sql.js +413 -0
  213. data/vendor/assets/javascripts/locomotive/codemirror/modes/stex.js +251 -0
  214. data/vendor/assets/javascripts/locomotive/codemirror/modes/stylus.js +769 -0
  215. data/vendor/assets/javascripts/locomotive/codemirror/modes/swift.js +202 -0
  216. data/vendor/assets/javascripts/locomotive/codemirror/modes/tcl.js +139 -0
  217. data/vendor/assets/javascripts/locomotive/codemirror/modes/textile.js +469 -0
  218. data/vendor/assets/javascripts/locomotive/codemirror/modes/tiddlywiki.js +308 -0
  219. data/vendor/assets/javascripts/locomotive/codemirror/modes/tiki.js +312 -0
  220. data/vendor/assets/javascripts/locomotive/codemirror/modes/toml.js +88 -0
  221. data/vendor/assets/javascripts/locomotive/codemirror/modes/tornado.js +68 -0
  222. data/vendor/assets/javascripts/locomotive/codemirror/modes/troff.js +84 -0
  223. data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn-cfg.js +214 -0
  224. data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn.js +283 -0
  225. data/vendor/assets/javascripts/locomotive/codemirror/modes/turtle.js +162 -0
  226. data/vendor/assets/javascripts/locomotive/codemirror/modes/twig.js +141 -0
  227. data/vendor/assets/javascripts/locomotive/codemirror/modes/vb.js +276 -0
  228. data/vendor/assets/javascripts/locomotive/codemirror/modes/vbscript.js +350 -0
  229. data/vendor/assets/javascripts/locomotive/codemirror/modes/velocity.js +201 -0
  230. data/vendor/assets/javascripts/locomotive/codemirror/modes/verilog.js +537 -0
  231. data/vendor/assets/javascripts/locomotive/codemirror/modes/vhdl.js +189 -0
  232. data/vendor/assets/javascripts/locomotive/codemirror/modes/vue.js +69 -0
  233. data/vendor/assets/javascripts/locomotive/codemirror/modes/webidl.js +195 -0
  234. data/vendor/assets/javascripts/locomotive/codemirror/modes/xml.js +394 -0
  235. data/vendor/assets/javascripts/locomotive/codemirror/modes/xquery.js +437 -0
  236. data/vendor/assets/javascripts/locomotive/codemirror/modes/yacas.js +204 -0
  237. data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml-frontmatter.js +68 -0
  238. data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml.js +117 -0
  239. data/vendor/assets/javascripts/locomotive/codemirror/modes/z80.js +116 -0
  240. data/vendor/assets/javascripts/locomotive/codemirror.js +8922 -0
  241. data/vendor/assets/javascripts/locomotive/select2.js +436 -175
  242. data/vendor/assets/javascripts/locomotive/wysihtml5x-toolbar.js +1346 -564
  243. data/vendor/assets/stylesheets/locomotive/codemirror/addons/dialog/dialog.css +32 -0
  244. data/vendor/assets/stylesheets/locomotive/codemirror/addons/display/fullscreen.css +6 -0
  245. data/vendor/assets/stylesheets/locomotive/codemirror/addons/fold/foldgutter.css +20 -0
  246. data/vendor/assets/stylesheets/locomotive/codemirror/addons/hint/show-hint.css +37 -0
  247. data/vendor/assets/stylesheets/locomotive/codemirror/addons/lint/lint.css +73 -0
  248. data/vendor/assets/stylesheets/locomotive/codemirror/addons/merge/merge.css +113 -0
  249. data/vendor/assets/stylesheets/locomotive/codemirror/addons/scroll/simplescrollbars.css +66 -0
  250. data/vendor/assets/stylesheets/locomotive/codemirror/addons/search/matchesonscrollbar.css +8 -0
  251. data/vendor/assets/stylesheets/locomotive/codemirror/addons/tern/tern.css +87 -0
  252. data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiddlywiki.css +14 -0
  253. data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiki.css +26 -0
  254. data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-day.css +41 -0
  255. data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-night.css +39 -0
  256. data/vendor/assets/stylesheets/locomotive/codemirror/themes/abcdef.css +32 -0
  257. data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance-mobile.css +5 -0
  258. data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance.css +74 -0
  259. data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-dark.css +38 -0
  260. data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-light.css +38 -0
  261. data/vendor/assets/stylesheets/locomotive/codemirror/themes/bespin.css +34 -0
  262. data/vendor/assets/stylesheets/locomotive/codemirror/themes/blackboard.css +32 -0
  263. data/vendor/assets/stylesheets/locomotive/codemirror/themes/cobalt.css +25 -0
  264. data/vendor/assets/stylesheets/locomotive/codemirror/themes/colorforth.css +33 -0
  265. data/vendor/assets/stylesheets/locomotive/codemirror/themes/dracula.css +41 -0
  266. data/vendor/assets/stylesheets/locomotive/codemirror/themes/eclipse.css +23 -0
  267. data/vendor/assets/stylesheets/locomotive/codemirror/themes/elegant.css +13 -0
  268. data/vendor/assets/stylesheets/locomotive/codemirror/themes/erlang-dark.css +34 -0
  269. data/vendor/assets/stylesheets/locomotive/codemirror/themes/hopscotch.css +34 -0
  270. data/vendor/assets/stylesheets/locomotive/codemirror/themes/icecoder.css +43 -0
  271. data/vendor/assets/stylesheets/locomotive/codemirror/themes/isotope.css +34 -0
  272. data/vendor/assets/stylesheets/locomotive/codemirror/themes/lesser-dark.css +47 -0
  273. data/vendor/assets/stylesheets/locomotive/codemirror/themes/liquibyte.css +95 -0
  274. data/vendor/assets/stylesheets/locomotive/codemirror/themes/material.css +53 -0
  275. data/vendor/assets/stylesheets/locomotive/codemirror/themes/mbo.css +37 -0
  276. data/vendor/assets/stylesheets/locomotive/codemirror/themes/mdn-like.css +46 -0
  277. data/vendor/assets/stylesheets/locomotive/codemirror/themes/midnight.css +45 -0
  278. data/vendor/assets/stylesheets/locomotive/codemirror/themes/monokai.css +36 -0
  279. data/vendor/assets/stylesheets/locomotive/codemirror/themes/neat.css +12 -0
  280. data/vendor/assets/stylesheets/locomotive/codemirror/themes/neo.css +43 -0
  281. data/vendor/assets/stylesheets/locomotive/codemirror/themes/night.css +27 -0
  282. data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-dark.css +38 -0
  283. data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-light.css +38 -0
  284. data/vendor/assets/stylesheets/locomotive/codemirror/themes/pastel-on-dark.css +53 -0
  285. data/vendor/assets/stylesheets/locomotive/codemirror/themes/railscasts.css +34 -0
  286. data/vendor/assets/stylesheets/locomotive/codemirror/themes/rubyblue.css +25 -0
  287. data/vendor/assets/stylesheets/locomotive/codemirror/themes/seti.css +44 -0
  288. data/vendor/assets/stylesheets/locomotive/codemirror/themes/solarized.css +169 -0
  289. data/vendor/assets/stylesheets/locomotive/codemirror/themes/the-matrix.css +30 -0
  290. data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-bright.css +35 -0
  291. data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-eighties.css +38 -0
  292. data/vendor/assets/stylesheets/locomotive/codemirror/themes/ttcn.css +64 -0
  293. data/vendor/assets/stylesheets/locomotive/codemirror/themes/twilight.css +32 -0
  294. data/vendor/assets/stylesheets/locomotive/codemirror/themes/vibrant-ink.css +34 -0
  295. data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-dark.css +53 -0
  296. data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-light.css +43 -0
  297. data/vendor/assets/stylesheets/locomotive/codemirror/themes/yeti.css +44 -0
  298. data/vendor/assets/stylesheets/locomotive/codemirror/themes/zenburn.css +37 -0
  299. data/vendor/assets/stylesheets/locomotive/codemirror.css +347 -0
  300. data/vendor/assets/stylesheets/locomotive/select2.css +3 -6
  301. metadata +349 -128
@@ -0,0 +1,113 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode("http", function() {
15
+ function failFirstLine(stream, state) {
16
+ stream.skipToEnd();
17
+ state.cur = header;
18
+ return "error";
19
+ }
20
+
21
+ function start(stream, state) {
22
+ if (stream.match(/^HTTP\/\d\.\d/)) {
23
+ state.cur = responseStatusCode;
24
+ return "keyword";
25
+ } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) {
26
+ state.cur = requestPath;
27
+ return "keyword";
28
+ } else {
29
+ return failFirstLine(stream, state);
30
+ }
31
+ }
32
+
33
+ function responseStatusCode(stream, state) {
34
+ var code = stream.match(/^\d+/);
35
+ if (!code) return failFirstLine(stream, state);
36
+
37
+ state.cur = responseStatusText;
38
+ var status = Number(code[0]);
39
+ if (status >= 100 && status < 200) {
40
+ return "positive informational";
41
+ } else if (status >= 200 && status < 300) {
42
+ return "positive success";
43
+ } else if (status >= 300 && status < 400) {
44
+ return "positive redirect";
45
+ } else if (status >= 400 && status < 500) {
46
+ return "negative client-error";
47
+ } else if (status >= 500 && status < 600) {
48
+ return "negative server-error";
49
+ } else {
50
+ return "error";
51
+ }
52
+ }
53
+
54
+ function responseStatusText(stream, state) {
55
+ stream.skipToEnd();
56
+ state.cur = header;
57
+ return null;
58
+ }
59
+
60
+ function requestPath(stream, state) {
61
+ stream.eatWhile(/\S/);
62
+ state.cur = requestProtocol;
63
+ return "string-2";
64
+ }
65
+
66
+ function requestProtocol(stream, state) {
67
+ if (stream.match(/^HTTP\/\d\.\d$/)) {
68
+ state.cur = header;
69
+ return "keyword";
70
+ } else {
71
+ return failFirstLine(stream, state);
72
+ }
73
+ }
74
+
75
+ function header(stream) {
76
+ if (stream.sol() && !stream.eat(/[ \t]/)) {
77
+ if (stream.match(/^.*?:/)) {
78
+ return "atom";
79
+ } else {
80
+ stream.skipToEnd();
81
+ return "error";
82
+ }
83
+ } else {
84
+ stream.skipToEnd();
85
+ return "string";
86
+ }
87
+ }
88
+
89
+ function body(stream) {
90
+ stream.skipToEnd();
91
+ return null;
92
+ }
93
+
94
+ return {
95
+ token: function(stream, state) {
96
+ var cur = state.cur;
97
+ if (cur != header && cur != body && stream.eatSpace()) return null;
98
+ return cur(stream, state);
99
+ },
100
+
101
+ blankLine: function(state) {
102
+ state.cur = body;
103
+ },
104
+
105
+ startState: function() {
106
+ return {cur: start};
107
+ }
108
+ };
109
+ });
110
+
111
+ CodeMirror.defineMIME("message/http", "http");
112
+
113
+ });
@@ -0,0 +1,290 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ function wordRegexp(words) {
15
+ return new RegExp('^((' + words.join(')|(') + '))\\b', 'i');
16
+ };
17
+
18
+ var builtinArray = [
19
+ 'a_correlate', 'abs', 'acos', 'adapt_hist_equal', 'alog',
20
+ 'alog2', 'alog10', 'amoeba', 'annotate', 'app_user_dir',
21
+ 'app_user_dir_query', 'arg_present', 'array_equal', 'array_indices',
22
+ 'arrow', 'ascii_template', 'asin', 'assoc', 'atan',
23
+ 'axis', 'axis', 'bandpass_filter', 'bandreject_filter', 'barplot',
24
+ 'bar_plot', 'beseli', 'beselj', 'beselk', 'besely',
25
+ 'beta', 'biginteger', 'bilinear', 'bin_date', 'binary_template',
26
+ 'bindgen', 'binomial', 'bit_ffs', 'bit_population', 'blas_axpy',
27
+ 'blk_con', 'boolarr', 'boolean', 'boxplot', 'box_cursor',
28
+ 'breakpoint', 'broyden', 'bubbleplot', 'butterworth', 'bytarr',
29
+ 'byte', 'byteorder', 'bytscl', 'c_correlate', 'calendar',
30
+ 'caldat', 'call_external', 'call_function', 'call_method',
31
+ 'call_procedure', 'canny', 'catch', 'cd', 'cdf', 'ceil',
32
+ 'chebyshev', 'check_math', 'chisqr_cvf', 'chisqr_pdf', 'choldc',
33
+ 'cholsol', 'cindgen', 'cir_3pnt', 'clipboard', 'close',
34
+ 'clust_wts', 'cluster', 'cluster_tree', 'cmyk_convert', 'code_coverage',
35
+ 'color_convert', 'color_exchange', 'color_quan', 'color_range_map',
36
+ 'colorbar', 'colorize_sample', 'colormap_applicable',
37
+ 'colormap_gradient', 'colormap_rotation', 'colortable',
38
+ 'comfit', 'command_line_args', 'common', 'compile_opt', 'complex',
39
+ 'complexarr', 'complexround', 'compute_mesh_normals', 'cond', 'congrid',
40
+ 'conj', 'constrained_min', 'contour', 'contour', 'convert_coord',
41
+ 'convol', 'convol_fft', 'coord2to3', 'copy_lun', 'correlate',
42
+ 'cos', 'cosh', 'cpu', 'cramer', 'createboxplotdata',
43
+ 'create_cursor', 'create_struct', 'create_view', 'crossp', 'crvlength',
44
+ 'ct_luminance', 'cti_test', 'cursor', 'curvefit', 'cv_coord',
45
+ 'cvttobm', 'cw_animate', 'cw_animate_getp', 'cw_animate_load',
46
+ 'cw_animate_run', 'cw_arcball', 'cw_bgroup', 'cw_clr_index',
47
+ 'cw_colorsel', 'cw_defroi', 'cw_field', 'cw_filesel', 'cw_form',
48
+ 'cw_fslider', 'cw_light_editor', 'cw_light_editor_get',
49
+ 'cw_light_editor_set', 'cw_orient', 'cw_palette_editor',
50
+ 'cw_palette_editor_get', 'cw_palette_editor_set', 'cw_pdmenu',
51
+ 'cw_rgbslider', 'cw_tmpl', 'cw_zoom', 'db_exists',
52
+ 'dblarr', 'dcindgen', 'dcomplex', 'dcomplexarr', 'define_key',
53
+ 'define_msgblk', 'define_msgblk_from_file', 'defroi', 'defsysv',
54
+ 'delvar', 'dendro_plot', 'dendrogram', 'deriv', 'derivsig',
55
+ 'determ', 'device', 'dfpmin', 'diag_matrix', 'dialog_dbconnect',
56
+ 'dialog_message', 'dialog_pickfile', 'dialog_printersetup',
57
+ 'dialog_printjob', 'dialog_read_image',
58
+ 'dialog_write_image', 'dictionary', 'digital_filter', 'dilate', 'dindgen',
59
+ 'dissolve', 'dist', 'distance_measure', 'dlm_load', 'dlm_register',
60
+ 'doc_library', 'double', 'draw_roi', 'edge_dog', 'efont',
61
+ 'eigenql', 'eigenvec', 'ellipse', 'elmhes', 'emboss',
62
+ 'empty', 'enable_sysrtn', 'eof', 'eos', 'erase',
63
+ 'erf', 'erfc', 'erfcx', 'erode', 'errorplot',
64
+ 'errplot', 'estimator_filter', 'execute', 'exit', 'exp',
65
+ 'expand', 'expand_path', 'expint', 'extrac', 'extract_slice',
66
+ 'f_cvf', 'f_pdf', 'factorial', 'fft', 'file_basename',
67
+ 'file_chmod', 'file_copy', 'file_delete', 'file_dirname',
68
+ 'file_expand_path', 'file_gunzip', 'file_gzip', 'file_info',
69
+ 'file_lines', 'file_link', 'file_mkdir', 'file_move',
70
+ 'file_poll_input', 'file_readlink', 'file_same',
71
+ 'file_search', 'file_tar', 'file_test', 'file_untar', 'file_unzip',
72
+ 'file_which', 'file_zip', 'filepath', 'findgen', 'finite',
73
+ 'fix', 'flick', 'float', 'floor', 'flow3',
74
+ 'fltarr', 'flush', 'format_axis_values', 'forward_function', 'free_lun',
75
+ 'fstat', 'fulstr', 'funct', 'function', 'fv_test',
76
+ 'fx_root', 'fz_roots', 'gamma', 'gamma_ct', 'gauss_cvf',
77
+ 'gauss_pdf', 'gauss_smooth', 'gauss2dfit', 'gaussfit',
78
+ 'gaussian_function', 'gaussint', 'get_drive_list', 'get_dxf_objects',
79
+ 'get_kbrd', 'get_login_info',
80
+ 'get_lun', 'get_screen_size', 'getenv', 'getwindows', 'greg2jul',
81
+ 'grib', 'grid_input', 'grid_tps', 'grid3', 'griddata',
82
+ 'gs_iter', 'h_eq_ct', 'h_eq_int', 'hanning', 'hash',
83
+ 'hdf', 'hdf5', 'heap_free', 'heap_gc', 'heap_nosave',
84
+ 'heap_refcount', 'heap_save', 'help', 'hilbert', 'hist_2d',
85
+ 'hist_equal', 'histogram', 'hls', 'hough', 'hqr',
86
+ 'hsv', 'i18n_multibytetoutf8',
87
+ 'i18n_multibytetowidechar', 'i18n_utf8tomultibyte',
88
+ 'i18n_widechartomultibyte',
89
+ 'ibeta', 'icontour', 'iconvertcoord', 'idelete', 'identity',
90
+ 'idl_base64', 'idl_container', 'idl_validname',
91
+ 'idlexbr_assistant', 'idlitsys_createtool',
92
+ 'idlunit', 'iellipse', 'igamma', 'igetcurrent', 'igetdata',
93
+ 'igetid', 'igetproperty', 'iimage', 'image', 'image_cont',
94
+ 'image_statistics', 'image_threshold', 'imaginary', 'imap', 'indgen',
95
+ 'int_2d', 'int_3d', 'int_tabulated', 'intarr', 'interpol',
96
+ 'interpolate', 'interval_volume', 'invert', 'ioctl', 'iopen',
97
+ 'ir_filter', 'iplot', 'ipolygon', 'ipolyline', 'iputdata',
98
+ 'iregister', 'ireset', 'iresolve', 'irotate', 'isa',
99
+ 'isave', 'iscale', 'isetcurrent', 'isetproperty', 'ishft',
100
+ 'isocontour', 'isosurface', 'isurface', 'itext', 'itranslate',
101
+ 'ivector', 'ivolume', 'izoom', 'journal', 'json_parse',
102
+ 'json_serialize', 'jul2greg', 'julday', 'keyword_set', 'krig2d',
103
+ 'kurtosis', 'kw_test', 'l64indgen', 'la_choldc', 'la_cholmprove',
104
+ 'la_cholsol', 'la_determ', 'la_eigenproblem', 'la_eigenql', 'la_eigenvec',
105
+ 'la_elmhes', 'la_gm_linear_model', 'la_hqr', 'la_invert',
106
+ 'la_least_square_equality', 'la_least_squares', 'la_linear_equation',
107
+ 'la_ludc', 'la_lumprove', 'la_lusol',
108
+ 'la_svd', 'la_tridc', 'la_trimprove', 'la_triql', 'la_trired',
109
+ 'la_trisol', 'label_date', 'label_region', 'ladfit', 'laguerre',
110
+ 'lambda', 'lambdap', 'lambertw', 'laplacian', 'least_squares_filter',
111
+ 'leefilt', 'legend', 'legendre', 'linbcg', 'lindgen',
112
+ 'linfit', 'linkimage', 'list', 'll_arc_distance', 'lmfit',
113
+ 'lmgr', 'lngamma', 'lnp_test', 'loadct', 'locale_get',
114
+ 'logical_and', 'logical_or', 'logical_true', 'lon64arr', 'lonarr',
115
+ 'long', 'long64', 'lsode', 'lu_complex', 'ludc',
116
+ 'lumprove', 'lusol', 'm_correlate', 'machar', 'make_array',
117
+ 'make_dll', 'make_rt', 'map', 'mapcontinents', 'mapgrid',
118
+ 'map_2points', 'map_continents', 'map_grid', 'map_image', 'map_patch',
119
+ 'map_proj_forward', 'map_proj_image', 'map_proj_info',
120
+ 'map_proj_init', 'map_proj_inverse',
121
+ 'map_set', 'matrix_multiply', 'matrix_power', 'max', 'md_test',
122
+ 'mean', 'meanabsdev', 'mean_filter', 'median', 'memory',
123
+ 'mesh_clip', 'mesh_decimate', 'mesh_issolid',
124
+ 'mesh_merge', 'mesh_numtriangles',
125
+ 'mesh_obj', 'mesh_smooth', 'mesh_surfacearea',
126
+ 'mesh_validate', 'mesh_volume',
127
+ 'message', 'min', 'min_curve_surf', 'mk_html_help', 'modifyct',
128
+ 'moment', 'morph_close', 'morph_distance',
129
+ 'morph_gradient', 'morph_hitormiss',
130
+ 'morph_open', 'morph_thin', 'morph_tophat', 'multi', 'n_elements',
131
+ 'n_params', 'n_tags', 'ncdf', 'newton', 'noise_hurl',
132
+ 'noise_pick', 'noise_scatter', 'noise_slur', 'norm', 'obj_class',
133
+ 'obj_destroy', 'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid',
134
+ 'objarr', 'on_error', 'on_ioerror', 'online_help', 'openr',
135
+ 'openu', 'openw', 'oplot', 'oploterr', 'orderedhash',
136
+ 'p_correlate', 'parse_url', 'particle_trace', 'path_cache', 'path_sep',
137
+ 'pcomp', 'plot', 'plot3d', 'plot', 'plot_3dbox',
138
+ 'plot_field', 'ploterr', 'plots', 'polar_contour', 'polar_surface',
139
+ 'polyfill', 'polyshade', 'pnt_line', 'point_lun', 'polarplot',
140
+ 'poly', 'poly_2d', 'poly_area', 'poly_fit', 'polyfillv',
141
+ 'polygon', 'polyline', 'polywarp', 'popd', 'powell',
142
+ 'pref_commit', 'pref_get', 'pref_set', 'prewitt', 'primes',
143
+ 'print', 'printf', 'printd', 'pro', 'product',
144
+ 'profile', 'profiler', 'profiles', 'project_vol', 'ps_show_fonts',
145
+ 'psafm', 'pseudo', 'ptr_free', 'ptr_new', 'ptr_valid',
146
+ 'ptrarr', 'pushd', 'qgrid3', 'qhull', 'qromb',
147
+ 'qromo', 'qsimp', 'query_*', 'query_ascii', 'query_bmp',
148
+ 'query_csv', 'query_dicom', 'query_gif', 'query_image', 'query_jpeg',
149
+ 'query_jpeg2000', 'query_mrsid', 'query_pict', 'query_png', 'query_ppm',
150
+ 'query_srf', 'query_tiff', 'query_video', 'query_wav', 'r_correlate',
151
+ 'r_test', 'radon', 'randomn', 'randomu', 'ranks',
152
+ 'rdpix', 'read', 'readf', 'read_ascii', 'read_binary',
153
+ 'read_bmp', 'read_csv', 'read_dicom', 'read_gif', 'read_image',
154
+ 'read_interfile', 'read_jpeg', 'read_jpeg2000', 'read_mrsid', 'read_pict',
155
+ 'read_png', 'read_ppm', 'read_spr', 'read_srf', 'read_sylk',
156
+ 'read_tiff', 'read_video', 'read_wav', 'read_wave', 'read_x11_bitmap',
157
+ 'read_xwd', 'reads', 'readu', 'real_part', 'rebin',
158
+ 'recall_commands', 'recon3', 'reduce_colors', 'reform', 'region_grow',
159
+ 'register_cursor', 'regress', 'replicate',
160
+ 'replicate_inplace', 'resolve_all',
161
+ 'resolve_routine', 'restore', 'retall', 'return', 'reverse',
162
+ 'rk4', 'roberts', 'rot', 'rotate', 'round',
163
+ 'routine_filepath', 'routine_info', 'rs_test', 's_test', 'save',
164
+ 'savgol', 'scale3', 'scale3d', 'scatterplot', 'scatterplot3d',
165
+ 'scope_level', 'scope_traceback', 'scope_varfetch',
166
+ 'scope_varname', 'search2d',
167
+ 'search3d', 'sem_create', 'sem_delete', 'sem_lock', 'sem_release',
168
+ 'set_plot', 'set_shading', 'setenv', 'sfit', 'shade_surf',
169
+ 'shade_surf_irr', 'shade_volume', 'shift', 'shift_diff', 'shmdebug',
170
+ 'shmmap', 'shmunmap', 'shmvar', 'show3', 'showfont',
171
+ 'signum', 'simplex', 'sin', 'sindgen', 'sinh',
172
+ 'size', 'skewness', 'skip_lun', 'slicer3', 'slide_image',
173
+ 'smooth', 'sobel', 'socket', 'sort', 'spawn',
174
+ 'sph_4pnt', 'sph_scat', 'spher_harm', 'spl_init', 'spl_interp',
175
+ 'spline', 'spline_p', 'sprsab', 'sprsax', 'sprsin',
176
+ 'sprstp', 'sqrt', 'standardize', 'stddev', 'stop',
177
+ 'strarr', 'strcmp', 'strcompress', 'streamline', 'streamline',
178
+ 'stregex', 'stretch', 'string', 'strjoin', 'strlen',
179
+ 'strlowcase', 'strmatch', 'strmessage', 'strmid', 'strpos',
180
+ 'strput', 'strsplit', 'strtrim', 'struct_assign', 'struct_hide',
181
+ 'strupcase', 'surface', 'surface', 'surfr', 'svdc',
182
+ 'svdfit', 'svsol', 'swap_endian', 'swap_endian_inplace', 'symbol',
183
+ 'systime', 't_cvf', 't_pdf', 't3d', 'tag_names',
184
+ 'tan', 'tanh', 'tek_color', 'temporary', 'terminal_size',
185
+ 'tetra_clip', 'tetra_surface', 'tetra_volume', 'text', 'thin',
186
+ 'thread', 'threed', 'tic', 'time_test2', 'timegen',
187
+ 'timer', 'timestamp', 'timestamptovalues', 'tm_test', 'toc',
188
+ 'total', 'trace', 'transpose', 'tri_surf', 'triangulate',
189
+ 'trigrid', 'triql', 'trired', 'trisol', 'truncate_lun',
190
+ 'ts_coef', 'ts_diff', 'ts_fcast', 'ts_smooth', 'tv',
191
+ 'tvcrs', 'tvlct', 'tvrd', 'tvscl', 'typename',
192
+ 'uindgen', 'uint', 'uintarr', 'ul64indgen', 'ulindgen',
193
+ 'ulon64arr', 'ulonarr', 'ulong', 'ulong64', 'uniq',
194
+ 'unsharp_mask', 'usersym', 'value_locate', 'variance', 'vector',
195
+ 'vector_field', 'vel', 'velovect', 'vert_t3d', 'voigt',
196
+ 'volume', 'voronoi', 'voxel_proj', 'wait', 'warp_tri',
197
+ 'watershed', 'wdelete', 'wf_draw', 'where', 'widget_base',
198
+ 'widget_button', 'widget_combobox', 'widget_control',
199
+ 'widget_displaycontextmenu', 'widget_draw',
200
+ 'widget_droplist', 'widget_event', 'widget_info',
201
+ 'widget_label', 'widget_list',
202
+ 'widget_propertysheet', 'widget_slider', 'widget_tab',
203
+ 'widget_table', 'widget_text',
204
+ 'widget_tree', 'widget_tree_move', 'widget_window',
205
+ 'wiener_filter', 'window',
206
+ 'window', 'write_bmp', 'write_csv', 'write_gif', 'write_image',
207
+ 'write_jpeg', 'write_jpeg2000', 'write_nrif', 'write_pict', 'write_png',
208
+ 'write_ppm', 'write_spr', 'write_srf', 'write_sylk', 'write_tiff',
209
+ 'write_video', 'write_wav', 'write_wave', 'writeu', 'wset',
210
+ 'wshow', 'wtn', 'wv_applet', 'wv_cwt', 'wv_cw_wavelet',
211
+ 'wv_denoise', 'wv_dwt', 'wv_fn_coiflet',
212
+ 'wv_fn_daubechies', 'wv_fn_gaussian',
213
+ 'wv_fn_haar', 'wv_fn_morlet', 'wv_fn_paul',
214
+ 'wv_fn_symlet', 'wv_import_data',
215
+ 'wv_import_wavelet', 'wv_plot3d_wps', 'wv_plot_multires',
216
+ 'wv_pwt', 'wv_tool_denoise',
217
+ 'xbm_edit', 'xdisplayfile', 'xdxf', 'xfont', 'xinteranimate',
218
+ 'xloadct', 'xmanager', 'xmng_tmpl', 'xmtool', 'xobjview',
219
+ 'xobjview_rotate', 'xobjview_write_image',
220
+ 'xpalette', 'xpcolor', 'xplot3d',
221
+ 'xregistered', 'xroi', 'xsq_test', 'xsurface', 'xvaredit',
222
+ 'xvolume', 'xvolume_rotate', 'xvolume_write_image',
223
+ 'xyouts', 'zlib_compress', 'zlib_uncompress', 'zoom', 'zoom_24'
224
+ ];
225
+ var builtins = wordRegexp(builtinArray);
226
+
227
+ var keywordArray = [
228
+ 'begin', 'end', 'endcase', 'endfor',
229
+ 'endwhile', 'endif', 'endrep', 'endforeach',
230
+ 'break', 'case', 'continue', 'for',
231
+ 'foreach', 'goto', 'if', 'then', 'else',
232
+ 'repeat', 'until', 'switch', 'while',
233
+ 'do', 'pro', 'function'
234
+ ];
235
+ var keywords = wordRegexp(keywordArray);
236
+
237
+ CodeMirror.registerHelper("hintWords", "idl", builtinArray.concat(keywordArray));
238
+
239
+ var identifiers = new RegExp('^[_a-z\xa1-\uffff][_a-z0-9\xa1-\uffff]*', 'i');
240
+
241
+ var singleOperators = /[+\-*&=<>\/@#~$]/;
242
+ var boolOperators = new RegExp('(and|or|eq|lt|le|gt|ge|ne|not)', 'i');
243
+
244
+ function tokenBase(stream) {
245
+ // whitespaces
246
+ if (stream.eatSpace()) return null;
247
+
248
+ // Handle one line Comments
249
+ if (stream.match(';')) {
250
+ stream.skipToEnd();
251
+ return 'comment';
252
+ }
253
+
254
+ // Handle Number Literals
255
+ if (stream.match(/^[0-9\.+-]/, false)) {
256
+ if (stream.match(/^[+-]?0x[0-9a-fA-F]+/))
257
+ return 'number';
258
+ if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))
259
+ return 'number';
260
+ if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))
261
+ return 'number';
262
+ }
263
+
264
+ // Handle Strings
265
+ if (stream.match(/^"([^"]|(""))*"/)) { return 'string'; }
266
+ if (stream.match(/^'([^']|(''))*'/)) { return 'string'; }
267
+
268
+ // Handle words
269
+ if (stream.match(keywords)) { return 'keyword'; }
270
+ if (stream.match(builtins)) { return 'builtin'; }
271
+ if (stream.match(identifiers)) { return 'variable'; }
272
+
273
+ if (stream.match(singleOperators) || stream.match(boolOperators)) {
274
+ return 'operator'; }
275
+
276
+ // Handle non-detected items
277
+ stream.next();
278
+ return null;
279
+ };
280
+
281
+ CodeMirror.defineMode('idl', function() {
282
+ return {
283
+ token: function(stream) {
284
+ return tokenBase(stream);
285
+ }
286
+ };
287
+ });
288
+
289
+ CodeMirror.defineMIME('text/x-idl', 'idl');
290
+ });