burp_cms 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. data/LICENSE.txt +165 -0
  2. data/README.markdown +11 -0
  3. data/Rakefile +56 -0
  4. data/app/assets/images/burp/add-group-to-menu-1.png +0 -0
  5. data/app/assets/images/burp/add-group-to-menu-2.png +0 -0
  6. data/app/assets/images/burp/add-group-to-menu-3.png +0 -0
  7. data/app/assets/images/burp/add-group-to-menu-4.png +0 -0
  8. data/app/assets/images/burp/add-image-1.png +0 -0
  9. data/app/assets/images/burp/add-image-2.png +0 -0
  10. data/app/assets/images/burp/add-image-3.png +0 -0
  11. data/app/assets/images/burp/add-image-4.png +0 -0
  12. data/app/assets/images/burp/add-image-5.png +0 -0
  13. data/app/assets/images/burp/add-link-to-group-1.png +0 -0
  14. data/app/assets/images/burp/add-link-to-group-2.png +0 -0
  15. data/app/assets/images/burp/add-link-to-group-3.png +0 -0
  16. data/app/assets/images/burp/add-link-to-menu-1.png +0 -0
  17. data/app/assets/images/burp/add-link-to-menu-2.png +0 -0
  18. data/app/assets/images/burp/add-link-to-menu-3.png +0 -0
  19. data/app/assets/images/burp/add-link-to-menu-4.png +0 -0
  20. data/app/assets/images/burp/add-page-to-menu-1.png +0 -0
  21. data/app/assets/images/burp/add-page-to-menu-2.png +0 -0
  22. data/app/assets/images/burp/add-page-to-menu-3.png +0 -0
  23. data/app/assets/images/burp/add-page-to-menu-4.png +0 -0
  24. data/app/assets/images/burp/add-page-to-menu-5.png +0 -0
  25. data/app/assets/images/burp/adding-a-page-1.png +0 -0
  26. data/app/assets/images/burp/adding-a-page-2.png +0 -0
  27. data/app/assets/images/burp/adding-a-page-3.png +0 -0
  28. data/app/assets/images/burp/adding-a-page-4.png +0 -0
  29. data/app/assets/images/burp/change-page-title-1.png +0 -0
  30. data/app/assets/images/burp/change-page-title-2.png +0 -0
  31. data/app/assets/images/burp/change-page-title-3.png +0 -0
  32. data/app/assets/images/burp/change-page-title-4.png +0 -0
  33. data/app/assets/images/burp/change-the-text-1.png +0 -0
  34. data/app/assets/images/burp/change-the-text-2.png +0 -0
  35. data/app/assets/images/burp/change-the-text-3.png +0 -0
  36. data/app/assets/images/burp/enter-page-edit-mode-1.png +0 -0
  37. data/app/assets/images/burp/enter-page-edit-mode-2.png +0 -0
  38. data/app/assets/images/burp/enter-page-edit-mode-3.png +0 -0
  39. data/app/assets/images/burp/enter-page-edit-mode-4.jpg +0 -0
  40. data/app/assets/images/burp/enter-page-edit-mode-4.png +0 -0
  41. data/app/assets/images/burp/img/glyphicons-halflings-white.png +0 -0
  42. data/app/assets/images/burp/img/glyphicons-halflings.png +0 -0
  43. data/app/assets/images/burp/move-link-to-bottom-of-menu-1.png +0 -0
  44. data/app/assets/images/burp/move-link-to-bottom-of-menu-2.png +0 -0
  45. data/app/assets/images/burp/move-link-to-bottom-of-menu-3.png +0 -0
  46. data/app/assets/images/burp/remove-a-page-1.png +0 -0
  47. data/app/assets/images/burp/remove-a-page-2.png +0 -0
  48. data/app/assets/images/burp/remove-a-page-3.png +0 -0
  49. data/app/assets/images/burp/remove-a-page-4.png +0 -0
  50. data/app/assets/images/burp/remove-image-1.png +0 -0
  51. data/app/assets/images/burp/remove-image-2.png +0 -0
  52. data/app/assets/images/burp/remove-image-3.png +0 -0
  53. data/app/assets/images/burp/remove-image-4.png +0 -0
  54. data/app/assets/images/burp/remove-image-5.png +0 -0
  55. data/app/assets/images/burp/remove-page-from-menu-1.png +0 -0
  56. data/app/assets/images/burp/remove-page-from-menu-2.png +0 -0
  57. data/app/assets/images/burp/remove-page-from-menu-3.png +0 -0
  58. data/app/assets/images/burp/remove-page-from-menu-4.png +0 -0
  59. data/app/assets/javascripts/burp/application.js +22 -0
  60. data/app/assets/javascripts/burp/burp.js +2 -0
  61. data/app/assets/javascripts/burp/cms_helper.js +49 -0
  62. data/app/assets/javascripts/burp/edit-page.js +22 -0
  63. data/app/assets/javascripts/burp/lib/bootstrap.min.js +6 -0
  64. data/app/assets/javascripts/burp/lib/debug.js +222 -0
  65. data/app/assets/javascripts/burp/lib/fileupload.js +1255 -0
  66. data/app/assets/javascripts/burp/lib/missing-restful-verbs.js +46 -0
  67. data/app/assets/javascripts/burp/menu-functions.js +28 -0
  68. data/app/assets/javascripts/burp/pages-drag-and-drop.js +151 -0
  69. data/app/assets/packages/burp/editing/css/dropzone.css +15 -0
  70. data/app/assets/packages/burp/editing/css/edit-content.less +126 -0
  71. data/app/assets/packages/burp/editing/css/gallery.css +167 -0
  72. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/LICENSE +23 -0
  73. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/README.md +8 -0
  74. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/activeline.html +72 -0
  75. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/changemode.html +50 -0
  76. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/closetag.html +65 -0
  77. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/complete.html +70 -0
  78. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/emacs.html +59 -0
  79. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/folding.html +61 -0
  80. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/formatting.html +80 -0
  81. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/fullscreen.html +152 -0
  82. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/loadmode.html +39 -0
  83. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/marker.html +52 -0
  84. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/matchhighlighter.html +37 -0
  85. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/multiplex.html +59 -0
  86. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/mustache.html +57 -0
  87. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/preview.html +76 -0
  88. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/resize.html +41 -0
  89. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/runmode.html +49 -0
  90. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/search.html +83 -0
  91. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/theme.html +78 -0
  92. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/vim.html +50 -0
  93. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/demo/visibletabs.html +61 -0
  94. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/baboon.png +0 -0
  95. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/baboon_vector.svg +153 -0
  96. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/compress.html +148 -0
  97. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/docs.css +154 -0
  98. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/internals.html +494 -0
  99. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/manual.html +1128 -0
  100. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/oldrelease.html +267 -0
  101. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/reporting.html +57 -0
  102. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/doc/upgrade_v2.2.html +95 -0
  103. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/index.html +417 -0
  104. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/keymap/emacs.js +29 -0
  105. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/keymap/vim.js +766 -0
  106. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/codemirror.css +168 -0
  107. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/codemirror.js +3181 -0
  108. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/closetag.js +146 -0
  109. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/dialog.css +23 -0
  110. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/dialog.js +63 -0
  111. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/foldcode.js +196 -0
  112. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/formatting.js +297 -0
  113. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/javascript-hint.js +134 -0
  114. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/loadmode.js +51 -0
  115. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/match-highlighter.js +44 -0
  116. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/multiplex.js +72 -0
  117. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/overlay.js +52 -0
  118. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/pig-hint.js +123 -0
  119. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/runmode.js +49 -0
  120. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/search.js +118 -0
  121. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/searchcursor.js +117 -0
  122. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/simple-hint.css +16 -0
  123. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/lib/util/simple-hint.js +72 -0
  124. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/clike/clike.js +271 -0
  125. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/clike/index.html +101 -0
  126. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/clike/scala.html +765 -0
  127. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/clojure/clojure.js +207 -0
  128. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/clojure/index.html +66 -0
  129. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/coffeescript/LICENSE +22 -0
  130. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/coffeescript/coffeescript.js +347 -0
  131. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/coffeescript/index.html +727 -0
  132. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/css/css.js +124 -0
  133. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/css/index.html +55 -0
  134. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/diff/diff.js +32 -0
  135. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/diff/index.html +104 -0
  136. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/ecl/ecl.js +203 -0
  137. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/ecl/index.html +42 -0
  138. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/erlang/erlang.js +251 -0
  139. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/erlang/index.html +61 -0
  140. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/gfm/gfm.js +144 -0
  141. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/gfm/index.html +47 -0
  142. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/go/go.js +170 -0
  143. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/go/index.html +72 -0
  144. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/groovy/groovy.js +210 -0
  145. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/groovy/index.html +71 -0
  146. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/haskell/haskell.js +242 -0
  147. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/haskell/index.html +60 -0
  148. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/htmlembedded/htmlembedded.js +68 -0
  149. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/htmlembedded/index.html +49 -0
  150. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/htmlmixed/htmlmixed.js +85 -0
  151. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/htmlmixed/index.html +51 -0
  152. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/javascript/index.html +77 -0
  153. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/javascript/javascript.js +361 -0
  154. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/jinja2/index.html +37 -0
  155. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/jinja2/jinja2.js +42 -0
  156. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/less/index.html +618 -0
  157. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/less/less.js +232 -0
  158. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/lua/index.html +72 -0
  159. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/lua/lua.js +140 -0
  160. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/markdown/index.html +338 -0
  161. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/markdown/markdown.js +245 -0
  162. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/mysql/index.html +41 -0
  163. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/mysql/mysql.js +188 -0
  164. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/ntriples/index.html +32 -0
  165. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/ntriples/ntriples.js +172 -0
  166. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/pascal/LICENSE +7 -0
  167. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/pascal/index.html +48 -0
  168. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/pascal/pascal.js +94 -0
  169. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/perl/LICENSE +19 -0
  170. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/perl/index.html +62 -0
  171. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/perl/perl.js +816 -0
  172. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/php/index.html +48 -0
  173. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/php/php.js +150 -0
  174. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/pig/index.html +42 -0
  175. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/pig/pig.js +172 -0
  176. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/plsql/index.html +62 -0
  177. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/plsql/plsql.js +217 -0
  178. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/properties/index.html +40 -0
  179. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/properties/properties.js +63 -0
  180. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/python/LICENSE.txt +21 -0
  181. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/python/index.html +122 -0
  182. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/python/python.js +338 -0
  183. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/r/LICENSE +24 -0
  184. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/r/index.html +73 -0
  185. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/r/r.js +141 -0
  186. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rpm/changes/changes.js +19 -0
  187. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rpm/changes/index.html +53 -0
  188. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rpm/spec/index.html +99 -0
  189. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rpm/spec/spec.css +5 -0
  190. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rpm/spec/spec.js +66 -0
  191. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rst/index.html +525 -0
  192. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rst/rst.js +326 -0
  193. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/ruby/LICENSE +24 -0
  194. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/ruby/index.html +171 -0
  195. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/ruby/ruby.js +195 -0
  196. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rust/index.html +48 -0
  197. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/rust/rust.js +432 -0
  198. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/scheme/index.html +64 -0
  199. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/scheme/scheme.js +230 -0
  200. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/shell/index.html +50 -0
  201. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/shell/shell.js +103 -0
  202. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/smalltalk/index.html +55 -0
  203. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/smalltalk/smalltalk.js +139 -0
  204. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/smarty/index.html +82 -0
  205. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/smarty/smarty.js +148 -0
  206. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/sparql/index.html +40 -0
  207. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/sparql/sparql.js +143 -0
  208. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/stex/index.html +95 -0
  209. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/stex/stex.js +182 -0
  210. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/stex/test.html +263 -0
  211. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/tiddlywiki/index.html +140 -0
  212. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/tiddlywiki/tiddlywiki.css +14 -0
  213. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/tiddlywiki/tiddlywiki.js +384 -0
  214. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/tiki/index.html +82 -0
  215. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/tiki/tiki.css +26 -0
  216. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/tiki/tiki.js +316 -0
  217. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/vbscript/index.html +42 -0
  218. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/vbscript/vbscript.js +26 -0
  219. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/velocity/index.html +103 -0
  220. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/velocity/velocity.js +146 -0
  221. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/verilog/index.html +210 -0
  222. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/verilog/verilog.js +194 -0
  223. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xml/index.html +44 -0
  224. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xml/xml.js +325 -0
  225. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/LICENSE +20 -0
  226. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/index.html +222 -0
  227. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/test/index.html +27 -0
  228. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/test/testBase.js +42 -0
  229. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/test/testEmptySequenceKeyword.js +16 -0
  230. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/test/testMultiAttr.js +16 -0
  231. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/test/testNamespaces.js +91 -0
  232. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js +16 -0
  233. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/test/testQuotes.js +19 -0
  234. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/xquery/xquery.js +448 -0
  235. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/yaml/index.html +67 -0
  236. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/mode/yaml/yaml.js +95 -0
  237. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/package.json +29 -0
  238. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/test/index.html +28 -0
  239. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/test/mode_test.css +22 -0
  240. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/test/mode_test.js +164 -0
  241. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/test/test.js +344 -0
  242. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/ambiance.css +81 -0
  243. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/blackboard.css +25 -0
  244. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/cobalt.css +18 -0
  245. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/eclipse.css +25 -0
  246. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/elegant.css +10 -0
  247. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/erlang-dark.css +21 -0
  248. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/lesser-dark.css +44 -0
  249. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/monokai.css +28 -0
  250. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/neat.css +9 -0
  251. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/night.css +21 -0
  252. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/rubyblue.css +21 -0
  253. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/vibrant-ink.css +27 -0
  254. data/app/assets/packages/burp/editing/dep/CodeMirror-2.3/theme/xq-dark.css +46 -0
  255. data/app/assets/packages/burp/editing/dep/FontAwesome/FontAwesome-Vectors.pdf +3180 -7
  256. data/app/assets/packages/burp/editing/dep/FontAwesome/FontAwesome.ttf +0 -0
  257. data/app/assets/packages/burp/editing/dep/FontAwesome/README.md +18 -0
  258. data/app/assets/packages/burp/editing/dep/FontAwesome/css/font-awesome-ie7.css +645 -0
  259. data/app/assets/packages/burp/editing/dep/FontAwesome/css/font-awesome.less +309 -0
  260. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/css/font-awesome-ie7.css +213 -0
  261. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/css/font-awesome.css +303 -0
  262. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/css/prettify.css +30 -0
  263. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/css/site.css +4904 -0
  264. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/fontawesome-webfont.eot +0 -0
  265. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/fontawesome-webfont.svg +255 -0
  266. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/fontawesome-webfont.ttf +0 -0
  267. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/fontawesome-webfont.woff +0 -0
  268. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/museo_slab_300-webfont.eot +0 -0
  269. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/museo_slab_300-webfont.ttf +0 -0
  270. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/museo_slab_500-webfont.eot +0 -0
  271. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/museo_slab_500-webfont.ttf +0 -0
  272. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/proximanova-webfont.eot +0 -0
  273. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/font/proximanova-webfont.ttf +0 -0
  274. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/ico/favicon.ico +0 -0
  275. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/backbone.min.js +37 -0
  276. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/index/index.js +89 -0
  277. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/jquery-1.7.1.min.js +4 -0
  278. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/prettify.min.js +28 -0
  279. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-alert.js +94 -0
  280. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-button.js +98 -0
  281. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-carousel.js +157 -0
  282. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-collapse.js +136 -0
  283. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-dropdown.js +92 -0
  284. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-modal.js +210 -0
  285. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-popover.js +95 -0
  286. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-scrollspy.js +125 -0
  287. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-tab.js +130 -0
  288. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-tooltip.js +270 -0
  289. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-transition.js +51 -0
  290. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/tw-bs-201/bootstrap-typeahead.js +271 -0
  291. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/js/underscore.min.js +31 -0
  292. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/font-awesome-ie7.less +245 -0
  293. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/font-awesome.less +327 -0
  294. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/font-site.less +26 -0
  295. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/mixins.less +43 -0
  296. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/site.less +300 -0
  297. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/accordion.less +33 -0
  298. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/alerts.less +58 -0
  299. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/bootstrap.less +62 -0
  300. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/breadcrumbs.less +24 -0
  301. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/button-groups.less +191 -0
  302. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/buttons.less +191 -0
  303. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/carousel.less +121 -0
  304. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/close.less +29 -0
  305. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/code.less +57 -0
  306. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/component-animations.less +20 -0
  307. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/dropdowns.less +143 -0
  308. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/forms.less +584 -0
  309. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/grid.less +5 -0
  310. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/hero-unit.less +22 -0
  311. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/labels-badges.less +55 -0
  312. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/layouts.less +17 -0
  313. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/mixins.less +631 -0
  314. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/modals.less +90 -0
  315. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/navbar.less +364 -0
  316. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/navs.less +363 -0
  317. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/pager.less +36 -0
  318. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/pagination.less +56 -0
  319. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/popovers.less +49 -0
  320. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/progress-bars.less +117 -0
  321. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/reset.less +126 -0
  322. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/responsive-1200px-min.less +26 -0
  323. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/responsive-767px-max.less +149 -0
  324. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/responsive-768px-979px.less +17 -0
  325. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/responsive-navbar.less +146 -0
  326. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/responsive-utilities.less +41 -0
  327. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/responsive.less +48 -0
  328. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/scaffolding.less +29 -0
  329. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/sprites.less +191 -0
  330. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/tables.less +176 -0
  331. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/thumbnails.less +47 -0
  332. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/tooltip.less +35 -0
  333. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/type.less +235 -0
  334. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/utilities.less +23 -0
  335. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/variables.less +205 -0
  336. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/twbs-203/wells.less +27 -0
  337. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/assets/less/variables.less +206 -0
  338. data/app/assets/packages/burp/editing/dep/FontAwesome/docs/index.html +1087 -0
  339. data/app/assets/packages/burp/editing/dep/FontAwesome/font/fontawesome-webfont.eot +0 -0
  340. data/app/assets/packages/burp/editing/dep/FontAwesome/font/fontawesome-webfont.svg +255 -0
  341. data/app/assets/packages/burp/editing/dep/FontAwesome/font/fontawesome-webfont.ttf +0 -0
  342. data/app/assets/packages/burp/editing/dep/FontAwesome/font/fontawesome-webfont.woff +0 -0
  343. data/app/assets/packages/burp/editing/dep/FontAwesome/less/font-awesome-ie7.less +245 -0
  344. data/app/assets/packages/burp/editing/dep/FontAwesome/less/font-awesome.less +329 -0
  345. data/app/assets/packages/burp/editing/dep/FontAwesome/sass/font-awesome.sass +712 -0
  346. data/app/assets/packages/burp/editing/dep/FontAwesome/sass/font-awesome.scss +329 -0
  347. data/app/assets/packages/burp/editing/js/admin-dock.js +282 -0
  348. data/app/assets/packages/burp/editing/js/content-decorator.js +321 -0
  349. data/app/assets/packages/burp/editing/js/main.js +331 -0
  350. data/app/assets/packages/burp/editing/js/marked.js +781 -0
  351. data/app/assets/packages/burp/editing/js/md5.js +207 -0
  352. data/app/assets/packages/burp/editing/js/stay.js +143 -0
  353. data/app/assets/packages/burp/editing.js +23 -0
  354. data/app/assets/packages/burp/editing.less +7 -0
  355. data/app/assets/packages/gritter/README.markdown +57 -0
  356. data/app/assets/packages/gritter/css/jquery.gritter.less +101 -0
  357. data/app/assets/packages/gritter/gritter.js +3 -0
  358. data/app/assets/packages/gritter/gritter.less +3 -0
  359. data/app/assets/packages/gritter/images/gritter-light.png +0 -0
  360. data/app/assets/packages/gritter/images/gritter-long.png +0 -0
  361. data/app/assets/packages/gritter/images/gritter.png +0 -0
  362. data/app/assets/packages/gritter/images/ie-spacer.gif +0 -0
  363. data/app/assets/packages/gritter/images/trees.jpg +0 -0
  364. data/app/assets/packages/gritter/index.html +269 -0
  365. data/app/assets/packages/gritter/js/jquery.gritter.js +418 -0
  366. data/app/assets/packages/gritter/js/jquery.gritter.min.js +1 -0
  367. data/app/assets/stylesheets/burp/application.less +82 -0
  368. data/app/assets/stylesheets/burp/bootstrap.less +6158 -0
  369. data/app/assets/stylesheets/burp/docs.less +83 -0
  370. data/app/assets/stylesheets/burp/fileupload.less +31 -0
  371. data/app/assets/stylesheets/burp/views/dnd-menu.less +87 -0
  372. data/app/assets/stylesheets/burp/views/files/index.less +40 -0
  373. data/app/assets/stylesheets/burp/views/pages/index.less +4 -0
  374. data/app/assets/stylesheets/burp/views/static/help.less +11 -0
  375. data/app/controllers/burp/application_controller.rb +45 -0
  376. data/app/controllers/burp/catch_all_controller.rb +24 -0
  377. data/app/controllers/burp/error_controller.rb +7 -0
  378. data/app/controllers/burp/files_controller.rb +92 -0
  379. data/app/controllers/burp/groups_controller.rb +49 -0
  380. data/app/controllers/burp/links_controller.rb +48 -0
  381. data/app/controllers/burp/menus_controller.rb +33 -0
  382. data/app/controllers/burp/pages_controller.rb +112 -0
  383. data/app/controllers/burp/static_controller.rb +11 -0
  384. data/app/helpers/burp/application_helper.rb +4 -0
  385. data/app/lib/burp/access.rb +63 -0
  386. data/app/lib/burp/group.rb +110 -0
  387. data/app/lib/burp/link.rb +66 -0
  388. data/app/lib/burp/page.rb +23 -0
  389. data/app/lib/burp/util/upload_handler.rb +84 -0
  390. data/app/lib/burp/util.rb +39 -0
  391. data/app/models/burp/file_model.rb +45 -0
  392. data/app/models/burp/menu.rb +60 -0
  393. data/app/models/burp/page_model.rb +158 -0
  394. data/app/views/burp/files/index.html.erb +87 -0
  395. data/app/views/burp/groups/edit.html.erb +18 -0
  396. data/app/views/burp/links/edit.html.erb +19 -0
  397. data/app/views/burp/menus/edit.html.erb +157 -0
  398. data/app/views/burp/menus/index.html.erb +9 -0
  399. data/app/views/burp/pages/edit.html.erb +20 -0
  400. data/app/views/burp/pages/index.html.erb +114 -0
  401. data/app/views/burp/static/help.html.erb +543 -0
  402. data/app/views/burp/static/index.html.erb +15 -0
  403. data/app/views/layouts/burp/application.html.erb +57 -0
  404. data/config/cucumber.yml +12 -0
  405. data/config/initializers/bootstrap_form.rb +2 -0
  406. data/config/routes.rb +30 -0
  407. data/lib/burp/capistrano.rb +51 -0
  408. data/lib/burp/engine.rb +15 -0
  409. data/lib/burp/version.rb +3 -0
  410. data/lib/burp_cms.rb +64 -0
  411. data/lib/tasks/burp_tasks.rake +99 -0
  412. metadata +845 -0
@@ -0,0 +1,64 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>CodeMirror: Scheme mode</title>
5
+ <link rel="stylesheet" href="../../lib/codemirror.css">
6
+ <script src="../../lib/codemirror.js"></script>
7
+ <script src="scheme.js"></script>
8
+ <style>.CodeMirror {background: #f8f8f8;}</style>
9
+ <link rel="stylesheet" href="../../doc/docs.css">
10
+ </head>
11
+ <body>
12
+ <h1>CodeMirror: Scheme mode</h1>
13
+ <form><textarea id="code" name="code">
14
+ ; See if the input starts with a given symbol.
15
+ (define (match-symbol input pattern)
16
+ (cond ((null? (remain input)) #f)
17
+ ((eqv? (car (remain input)) pattern) (r-cdr input))
18
+ (else #f)))
19
+
20
+ ; Allow the input to start with one of a list of patterns.
21
+ (define (match-or input pattern)
22
+ (cond ((null? pattern) #f)
23
+ ((match-pattern input (car pattern)))
24
+ (else (match-or input (cdr pattern)))))
25
+
26
+ ; Allow a sequence of patterns.
27
+ (define (match-seq input pattern)
28
+ (if (null? pattern)
29
+ input
30
+ (let ((match (match-pattern input (car pattern))))
31
+ (if match (match-seq match (cdr pattern)) #f))))
32
+
33
+ ; Match with the pattern but no problem if it does not match.
34
+ (define (match-opt input pattern)
35
+ (let ((match (match-pattern input (car pattern))))
36
+ (if match match input)))
37
+
38
+ ; Match anything (other than '()), until pattern is found. The rather
39
+ ; clumsy form of requiring an ending pattern is needed to decide where
40
+ ; the end of the match is. If none is given, this will match the rest
41
+ ; of the sentence.
42
+ (define (match-any input pattern)
43
+ (cond ((null? (remain input)) #f)
44
+ ((null? pattern) (f-cons (remain input) (clear-remain input)))
45
+ (else
46
+ (let ((accum-any (collector)))
47
+ (define (match-pattern-any input pattern)
48
+ (cond ((null? (remain input)) #f)
49
+ (else (accum-any (car (remain input)))
50
+ (cond ((match-pattern (r-cdr input) pattern))
51
+ (else (match-pattern-any (r-cdr input) pattern))))))
52
+ (let ((retval (match-pattern-any input (car pattern))))
53
+ (if retval
54
+ (f-cons (accum-any) retval)
55
+ #f))))))
56
+ </textarea></form>
57
+ <script>
58
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
59
+ </script>
60
+
61
+ <p><strong>MIME types defined:</strong> <code>text/x-scheme</code>.</p>
62
+
63
+ </body>
64
+ </html>
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Author: Koh Zi Han, based on implementation by Koh Zi Chun
3
+ */
4
+ CodeMirror.defineMode("scheme", function (config, mode) {
5
+ var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
6
+ ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD="keyword";
7
+ var INDENT_WORD_SKIP = 2, KEYWORDS_SKIP = 1;
8
+
9
+ function makeKeywords(str) {
10
+ var obj = {}, words = str.split(" ");
11
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
12
+ return obj;
13
+ }
14
+
15
+ var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?");
16
+ var indentKeys = makeKeywords("define let letrec let* lambda");
17
+
18
+ function stateStack(indent, type, prev) { // represents a state stack object
19
+ this.indent = indent;
20
+ this.type = type;
21
+ this.prev = prev;
22
+ }
23
+
24
+ function pushStack(state, indent, type) {
25
+ state.indentStack = new stateStack(indent, type, state.indentStack);
26
+ }
27
+
28
+ function popStack(state) {
29
+ state.indentStack = state.indentStack.prev;
30
+ }
31
+
32
+ var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i);
33
+ var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i);
34
+ var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i);
35
+ var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);
36
+
37
+ function isBinaryNumber (stream) {
38
+ return stream.match(binaryMatcher);
39
+ }
40
+
41
+ function isOctalNumber (stream) {
42
+ return stream.match(octalMatcher);
43
+ }
44
+
45
+ function isDecimalNumber (stream, backup) {
46
+ if (backup === true) {
47
+ stream.backUp(1);
48
+ }
49
+ return stream.match(decimalMatcher);
50
+ }
51
+
52
+ function isHexNumber (stream) {
53
+ return stream.match(hexMatcher);
54
+ }
55
+
56
+ return {
57
+ startState: function () {
58
+ return {
59
+ indentStack: null,
60
+ indentation: 0,
61
+ mode: false,
62
+ sExprComment: false
63
+ };
64
+ },
65
+
66
+ token: function (stream, state) {
67
+ if (state.indentStack == null && stream.sol()) {
68
+ // update indentation, but only if indentStack is empty
69
+ state.indentation = stream.indentation();
70
+ }
71
+
72
+ // skip spaces
73
+ if (stream.eatSpace()) {
74
+ return null;
75
+ }
76
+ var returnType = null;
77
+
78
+ switch(state.mode){
79
+ case "string": // multi-line string parsing mode
80
+ var next, escaped = false;
81
+ while ((next = stream.next()) != null) {
82
+ if (next == "\"" && !escaped) {
83
+
84
+ state.mode = false;
85
+ break;
86
+ }
87
+ escaped = !escaped && next == "\\";
88
+ }
89
+ returnType = STRING; // continue on in scheme-string mode
90
+ break;
91
+ case "comment": // comment parsing mode
92
+ var next, maybeEnd = false;
93
+ while ((next = stream.next()) != null) {
94
+ if (next == "#" && maybeEnd) {
95
+
96
+ state.mode = false;
97
+ break;
98
+ }
99
+ maybeEnd = (next == "|");
100
+ }
101
+ returnType = COMMENT;
102
+ break;
103
+ case "s-expr-comment": // s-expr commenting mode
104
+ state.mode = false;
105
+ if(stream.peek() == "(" || stream.peek() == "["){
106
+ // actually start scheme s-expr commenting mode
107
+ state.sExprComment = 0;
108
+ }else{
109
+ // if not we just comment the entire of the next token
110
+ stream.eatWhile(/[^/s]/); // eat non spaces
111
+ returnType = COMMENT;
112
+ break;
113
+ }
114
+ default: // default parsing mode
115
+ var ch = stream.next();
116
+
117
+ if (ch == "\"") {
118
+ state.mode = "string";
119
+ returnType = STRING;
120
+
121
+ } else if (ch == "'") {
122
+ returnType = ATOM;
123
+ } else if (ch == '#') {
124
+ if (stream.eat("|")) { // Multi-line comment
125
+ state.mode = "comment"; // toggle to comment mode
126
+ returnType = COMMENT;
127
+ } else if (stream.eat(/[tf]/i)) { // #t/#f (atom)
128
+ returnType = ATOM;
129
+ } else if (stream.eat(';')) { // S-Expr comment
130
+ state.mode = "s-expr-comment";
131
+ returnType = COMMENT;
132
+ } else {
133
+ var numTest = null, hasExactness = false, hasRadix = true;
134
+ if (stream.eat(/[ei]/i)) {
135
+ hasExactness = true;
136
+ } else {
137
+ stream.backUp(1); // must be radix specifier
138
+ }
139
+ if (stream.match(/^#b/i)) {
140
+ numTest = isBinaryNumber;
141
+ } else if (stream.match(/^#o/i)) {
142
+ numTest = isOctalNumber;
143
+ } else if (stream.match(/^#x/i)) {
144
+ numTest = isHexNumber;
145
+ } else if (stream.match(/^#d/i)) {
146
+ numTest = isDecimalNumber;
147
+ } else if (stream.match(/^[-+0-9.]/, false)) {
148
+ hasRadix = false;
149
+ numTest = isDecimalNumber;
150
+ // re-consume the intial # if all matches failed
151
+ } else if (!hasExactness) {
152
+ stream.eat('#');
153
+ }
154
+ if (numTest != null) {
155
+ if (hasRadix && !hasExactness) {
156
+ // consume optional exactness after radix
157
+ stream.match(/^#[ei]/i);
158
+ }
159
+ if (numTest(stream))
160
+ returnType = NUMBER;
161
+ }
162
+ }
163
+ } else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal
164
+ returnType = NUMBER;
165
+ } else if (ch == ";") { // comment
166
+ stream.skipToEnd(); // rest of the line is a comment
167
+ returnType = COMMENT;
168
+ } else if (ch == "(" || ch == "[") {
169
+ var keyWord = ''; var indentTemp = stream.column();
170
+ /**
171
+ Either
172
+ (indent-word ..
173
+ (non-indent-word ..
174
+ (;something else, bracket, etc.
175
+ */
176
+
177
+ while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) {
178
+ keyWord += letter;
179
+ }
180
+
181
+ if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word
182
+
183
+ pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
184
+ } else { // non-indent word
185
+ // we continue eating the spaces
186
+ stream.eatSpace();
187
+ if (stream.eol() || stream.peek() == ";") {
188
+ // nothing significant after
189
+ // we restart indentation 1 space after
190
+ pushStack(state, indentTemp + 1, ch);
191
+ } else {
192
+ pushStack(state, indentTemp + stream.current().length, ch); // else we match
193
+ }
194
+ }
195
+ stream.backUp(stream.current().length - 1); // undo all the eating
196
+
197
+ if(typeof state.sExprComment == "number") state.sExprComment++;
198
+
199
+ returnType = BRACKET;
200
+ } else if (ch == ")" || ch == "]") {
201
+ returnType = BRACKET;
202
+ if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) {
203
+ popStack(state);
204
+
205
+ if(typeof state.sExprComment == "number"){
206
+ if(--state.sExprComment == 0){
207
+ returnType = COMMENT; // final closing bracket
208
+ state.sExprComment = false; // turn off s-expr commenting mode
209
+ }
210
+ }
211
+ }
212
+ } else {
213
+ stream.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/);
214
+
215
+ if (keywords && keywords.propertyIsEnumerable(stream.current())) {
216
+ returnType = BUILTIN;
217
+ } else returnType = "variable";
218
+ }
219
+ }
220
+ return (typeof state.sExprComment == "number") ? COMMENT : returnType;
221
+ },
222
+
223
+ indent: function (state, textAfter) {
224
+ if (state.indentStack == null) return state.indentation;
225
+ return state.indentStack.indent;
226
+ }
227
+ };
228
+ });
229
+
230
+ CodeMirror.defineMIME("text/x-scheme", "scheme");
@@ -0,0 +1,50 @@
1
+ <!doctype html>
2
+ <meta charset=utf-8>
3
+ <title>CodeMirror: Shell mode</title>
4
+
5
+ <link rel=stylesheet href=../../lib/codemirror.css>
6
+ <link rel=stylesheet href=../../doc/docs.css>
7
+
8
+ <style type=text/css>
9
+ .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
10
+ </style>
11
+
12
+ <script src=../../lib/codemirror.js></script>
13
+ <script src=shell.js></script>
14
+
15
+ <h1>CodeMirror: Shell mode</h1>
16
+
17
+ <textarea id=code>
18
+ #!/bin/bash
19
+
20
+ # clone the repository
21
+ git clone http://github.com/garden/tree
22
+
23
+ # generate HTTPS credentials
24
+ cd tree
25
+ openssl genrsa -aes256 -out https.key 1024
26
+ openssl req -new -nodes -key https.key -out https.csr
27
+ openssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crt
28
+ cp https.key{,.orig}
29
+ openssl rsa -in https.key.orig -out https.key
30
+
31
+ # start the server in HTTPS mode
32
+ cd web
33
+ sudo node ../server.js 443 'yes' &gt;&gt; ../node.log &amp;
34
+
35
+ # here is how to stop the server
36
+ for pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do
37
+ sudo kill -9 $pid 2&gt; /dev/null
38
+ done
39
+
40
+ exit 0</textarea>
41
+
42
+ <script>
43
+ var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
44
+ mode: 'shell',
45
+ lineNumbers: true,
46
+ matchBrackets: true
47
+ });
48
+ </script>
49
+
50
+ <p><strong>MIME types defined:</strong> <code>text/x-sh</code>.</p>
@@ -0,0 +1,103 @@
1
+ CodeMirror.defineMode('shell', function(config) {
2
+
3
+ var atoms = ['true','false'],
4
+ keywords = ['if','then','do','else','elif','while','until','for','in','esac','fi','fin','fil','done','exit','set','unset','export','function'],
5
+ commands = ['ab','awk','bash','beep','cat','cc','cd','chown','chmod','chroot','clear','cp','curl','cut','diff','echo','find','gawk','gcc','get','git','grep','kill','killall','ls','make','mkdir','openssl','mv','nc','node','npm','ping','ps','restart','rm','rmdir','sed','service','sh','shopt','shred','source','sort','sleep','ssh','start','stop','su','sudo','tee','telnet','top','touch','vi','vim','wall','wc','wget','who','write','yes','zsh'];
6
+
7
+ function tokenBase(stream, state) {
8
+
9
+ var sol = stream.sol();
10
+ var ch = stream.next();
11
+
12
+ if (ch === '\'' || ch === '"' || ch === '`') {
13
+ state.tokens.unshift(tokenString(ch));
14
+ return tokenize(stream, state);
15
+ }
16
+ if (ch === '#') {
17
+ if (sol && stream.eat('!')) {
18
+ stream.skipToEnd();
19
+ return 'meta'; // 'comment'?
20
+ }
21
+ stream.skipToEnd();
22
+ return 'comment';
23
+ }
24
+ if (ch === '$') {
25
+ state.tokens.unshift(tokenDollar);
26
+ return tokenize(stream, state);
27
+ }
28
+ if (ch === '+' || ch === '=') {
29
+ return 'operator';
30
+ }
31
+ if (ch === '-') {
32
+ stream.eat('-');
33
+ stream.eatWhile(/\w/);
34
+ return 'attribute';
35
+ }
36
+ if (/\d/.test(ch)) {
37
+ stream.eatWhile(/\d/);
38
+ if(!/\w/.test(stream.peek())) {
39
+ return 'number';
40
+ }
41
+ }
42
+ stream.eatWhile(/\w/);
43
+ var cur = stream.current();
44
+ if (stream.peek() === '=' && /\w+/.test(cur)) return 'def';
45
+ if (atoms.indexOf(cur) !== -1) return 'atom';
46
+ if (commands.indexOf(cur) !== -1) return 'builtin';
47
+ if (keywords.indexOf(cur) !== -1) return 'keyword';
48
+ return 'word';
49
+ }
50
+
51
+ function tokenString(quote) {
52
+ return function(stream, state) {
53
+ var next, end = false, escaped = false;
54
+ while ((next = stream.next()) != null) {
55
+ if (next === quote && !escaped) {
56
+ end = true;
57
+ break;
58
+ }
59
+ if (next === '$' && !escaped && quote !== '\'') {
60
+ escaped = true;
61
+ stream.backUp(1);
62
+ state.tokens.unshift(tokenDollar);
63
+ break;
64
+ }
65
+ escaped = !escaped && next === '\\';
66
+ }
67
+ if (end || !escaped) {
68
+ state.tokens.shift();
69
+ }
70
+ return (quote === '`' || quote === ')' ? 'quote' : 'string');
71
+ };
72
+ };
73
+
74
+ var tokenDollar = function(stream, state) {
75
+ if (state.tokens.length > 1) stream.eat('$');
76
+ var ch = stream.next(), hungry = /\w/;
77
+ if (ch === '{') hungry = /[^}]/;
78
+ if (ch === '(') {
79
+ state.tokens[0] = tokenString(')');
80
+ return tokenize(stream, state);
81
+ }
82
+ if (!/\d/.test(ch)) {
83
+ stream.eatWhile(hungry);
84
+ stream.eat('}');
85
+ }
86
+ state.tokens.shift();
87
+ return 'def';
88
+ };
89
+
90
+ function tokenize(stream, state) {
91
+ return (state.tokens[0] || tokenBase) (stream, state);
92
+ };
93
+
94
+ return {
95
+ startState: function() {return {tokens:[]}},
96
+ token: function(stream, state) {
97
+ if (stream.eatSpace()) return null;
98
+ return tokenize(stream, state);
99
+ }
100
+ };
101
+ });
102
+
103
+ CodeMirror.defineMIME('text/x-sh', 'shell');
@@ -0,0 +1,55 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>CodeMirror: Smalltalk mode</title>
5
+ <link rel="stylesheet" href="../../lib/codemirror.css">
6
+ <script src="../../lib/codemirror.js"></script>
7
+ <script src="smalltalk.js"></script>
8
+ <link rel="stylesheet" href="../../doc/docs.css">
9
+ <style>
10
+ .CodeMirror {border: 2px solid #dee; border-right-width: 10px;}
11
+ .CodeMirror-gutter {border: none; background: #dee;}
12
+ .CodeMirror-gutter pre {color: white; font-weight: bold;}
13
+ </style>
14
+ </head>
15
+ <body>
16
+ <h1>CodeMirror: Smalltalk mode</h1>
17
+
18
+ <form><textarea id="code" name="code">
19
+ "
20
+ This is a test of the Smalltalk code
21
+ "
22
+ Seaside.WAComponent subclass: #MyCounter [
23
+ | count |
24
+ MyCounter class &gt;&gt; canBeRoot [ ^true ]
25
+
26
+ initialize [
27
+ super initialize.
28
+ count := 0.
29
+ ]
30
+ states [ ^{ self } ]
31
+ renderContentOn: html [
32
+ html heading: count.
33
+ html anchor callback: [ count := count + 1 ]; with: '++'.
34
+ html space.
35
+ html anchor callback: [ count := count - 1 ]; with: '--'.
36
+ ]
37
+ ]
38
+
39
+ MyCounter registerAsApplication: 'mycounter'
40
+ </textarea></form>
41
+
42
+ <script>
43
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
44
+ lineNumbers: true,
45
+ matchBrackets: true,
46
+ mode: "text/x-stsrc",
47
+ indentUnit: 4
48
+ });
49
+ </script>
50
+
51
+ <p>Simple Smalltalk mode.</p>
52
+
53
+ <p><strong>MIME types defined:</strong> <code>text/x-stsrc</code>.</p>
54
+ </body>
55
+ </html>
@@ -0,0 +1,139 @@
1
+ CodeMirror.defineMode('smalltalk', function(config, modeConfig) {
2
+
3
+ var specialChars = /[+\-/\\*~<>=@%|&?!.:;^]/;
4
+ var keywords = /true|false|nil|self|super|thisContext/;
5
+
6
+ var Context = function(tokenizer, parent) {
7
+ this.next = tokenizer;
8
+ this.parent = parent;
9
+ };
10
+
11
+ var Token = function(name, context, eos) {
12
+ this.name = name;
13
+ this.context = context;
14
+ this.eos = eos;
15
+ };
16
+
17
+ var State = function() {
18
+ this.context = new Context(next, null);
19
+ this.expectVariable = true;
20
+ this.indentation = 0;
21
+ this.userIndentationDelta = 0;
22
+ };
23
+
24
+ State.prototype.userIndent = function(indentation) {
25
+ this.userIndentationDelta = indentation > 0 ? (indentation / config.indentUnit - this.indentation) : 0;
26
+ };
27
+
28
+ var next = function(stream, context, state) {
29
+ var token = new Token(null, context, false);
30
+ var aChar = stream.next();
31
+
32
+ if (aChar === '"') {
33
+ token = nextComment(stream, new Context(nextComment, context));
34
+
35
+ } else if (aChar === '\'') {
36
+ token = nextString(stream, new Context(nextString, context));
37
+
38
+ } else if (aChar === '#') {
39
+ stream.eatWhile(/[^ .]/);
40
+ token.name = 'string-2';
41
+
42
+ } else if (aChar === '$') {
43
+ stream.eatWhile(/[^ ]/);
44
+ token.name = 'string-2';
45
+
46
+ } else if (aChar === '|' && state.expectVariable) {
47
+ token.context = new Context(nextTemporaries, context);
48
+
49
+ } else if (/[\[\]{}()]/.test(aChar)) {
50
+ token.name = 'bracket';
51
+ token.eos = /[\[{(]/.test(aChar);
52
+
53
+ if (aChar === '[') {
54
+ state.indentation++;
55
+ } else if (aChar === ']') {
56
+ state.indentation = Math.max(0, state.indentation - 1);
57
+ }
58
+
59
+ } else if (specialChars.test(aChar)) {
60
+ stream.eatWhile(specialChars);
61
+ token.name = 'operator';
62
+ token.eos = aChar !== ';'; // ; cascaded message expression
63
+
64
+ } else if (/\d/.test(aChar)) {
65
+ stream.eatWhile(/[\w\d]/);
66
+ token.name = 'number'
67
+
68
+ } else if (/[\w_]/.test(aChar)) {
69
+ stream.eatWhile(/[\w\d_]/);
70
+ token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null;
71
+
72
+ } else {
73
+ token.eos = state.expectVariable;
74
+ }
75
+
76
+ return token;
77
+ };
78
+
79
+ var nextComment = function(stream, context) {
80
+ stream.eatWhile(/[^"]/);
81
+ return new Token('comment', stream.eat('"') ? context.parent : context, true);
82
+ };
83
+
84
+ var nextString = function(stream, context) {
85
+ stream.eatWhile(/[^']/);
86
+ return new Token('string', stream.eat('\'') ? context.parent : context, false);
87
+ };
88
+
89
+ var nextTemporaries = function(stream, context, state) {
90
+ var token = new Token(null, context, false);
91
+ var aChar = stream.next();
92
+
93
+ if (aChar === '|') {
94
+ token.context = context.parent;
95
+ token.eos = true;
96
+
97
+ } else {
98
+ stream.eatWhile(/[^|]/);
99
+ token.name = 'variable';
100
+ }
101
+
102
+ return token;
103
+ }
104
+
105
+ return {
106
+ startState: function() {
107
+ return new State;
108
+ },
109
+
110
+ token: function(stream, state) {
111
+ state.userIndent(stream.indentation());
112
+
113
+ if (stream.eatSpace()) {
114
+ return null;
115
+ }
116
+
117
+ var token = state.context.next(stream, state.context, state);
118
+ state.context = token.context;
119
+ state.expectVariable = token.eos;
120
+
121
+ state.lastToken = token;
122
+ return token.name;
123
+ },
124
+
125
+ blankLine: function(state) {
126
+ state.userIndent(0);
127
+ },
128
+
129
+ indent: function(state, textAfter) {
130
+ var i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta;
131
+ return (state.indentation + i) * config.indentUnit;
132
+ },
133
+
134
+ electricChars: ']'
135
+ };
136
+
137
+ });
138
+
139
+ CodeMirror.defineMIME('text/x-stsrc', {name: 'smalltalk'});