active_admin_pro 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +20 -0
  3. data/README.md +5 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/javascripts/active_admin_pro.js +41 -0
  6. data/app/assets/javascripts/active_admin_pro/actions/new.js +8 -0
  7. data/app/assets/javascripts/active_admin_pro/actions/show.js +12 -0
  8. data/app/assets/javascripts/active_admin_pro/components/codemirror_input.js +92 -0
  9. data/app/assets/javascripts/active_admin_pro/components/flashes.js +9 -0
  10. data/app/assets/javascripts/active_admin_pro/components/link.js +23 -0
  11. data/app/assets/javascripts/active_admin_pro/components/phone_input.js +52 -0
  12. data/app/assets/javascripts/active_admin_pro/components/select_input.js +31 -0
  13. data/app/assets/javascripts/active_admin_pro/components/sortable_handle.js +8 -0
  14. data/app/assets/javascripts/active_admin_pro/components/summernote_input.js +132 -0
  15. data/app/assets/javascripts/active_admin_pro/components/text_input.js +47 -0
  16. data/app/assets/javascripts/active_admin_pro/components/time_zone_input.js +51 -0
  17. data/app/assets/javascripts/active_admin_pro/components/title_to_slug.js +16 -0
  18. data/app/assets/stylesheets/active_admin_pro.scss +20 -0
  19. data/app/assets/stylesheets/active_admin_pro/breakpoints.scss +3 -0
  20. data/app/assets/stylesheets/active_admin_pro/components/_input_variables.scss +9 -0
  21. data/app/assets/stylesheets/active_admin_pro/components/actions.scss +13 -0
  22. data/app/assets/stylesheets/active_admin_pro/components/boolean_input.scss +13 -0
  23. data/app/assets/stylesheets/active_admin_pro/components/button.scss +7 -0
  24. data/app/assets/stylesheets/active_admin_pro/components/check_boxes_input.scss +38 -0
  25. data/app/assets/stylesheets/active_admin_pro/components/codemirror_input.scss +53 -0
  26. data/app/assets/stylesheets/active_admin_pro/components/comments.scss +17 -0
  27. data/app/assets/stylesheets/active_admin_pro/components/datepicker.scss +108 -0
  28. data/app/assets/stylesheets/active_admin_pro/components/dialog.scss +66 -0
  29. data/app/assets/stylesheets/active_admin_pro/components/dropdown_menu_button.scss +40 -0
  30. data/app/assets/stylesheets/active_admin_pro/components/fieldset.scss +26 -0
  31. data/app/assets/stylesheets/active_admin_pro/components/file_input.scss +27 -0
  32. data/app/assets/stylesheets/active_admin_pro/components/has_many_fields.scss +4 -0
  33. data/app/assets/stylesheets/active_admin_pro/components/inline_errors.scss +7 -0
  34. data/app/assets/stylesheets/active_admin_pro/components/link.scss +16 -0
  35. data/app/assets/stylesheets/active_admin_pro/components/panel.scss +62 -0
  36. data/app/assets/stylesheets/active_admin_pro/components/phone_input.scss +31 -0
  37. data/app/assets/stylesheets/active_admin_pro/components/radio_input.scss +38 -0
  38. data/app/assets/stylesheets/active_admin_pro/components/segmented_control.scss +41 -0
  39. data/app/assets/stylesheets/active_admin_pro/components/select_input.scss +42 -0
  40. data/app/assets/stylesheets/active_admin_pro/components/sortable_handle.scss +21 -0
  41. data/app/assets/stylesheets/active_admin_pro/components/string_input.scss +85 -0
  42. data/app/assets/stylesheets/active_admin_pro/components/summernote_input.scss +190 -0
  43. data/app/assets/stylesheets/active_admin_pro/components/table.scss +100 -0
  44. data/app/assets/stylesheets/active_admin_pro/components/text_input.scss +55 -0
  45. data/app/assets/stylesheets/active_admin_pro/functions/color.scss +130 -0
  46. data/app/assets/stylesheets/active_admin_pro/functions/text-color.scss +35 -0
  47. data/app/assets/stylesheets/active_admin_pro/layout/actions/comments.scss +14 -0
  48. data/app/assets/stylesheets/active_admin_pro/layout/actions/index.scss +88 -0
  49. data/app/assets/stylesheets/active_admin_pro/layout/actions/show.scss +25 -0
  50. data/app/assets/stylesheets/active_admin_pro/layout/body.scss +60 -0
  51. data/app/assets/stylesheets/active_admin_pro/layout/desktop/action_items.scss +32 -0
  52. data/app/assets/stylesheets/active_admin_pro/layout/desktop/actions/comments.scss +10 -0
  53. data/app/assets/stylesheets/active_admin_pro/layout/desktop/active_admin_content.scss +22 -0
  54. data/app/assets/stylesheets/active_admin_pro/layout/desktop/breadcrumbs.scss +57 -0
  55. data/app/assets/stylesheets/active_admin_pro/layout/desktop/navigation.scss +197 -0
  56. data/app/assets/stylesheets/active_admin_pro/layout/desktop/sidebar.scss +5 -0
  57. data/app/assets/stylesheets/active_admin_pro/layout/desktop/title_bar.scss +24 -0
  58. data/app/assets/stylesheets/active_admin_pro/layout/desktop/wrapper.scss +5 -0
  59. data/app/assets/stylesheets/active_admin_pro/layout/filters.scss +41 -0
  60. data/app/assets/stylesheets/active_admin_pro/layout/flashes.scss +52 -0
  61. data/app/assets/stylesheets/active_admin_pro/layout/footer.scss +3 -0
  62. data/app/assets/stylesheets/active_admin_pro/layout/mobile/actions/index.scss +7 -0
  63. data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/dashboard.scss +105 -0
  64. data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/index.scss +20 -0
  65. data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/show.scss +78 -0
  66. data/app/assets/stylesheets/active_admin_pro/layout/tablet/active_admin_content.scss +9 -0
  67. data/app/assets/stylesheets/active_admin_pro/layout/tablet/flashes.scss +5 -0
  68. data/app/assets/stylesheets/active_admin_pro/layout/tablet/navigation.scss +48 -0
  69. data/app/assets/stylesheets/active_admin_pro/layout/tablet/title_bar.scss +53 -0
  70. data/app/assets/stylesheets/active_admin_pro/mixins/button.scss +48 -0
  71. data/app/assets/stylesheets/active_admin_pro/variables.scss +10 -0
  72. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon.scss +87 -0
  73. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
  74. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-color.scss +26 -0
  75. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-radius.scss +48 -0
  76. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-style.scss +25 -0
  77. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-width.scss +25 -0
  78. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_buttons.scss +64 -0
  79. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_clearfix.scss +25 -0
  80. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_ellipsis.scss +30 -0
  81. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_font-stacks.scss +31 -0
  82. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_hide-text.scss +27 -0
  83. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_margin.scss +26 -0
  84. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_padding.scss +26 -0
  85. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_position.scss +48 -0
  86. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss +66 -0
  87. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_retina-image.scss +25 -0
  88. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_size.scss +51 -0
  89. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_text-inputs.scss +113 -0
  90. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_timing-functions.scss +34 -0
  91. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_triangle.scss +63 -0
  92. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_word-wrap.scss +29 -0
  93. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_animation.scss +43 -0
  94. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_appearance.scss +3 -0
  95. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_backface-visibility.scss +3 -0
  96. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_background-image.scss +42 -0
  97. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_background.scss +55 -0
  98. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_border-image.scss +59 -0
  99. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_calc.scss +4 -0
  100. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_columns.scss +47 -0
  101. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_filter.scss +4 -0
  102. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_flex-box.scss +287 -0
  103. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_font-face.scss +24 -0
  104. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_font-feature-settings.scss +4 -0
  105. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_hidpi-media-query.scss +10 -0
  106. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_hyphens.scss +4 -0
  107. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_image-rendering.scss +14 -0
  108. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_keyframes.scss +36 -0
  109. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_linear-gradient.scss +38 -0
  110. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_perspective.scss +8 -0
  111. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_placeholder.scss +8 -0
  112. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_radial-gradient.scss +39 -0
  113. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_selection.scss +42 -0
  114. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_text-decoration.scss +19 -0
  115. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_transform.scss +15 -0
  116. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_transition.scss +71 -0
  117. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_user-select.scss +3 -0
  118. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_assign-inputs.scss +11 -0
  119. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_contains-falsy.scss +20 -0
  120. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_contains.scss +26 -0
  121. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-length.scss +11 -0
  122. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-light.scss +21 -0
  123. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-number.scss +11 -0
  124. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-size.scss +13 -0
  125. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_modular-scale.scss +69 -0
  126. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_px-to-em.scss +13 -0
  127. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_px-to-rem.scss +15 -0
  128. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_shade.scss +24 -0
  129. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_strip-units.scss +17 -0
  130. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_tint.scss +24 -0
  131. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_transition-property-name.scss +22 -0
  132. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_unpack.scss +27 -0
  133. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_convert-units.scss +21 -0
  134. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_directional-values.scss +96 -0
  135. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_font-source-declaration.scss +43 -0
  136. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  137. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-angle-parser.scss +25 -0
  138. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-gradient-parser.scss +41 -0
  139. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-positions-parser.scss +61 -0
  140. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
  141. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-arg-parser.scss +69 -0
  142. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-gradient-parser.scss +50 -0
  143. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-positions-parser.scss +18 -0
  144. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_render-gradients.scss +26 -0
  145. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_shape-size-stripper.scss +10 -0
  146. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_str-to-num.scss +50 -0
  147. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_asset-pipeline.scss +7 -0
  148. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_prefixer.scss +9 -0
  149. data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_px-to-em.scss +1 -0
  150. data/app/assets/stylesheets/active_admin_pro/vendor/neat.scss +22 -0
  151. data/app/assets/stylesheets/active_admin_pro/vendor/neat/_neat-helpers.scss +8 -0
  152. data/app/assets/stylesheets/active_admin_pro/vendor/neat/functions/_new-breakpoint.scss +49 -0
  153. data/app/assets/stylesheets/active_admin_pro/vendor/neat/functions/_private.scss +108 -0
  154. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_box-sizing.scss +11 -0
  155. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_direction-context.scss +31 -0
  156. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_display-context.scss +26 -0
  157. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_fill-parent.scss +22 -0
  158. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_media.scss +92 -0
  159. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_omega.scss +91 -0
  160. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_outer-container.scss +36 -0
  161. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_pad.scss +23 -0
  162. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_private.scss +35 -0
  163. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_row.scss +53 -0
  164. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_shift.scss +48 -0
  165. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_span-columns.scss +90 -0
  166. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_to-deprecate.scss +105 -0
  167. data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_visual-grid.scss +40 -0
  168. data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_disable-warnings.scss +11 -0
  169. data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_grid.scss +53 -0
  170. data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_visual-grid.scss +25 -0
  171. data/app/assets/stylesheets/active_admin_pro/vendor/normalize.css +423 -0
  172. data/app/assets/stylesheets/codemirror/themes/activeadmin_pro.scss +117 -0
  173. data/app/inputs/codemirror_input.rb +27 -0
  174. data/app/inputs/datepicker_input.rb +16 -0
  175. data/app/inputs/phone_input.rb +5 -0
  176. data/app/inputs/summernote_input.rb +5 -0
  177. data/app/inputs/time_zone_input.rb +43 -0
  178. data/app/models/activeadmin_pro/summernote_image.rb +5 -0
  179. data/config/initializers/active_admin.rb +50 -0
  180. data/config/locales/en.yml +55 -0
  181. data/lib/active_admin_pro/admin_user/admin_user.rb +52 -0
  182. data/lib/active_admin_pro/engine.rb +8 -0
  183. data/lib/active_admin_pro/summernote_image/summernote_image.rb +61 -0
  184. data/lib/active_admin_pro/user/user.rb +53 -0
  185. data/lib/active_admin_pro/version.rb +3 -0
  186. data/lib/activeadmin_pro.rb +9 -0
  187. data/lib/generators/activeadmin_pro/install_generator.rb +14 -0
  188. data/lib/tasks/activeadmin_pro_tasks.rake +4 -0
  189. data/spec/spec_helper.rb +34 -0
  190. data/vendor/assets/javascripts/bootstrap.js +1243 -0
  191. data/vendor/assets/javascripts/codemirror.js +8887 -0
  192. data/vendor/assets/javascripts/codemirror/addons/comment/comment.js +183 -0
  193. data/vendor/assets/javascripts/codemirror/addons/comment/continuecomment.js +85 -0
  194. data/vendor/assets/javascripts/codemirror/addons/dialog/dialog.css +32 -0
  195. data/vendor/assets/javascripts/codemirror/addons/dialog/dialog.js +157 -0
  196. data/vendor/assets/javascripts/codemirror/addons/display/autorefresh.js +47 -0
  197. data/vendor/assets/javascripts/codemirror/addons/display/fullscreen.css +6 -0
  198. data/vendor/assets/javascripts/codemirror/addons/display/fullscreen.js +41 -0
  199. data/vendor/assets/javascripts/codemirror/addons/display/panel.js +112 -0
  200. data/vendor/assets/javascripts/codemirror/addons/display/placeholder.js +60 -0
  201. data/vendor/assets/javascripts/codemirror/addons/display/rulers.js +63 -0
  202. data/vendor/assets/javascripts/codemirror/addons/edit/closebrackets.js +195 -0
  203. data/vendor/assets/javascripts/codemirror/addons/edit/closetag.js +169 -0
  204. data/vendor/assets/javascripts/codemirror/addons/edit/continuelist.js +51 -0
  205. data/vendor/assets/javascripts/codemirror/addons/edit/matchbrackets.js +120 -0
  206. data/vendor/assets/javascripts/codemirror/addons/edit/matchtags.js +66 -0
  207. data/vendor/assets/javascripts/codemirror/addons/edit/trailingspace.js +27 -0
  208. data/vendor/assets/javascripts/codemirror/addons/fold/brace-fold.js +105 -0
  209. data/vendor/assets/javascripts/codemirror/addons/fold/comment-fold.js +57 -0
  210. data/vendor/assets/javascripts/codemirror/addons/fold/foldcode.js +149 -0
  211. data/vendor/assets/javascripts/codemirror/addons/fold/foldgutter.css +20 -0
  212. data/vendor/assets/javascripts/codemirror/addons/fold/foldgutter.js +146 -0
  213. data/vendor/assets/javascripts/codemirror/addons/fold/indent-fold.js +44 -0
  214. data/vendor/assets/javascripts/codemirror/addons/fold/markdown-fold.js +49 -0
  215. data/vendor/assets/javascripts/codemirror/addons/fold/xml-fold.js +182 -0
  216. data/vendor/assets/javascripts/codemirror/addons/hint/anyword-hint.js +41 -0
  217. data/vendor/assets/javascripts/codemirror/addons/hint/css-hint.js +60 -0
  218. data/vendor/assets/javascripts/codemirror/addons/hint/html-hint.js +348 -0
  219. data/vendor/assets/javascripts/codemirror/addons/hint/javascript-hint.js +146 -0
  220. data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.css +38 -0
  221. data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.js +386 -0
  222. data/vendor/assets/javascripts/codemirror/addons/hint/sql-hint.js +254 -0
  223. data/vendor/assets/javascripts/codemirror/addons/hint/xml-hint.js +110 -0
  224. data/vendor/assets/javascripts/codemirror/addons/lint/coffeescript-lint.js +41 -0
  225. data/vendor/assets/javascripts/codemirror/addons/lint/css-lint.js +35 -0
  226. data/vendor/assets/javascripts/codemirror/addons/lint/html-lint.js +46 -0
  227. data/vendor/assets/javascripts/codemirror/addons/lint/javascript-lint.js +136 -0
  228. data/vendor/assets/javascripts/codemirror/addons/lint/json-lint.js +31 -0
  229. data/vendor/assets/javascripts/codemirror/addons/lint/lint.css +73 -0
  230. data/vendor/assets/javascripts/codemirror/addons/lint/lint.js +231 -0
  231. data/vendor/assets/javascripts/codemirror/addons/lint/yaml-lint.js +28 -0
  232. data/vendor/assets/javascripts/codemirror/addons/merge/merge.css +112 -0
  233. data/vendor/assets/javascripts/codemirror/addons/merge/merge.js +775 -0
  234. data/vendor/assets/javascripts/codemirror/addons/mode/loadmode.js +64 -0
  235. data/vendor/assets/javascripts/codemirror/addons/mode/multiplex.js +123 -0
  236. data/vendor/assets/javascripts/codemirror/addons/mode/multiplex_test.js +33 -0
  237. data/vendor/assets/javascripts/codemirror/addons/mode/overlay.js +85 -0
  238. data/vendor/assets/javascripts/codemirror/addons/mode/simple.js +213 -0
  239. data/vendor/assets/javascripts/codemirror/addons/runmode/colorize.js +40 -0
  240. data/vendor/assets/javascripts/codemirror/addons/runmode/runmode-standalone.js +157 -0
  241. data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.js +72 -0
  242. data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.node.js +178 -0
  243. data/vendor/assets/javascripts/codemirror/addons/scroll/annotatescrollbar.js +115 -0
  244. data/vendor/assets/javascripts/codemirror/addons/scroll/scrollpastend.js +46 -0
  245. data/vendor/assets/javascripts/codemirror/addons/scroll/simplescrollbars.css +66 -0
  246. data/vendor/assets/javascripts/codemirror/addons/scroll/simplescrollbars.js +147 -0
  247. data/vendor/assets/javascripts/codemirror/addons/search/match-highlighter.js +128 -0
  248. data/vendor/assets/javascripts/codemirror/addons/search/matchesonscrollbar.css +8 -0
  249. data/vendor/assets/javascripts/codemirror/addons/search/matchesonscrollbar.js +97 -0
  250. data/vendor/assets/javascripts/codemirror/addons/search/search.js +228 -0
  251. data/vendor/assets/javascripts/codemirror/addons/search/searchcursor.js +189 -0
  252. data/vendor/assets/javascripts/codemirror/addons/selection/active-line.js +71 -0
  253. data/vendor/assets/javascripts/codemirror/addons/selection/mark-selection.js +118 -0
  254. data/vendor/assets/javascripts/codemirror/addons/selection/selection-pointer.js +98 -0
  255. data/vendor/assets/javascripts/codemirror/addons/tern/tern.css +87 -0
  256. data/vendor/assets/javascripts/codemirror/addons/tern/tern.js +700 -0
  257. data/vendor/assets/javascripts/codemirror/addons/tern/worker.js +44 -0
  258. data/vendor/assets/javascripts/codemirror/addons/wrap/hardwrap.js +139 -0
  259. data/vendor/assets/javascripts/codemirror/modes/coffeescript.js +366 -0
  260. data/vendor/assets/javascripts/codemirror/modes/css.js +823 -0
  261. data/vendor/assets/javascripts/codemirror/modes/diff.js +47 -0
  262. data/vendor/assets/javascripts/codemirror/modes/dockerfile.js +79 -0
  263. data/vendor/assets/javascripts/codemirror/modes/gfm.js +130 -0
  264. data/vendor/assets/javascripts/codemirror/modes/go.js +185 -0
  265. data/vendor/assets/javascripts/codemirror/modes/haml.js +159 -0
  266. data/vendor/assets/javascripts/codemirror/modes/handlebars.js +53 -0
  267. data/vendor/assets/javascripts/codemirror/modes/htmlembedded.js +28 -0
  268. data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +150 -0
  269. data/vendor/assets/javascripts/codemirror/modes/javascript.js +708 -0
  270. data/vendor/assets/javascripts/codemirror/modes/markdown.js +792 -0
  271. data/vendor/assets/javascripts/codemirror/modes/nginx.js +178 -0
  272. data/vendor/assets/javascripts/codemirror/modes/php.js +234 -0
  273. data/vendor/assets/javascripts/codemirror/modes/python.js +358 -0
  274. data/vendor/assets/javascripts/codemirror/modes/ruby.js +285 -0
  275. data/vendor/assets/javascripts/codemirror/modes/rust.js +58 -0
  276. data/vendor/assets/javascripts/codemirror/modes/sass.js +414 -0
  277. data/vendor/assets/javascripts/codemirror/modes/shell.js +139 -0
  278. data/vendor/assets/javascripts/codemirror/modes/xml.js +385 -0
  279. data/vendor/assets/javascripts/codemirror/modes/yaml.js +117 -0
  280. data/vendor/assets/javascripts/intl-tel-input.js +963 -0
  281. data/vendor/assets/javascripts/intl-tel-utils.js +480 -0
  282. data/vendor/assets/javascripts/slug.js +212 -0
  283. data/vendor/assets/javascripts/summernote.js +6939 -0
  284. data/vendor/assets/stylesheets/codemirror.css +334 -0
  285. data/vendor/assets/stylesheets/codemirror/themes/base16-dark.css +38 -0
  286. data/vendor/assets/stylesheets/codemirror/themes/base16-light.css +38 -0
  287. data/vendor/assets/stylesheets/codemirror/themes/dracula.css +41 -0
  288. data/vendor/assets/stylesheets/codemirror/themes/material.css +53 -0
  289. data/vendor/assets/stylesheets/codemirror/themes/monokai.css +35 -0
  290. data/vendor/assets/stylesheets/codemirror/themes/solarized.css +163 -0
  291. data/vendor/assets/stylesheets/codemirror/themes/vibrant-ink.css +34 -0
  292. data/vendor/assets/stylesheets/intl-tel-input.scss +1054 -0
  293. data/vendor/assets/stylesheets/summernote-bs3.css +5425 -0
  294. data/vendor/assets/stylesheets/summernote.css +1 -0
  295. metadata +604 -0
@@ -0,0 +1,183 @@
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
+ var noOptions = {};
15
+ var nonWS = /[^\s\u00a0]/;
16
+ var Pos = CodeMirror.Pos;
17
+
18
+ function firstNonWS(str) {
19
+ var found = str.search(nonWS);
20
+ return found == -1 ? 0 : found;
21
+ }
22
+
23
+ CodeMirror.commands.toggleComment = function(cm) {
24
+ var minLine = Infinity, ranges = cm.listSelections(), mode = null;
25
+ for (var i = ranges.length - 1; i >= 0; i--) {
26
+ var from = ranges[i].from(), to = ranges[i].to();
27
+ if (from.line >= minLine) continue;
28
+ if (to.line >= minLine) to = Pos(minLine, 0);
29
+ minLine = from.line;
30
+ if (mode == null) {
31
+ if (cm.uncomment(from, to)) mode = "un";
32
+ else { cm.lineComment(from, to); mode = "line"; }
33
+ } else if (mode == "un") {
34
+ cm.uncomment(from, to);
35
+ } else {
36
+ cm.lineComment(from, to);
37
+ }
38
+ }
39
+ };
40
+
41
+ CodeMirror.defineExtension("lineComment", function(from, to, options) {
42
+ if (!options) options = noOptions;
43
+ var self = this, mode = self.getModeAt(from);
44
+ var commentString = options.lineComment || mode.lineComment;
45
+ if (!commentString) {
46
+ if (options.blockCommentStart || mode.blockCommentStart) {
47
+ options.fullLines = true;
48
+ self.blockComment(from, to, options);
49
+ }
50
+ return;
51
+ }
52
+ var firstLine = self.getLine(from.line);
53
+ if (firstLine == null) return;
54
+ var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);
55
+ var pad = options.padding == null ? " " : options.padding;
56
+ var blankLines = options.commentBlankLines || from.line == to.line;
57
+
58
+ self.operation(function() {
59
+ if (options.indent) {
60
+ var baseString = firstLine.slice(0, firstNonWS(firstLine));
61
+ for (var i = from.line; i < end; ++i) {
62
+ var line = self.getLine(i), cut = baseString.length;
63
+ if (!blankLines && !nonWS.test(line)) continue;
64
+ if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
65
+ self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
66
+ }
67
+ } else {
68
+ for (var i = from.line; i < end; ++i) {
69
+ if (blankLines || nonWS.test(self.getLine(i)))
70
+ self.replaceRange(commentString + pad, Pos(i, 0));
71
+ }
72
+ }
73
+ });
74
+ });
75
+
76
+ CodeMirror.defineExtension("blockComment", function(from, to, options) {
77
+ if (!options) options = noOptions;
78
+ var self = this, mode = self.getModeAt(from);
79
+ var startString = options.blockCommentStart || mode.blockCommentStart;
80
+ var endString = options.blockCommentEnd || mode.blockCommentEnd;
81
+ if (!startString || !endString) {
82
+ if ((options.lineComment || mode.lineComment) && options.fullLines != false)
83
+ self.lineComment(from, to, options);
84
+ return;
85
+ }
86
+
87
+ var end = Math.min(to.line, self.lastLine());
88
+ if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
89
+
90
+ var pad = options.padding == null ? " " : options.padding;
91
+ if (from.line > end) return;
92
+
93
+ self.operation(function() {
94
+ if (options.fullLines != false) {
95
+ var lastLineHasText = nonWS.test(self.getLine(end));
96
+ self.replaceRange(pad + endString, Pos(end));
97
+ self.replaceRange(startString + pad, Pos(from.line, 0));
98
+ var lead = options.blockCommentLead || mode.blockCommentLead;
99
+ if (lead != null) for (var i = from.line + 1; i <= end; ++i)
100
+ if (i != end || lastLineHasText)
101
+ self.replaceRange(lead + pad, Pos(i, 0));
102
+ } else {
103
+ self.replaceRange(endString, to);
104
+ self.replaceRange(startString, from);
105
+ }
106
+ });
107
+ });
108
+
109
+ CodeMirror.defineExtension("uncomment", function(from, to, options) {
110
+ if (!options) options = noOptions;
111
+ var self = this, mode = self.getModeAt(from);
112
+ var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);
113
+
114
+ // Try finding line comments
115
+ var lineString = options.lineComment || mode.lineComment, lines = [];
116
+ var pad = options.padding == null ? " " : options.padding, didSomething;
117
+ lineComment: {
118
+ if (!lineString) break lineComment;
119
+ for (var i = start; i <= end; ++i) {
120
+ var line = self.getLine(i);
121
+ var found = line.indexOf(lineString);
122
+ if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
123
+ if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment;
124
+ if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
125
+ lines.push(line);
126
+ }
127
+ self.operation(function() {
128
+ for (var i = start; i <= end; ++i) {
129
+ var line = lines[i - start];
130
+ var pos = line.indexOf(lineString), endPos = pos + lineString.length;
131
+ if (pos < 0) continue;
132
+ if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;
133
+ didSomething = true;
134
+ self.replaceRange("", Pos(i, pos), Pos(i, endPos));
135
+ }
136
+ });
137
+ if (didSomething) return true;
138
+ }
139
+
140
+ // Try block comments
141
+ var startString = options.blockCommentStart || mode.blockCommentStart;
142
+ var endString = options.blockCommentEnd || mode.blockCommentEnd;
143
+ if (!startString || !endString) return false;
144
+ var lead = options.blockCommentLead || mode.blockCommentLead;
145
+ var startLine = self.getLine(start), endLine = end == start ? startLine : self.getLine(end);
146
+ var open = startLine.indexOf(startString), close = endLine.lastIndexOf(endString);
147
+ if (close == -1 && start != end) {
148
+ endLine = self.getLine(--end);
149
+ close = endLine.lastIndexOf(endString);
150
+ }
151
+ if (open == -1 || close == -1 ||
152
+ !/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||
153
+ !/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))
154
+ return false;
155
+
156
+ // Avoid killing block comments completely outside the selection.
157
+ // Positions of the last startString before the start of the selection, and the first endString after it.
158
+ var lastStart = startLine.lastIndexOf(startString, from.ch);
159
+ var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);
160
+ if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;
161
+ // Positions of the first endString after the end of the selection, and the last startString before it.
162
+ firstEnd = endLine.indexOf(endString, to.ch);
163
+ var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);
164
+ lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;
165
+ if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;
166
+
167
+ self.operation(function() {
168
+ self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),
169
+ Pos(end, close + endString.length));
170
+ var openEnd = open + startString.length;
171
+ if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;
172
+ self.replaceRange("", Pos(start, open), Pos(start, openEnd));
173
+ if (lead) for (var i = start + 1; i <= end; ++i) {
174
+ var line = self.getLine(i), found = line.indexOf(lead);
175
+ if (found == -1 || nonWS.test(line.slice(0, found))) continue;
176
+ var foundEnd = found + lead.length;
177
+ if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;
178
+ self.replaceRange("", Pos(i, found), Pos(i, foundEnd));
179
+ }
180
+ });
181
+ return true;
182
+ });
183
+ });
@@ -0,0 +1,85 @@
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
+ var modes = ["clike", "css", "javascript"];
13
+
14
+ for (var i = 0; i < modes.length; ++i)
15
+ CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "});
16
+
17
+ function continueComment(cm) {
18
+ if (cm.getOption("disableInput")) return CodeMirror.Pass;
19
+ var ranges = cm.listSelections(), mode, inserts = [];
20
+ for (var i = 0; i < ranges.length; i++) {
21
+ var pos = ranges[i].head, token = cm.getTokenAt(pos);
22
+ if (token.type != "comment") return CodeMirror.Pass;
23
+ var modeHere = CodeMirror.innerMode(cm.getMode(), token.state).mode;
24
+ if (!mode) mode = modeHere;
25
+ else if (mode != modeHere) return CodeMirror.Pass;
26
+
27
+ var insert = null;
28
+ if (mode.blockCommentStart && mode.blockCommentContinue) {
29
+ var end = token.string.indexOf(mode.blockCommentEnd);
30
+ var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;
31
+ if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {
32
+ // Comment ended, don't continue it
33
+ } else if (token.string.indexOf(mode.blockCommentStart) == 0) {
34
+ insert = full.slice(0, token.start);
35
+ if (!/^\s*$/.test(insert)) {
36
+ insert = "";
37
+ for (var j = 0; j < token.start; ++j) insert += " ";
38
+ }
39
+ } else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&
40
+ found + mode.blockCommentContinue.length > token.start &&
41
+ /^\s*$/.test(full.slice(0, found))) {
42
+ insert = full.slice(0, found);
43
+ }
44
+ if (insert != null) insert += mode.blockCommentContinue;
45
+ }
46
+ if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {
47
+ var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);
48
+ if (found > -1) {
49
+ insert = line.slice(0, found);
50
+ if (/\S/.test(insert)) insert = null;
51
+ else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\s*/)[0];
52
+ }
53
+ }
54
+ if (insert == null) return CodeMirror.Pass;
55
+ inserts[i] = "\n" + insert;
56
+ }
57
+
58
+ cm.operation(function() {
59
+ for (var i = ranges.length - 1; i >= 0; i--)
60
+ cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), "+insert");
61
+ });
62
+ }
63
+
64
+ function continueLineCommentEnabled(cm) {
65
+ var opt = cm.getOption("continueComments");
66
+ if (opt && typeof opt == "object")
67
+ return opt.continueLineComment !== false;
68
+ return true;
69
+ }
70
+
71
+ CodeMirror.defineOption("continueComments", null, function(cm, val, prev) {
72
+ if (prev && prev != CodeMirror.Init)
73
+ cm.removeKeyMap("continueComment");
74
+ if (val) {
75
+ var key = "Enter";
76
+ if (typeof val == "string")
77
+ key = val;
78
+ else if (typeof val == "object" && val.key)
79
+ key = val.key;
80
+ var map = {name: "continueComment"};
81
+ map[key] = continueComment;
82
+ cm.addKeyMap(map);
83
+ }
84
+ });
85
+ });
@@ -0,0 +1,32 @@
1
+ .CodeMirror-dialog {
2
+ position: absolute;
3
+ left: 0; right: 0;
4
+ background: inherit;
5
+ z-index: 15;
6
+ padding: .1em .8em;
7
+ overflow: hidden;
8
+ color: inherit;
9
+ }
10
+
11
+ .CodeMirror-dialog-top {
12
+ border-bottom: 1px solid #eee;
13
+ top: 0;
14
+ }
15
+
16
+ .CodeMirror-dialog-bottom {
17
+ border-top: 1px solid #eee;
18
+ bottom: 0;
19
+ }
20
+
21
+ .CodeMirror-dialog input {
22
+ border: none;
23
+ outline: none;
24
+ background: transparent;
25
+ width: 20em;
26
+ color: inherit;
27
+ font-family: monospace;
28
+ }
29
+
30
+ .CodeMirror-dialog button {
31
+ font-size: 70%;
32
+ }
@@ -0,0 +1,157 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ // Open simple dialogs on top of an editor. Relies on dialog.css.
5
+
6
+ (function(mod) {
7
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
8
+ mod(require("../../lib/codemirror"));
9
+ else if (typeof define == "function" && define.amd) // AMD
10
+ define(["../../lib/codemirror"], mod);
11
+ else // Plain browser env
12
+ mod(CodeMirror);
13
+ })(function(CodeMirror) {
14
+ function dialogDiv(cm, template, bottom) {
15
+ var wrap = cm.getWrapperElement();
16
+ var dialog;
17
+ dialog = wrap.appendChild(document.createElement("div"));
18
+ if (bottom)
19
+ dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
20
+ else
21
+ dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
22
+
23
+ if (typeof template == "string") {
24
+ dialog.innerHTML = template;
25
+ } else { // Assuming it's a detached DOM element.
26
+ dialog.appendChild(template);
27
+ }
28
+ return dialog;
29
+ }
30
+
31
+ function closeNotification(cm, newVal) {
32
+ if (cm.state.currentNotificationClose)
33
+ cm.state.currentNotificationClose();
34
+ cm.state.currentNotificationClose = newVal;
35
+ }
36
+
37
+ CodeMirror.defineExtension("openDialog", function(template, callback, options) {
38
+ if (!options) options = {};
39
+
40
+ closeNotification(this, null);
41
+
42
+ var dialog = dialogDiv(this, template, options.bottom);
43
+ var closed = false, me = this;
44
+ function close(newVal) {
45
+ if (typeof newVal == 'string') {
46
+ inp.value = newVal;
47
+ } else {
48
+ if (closed) return;
49
+ closed = true;
50
+ dialog.parentNode.removeChild(dialog);
51
+ me.focus();
52
+
53
+ if (options.onClose) options.onClose(dialog);
54
+ }
55
+ }
56
+
57
+ var inp = dialog.getElementsByTagName("input")[0], button;
58
+ if (inp) {
59
+ if (options.value) {
60
+ inp.value = options.value;
61
+ if (options.selectValueOnOpen !== false) {
62
+ inp.select();
63
+ }
64
+ }
65
+
66
+ if (options.onInput)
67
+ CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
68
+ if (options.onKeyUp)
69
+ CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
70
+
71
+ CodeMirror.on(inp, "keydown", function(e) {
72
+ if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
73
+ if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {
74
+ inp.blur();
75
+ CodeMirror.e_stop(e);
76
+ close();
77
+ }
78
+ if (e.keyCode == 13) callback(inp.value, e);
79
+ });
80
+
81
+ if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
82
+
83
+ inp.focus();
84
+ } else if (button = dialog.getElementsByTagName("button")[0]) {
85
+ CodeMirror.on(button, "click", function() {
86
+ close();
87
+ me.focus();
88
+ });
89
+
90
+ if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
91
+
92
+ button.focus();
93
+ }
94
+ return close;
95
+ });
96
+
97
+ CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {
98
+ closeNotification(this, null);
99
+ var dialog = dialogDiv(this, template, options && options.bottom);
100
+ var buttons = dialog.getElementsByTagName("button");
101
+ var closed = false, me = this, blurring = 1;
102
+ function close() {
103
+ if (closed) return;
104
+ closed = true;
105
+ dialog.parentNode.removeChild(dialog);
106
+ me.focus();
107
+ }
108
+ buttons[0].focus();
109
+ for (var i = 0; i < buttons.length; ++i) {
110
+ var b = buttons[i];
111
+ (function(callback) {
112
+ CodeMirror.on(b, "click", function(e) {
113
+ CodeMirror.e_preventDefault(e);
114
+ close();
115
+ if (callback) callback(me);
116
+ });
117
+ })(callbacks[i]);
118
+ CodeMirror.on(b, "blur", function() {
119
+ --blurring;
120
+ setTimeout(function() { if (blurring <= 0) close(); }, 200);
121
+ });
122
+ CodeMirror.on(b, "focus", function() { ++blurring; });
123
+ }
124
+ });
125
+
126
+ /*
127
+ * openNotification
128
+ * Opens a notification, that can be closed with an optional timer
129
+ * (default 5000ms timer) and always closes on click.
130
+ *
131
+ * If a notification is opened while another is opened, it will close the
132
+ * currently opened one and open the new one immediately.
133
+ */
134
+ CodeMirror.defineExtension("openNotification", function(template, options) {
135
+ closeNotification(this, close);
136
+ var dialog = dialogDiv(this, template, options && options.bottom);
137
+ var closed = false, doneTimer;
138
+ var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;
139
+
140
+ function close() {
141
+ if (closed) return;
142
+ closed = true;
143
+ clearTimeout(doneTimer);
144
+ dialog.parentNode.removeChild(dialog);
145
+ }
146
+
147
+ CodeMirror.on(dialog, 'click', function(e) {
148
+ CodeMirror.e_preventDefault(e);
149
+ close();
150
+ });
151
+
152
+ if (duration)
153
+ doneTimer = setTimeout(close, duration);
154
+
155
+ return close;
156
+ });
157
+ });