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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a954ba08649abd802e872ac998d9a43f1a14397c
4
+ data.tar.gz: a4e8beb920bea0af3a3c66cb68ada4c6ccb1d6fd
5
+ SHA512:
6
+ metadata.gz: 9f474423139c52329705a2fe72c12ff84744e390904e9f2f85e8551938a3fb8f7df74b21c878f5a1e1091bc20b84cef02f56e5674399c1aebb40cb46330130e9
7
+ data.tar.gz: 586b7090ca79cd73c7c2b23fcf40d0777d8bfdfa442dca8102ff00e4175267721a0719d7642b77459abe740401dd6cd0c233dff7ac19c72cf1195a71bc679819
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2015 Brian Pattison
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Active Admin Pro
2
+
3
+ A collection of styles and scripts that make Active Admin better.
4
+
5
+ **NOT PRODUCTION READY... YET**
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require "bundler/setup"
3
+ rescue LoadError
4
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
5
+ end
6
+
7
+ require "rdoc/task"
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = "rdoc"
11
+ rdoc.title = "ActiveAdminPro"
12
+ rdoc.options << "--line-numbers"
13
+ rdoc.rdoc_files.include("README.rdoc")
14
+ rdoc.rdoc_files.include("lib/**/*.rb")
15
+ end
16
+
17
+
18
+
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require "rake/testtask"
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << "lib"
28
+ t.libs << "test"
29
+ t.pattern = "test/**/*_test.rb"
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task default: :test
@@ -0,0 +1,41 @@
1
+ /* globals Turbolinks */
2
+ //= require active_admin/base
3
+ //= require activeadmin-sortable
4
+ //= require turbolinks
5
+ //= require_self
6
+ //= require_tree ./active_admin_pro
7
+
8
+ // The app is fully ready for enabling transition cache,
9
+ // but I can't quite prevent all elements from flashing on load.
10
+ // Turbolinks.enableTransitionCache();
11
+ Turbolinks.enableProgressBar();
12
+
13
+ // I was struggling to get everything to fire off every page load,
14
+ // but only once per page load, so I came up with crap.
15
+ //
16
+ // Usage:
17
+ //
18
+ // App.ready(function() {
19
+ // console.log('This will be called once after every page load.');
20
+ // });
21
+ if (window.App === undefined) {
22
+ window.App = {
23
+ initialized: false,
24
+ initializers: []
25
+ };
26
+ }
27
+
28
+ App.ready = function(readyFunction) {
29
+ if (!App.initialized) {
30
+ App.initializers.push(readyFunction);
31
+ }
32
+ };
33
+
34
+ if (!App.initialized) {
35
+ $(document).on('ready page:load', function() {
36
+ $.each(App.initializers, function(index, initializer) {
37
+ initializer();
38
+ });
39
+ App.initialized = true;
40
+ });
41
+ }
@@ -0,0 +1,8 @@
1
+ // Enable dropdown for multiple actions on show pages.
2
+ App.ready(function() {
3
+ "use strict";
4
+
5
+ setTimeout(function() {
6
+ $('body.new #main_content form input:not([type="hidden"]):first').focus();
7
+ }, 10);
8
+ });
@@ -0,0 +1,12 @@
1
+ // Enable dropdown for multiple actions on show pages.
2
+ App.ready(function() {
3
+ "use strict";
4
+
5
+ $('body.show #titlebar_right').click(function() {
6
+ $(this).toggleClass('active');
7
+ });
8
+
9
+ $('body.show #active_admin_content').click(function() {
10
+ $('body.show #titlebar_right').removeClass('active');
11
+ });
12
+ });
@@ -0,0 +1,92 @@
1
+ //= require codemirror
2
+ //= require codemirror/addons/edit/closebrackets
3
+ //= require codemirror/addons/edit/closetag
4
+ //= require codemirror/addons/edit/continuelist
5
+ //= require codemirror/addons/edit/matchbrackets
6
+ //= require codemirror/addons/edit/matchtags
7
+ //= require codemirror/addons/fold/xml-fold
8
+ //= require codemirror/addons/mode/loadmode
9
+ //= require codemirror/addons/mode/multiplex
10
+ //= require codemirror/addons/mode/overlay
11
+ //= require codemirror/addons/mode/simple
12
+ //= require codemirror/addons/search/search
13
+ //= require codemirror/modes/coffeescript
14
+ //= require codemirror/modes/css
15
+ //= require codemirror/modes/diff
16
+ //= require codemirror/modes/dockerfile
17
+ //= require codemirror/modes/gfm
18
+ //= require codemirror/modes/go
19
+ //= require codemirror/modes/haml
20
+ //= require codemirror/modes/handlebars
21
+ //= require codemirror/modes/htmlembedded
22
+ //= require codemirror/modes/htmlmixed
23
+ //= require codemirror/modes/javascript
24
+ //= require codemirror/modes/markdown
25
+ //= require codemirror/modes/nginx
26
+ //= require codemirror/modes/php
27
+ //= require codemirror/modes/python
28
+ //= require codemirror/modes/ruby
29
+ //= require codemirror/modes/rust
30
+ //= require codemirror/modes/sass
31
+ //= require codemirror/modes/shell
32
+ //= require codemirror/modes/xml
33
+ //= require codemirror/modes/yaml
34
+ /* globals CodeMirror */
35
+
36
+ // CodeMirror editor field.
37
+ // @see https://codemirror.net
38
+ App.ready(function() {
39
+ "use strict";
40
+
41
+ var codemirrorInputs, windowElement;
42
+
43
+ function activateBehavior() {
44
+ codemirrorInputs = $('.input.codemirror');
45
+ windowElement = $(window);
46
+
47
+ codemirrorInputs.each(function() {
48
+ var wrapper = $(this);
49
+ var textarea = wrapper.find('textarea');
50
+ var codemirrorOptions = textarea.data('codemirror');
51
+
52
+ // By default, use spaces instead of tabs
53
+ if (typeof(codemirrorOptions.extraKeys.Tab) !== 'function') {
54
+ codemirrorOptions.extraKeys.Tab = function(cm) {
55
+ var spaces = new Array(cm.getOption('indentUnit') + 1).join(' ');
56
+ cm.replaceSelection(spaces);
57
+ };
58
+ }
59
+
60
+ // Initialize the Code Mirror editor with the given options
61
+ var codemirrorInput = CodeMirror.fromTextArea(textarea[0], codemirrorOptions);
62
+
63
+ wrapper.find('label').click(function() {
64
+ codemirrorInput.focus();
65
+ });
66
+
67
+ codemirrorInput.on('focus', function() {
68
+ wrapper.addClass('focused');
69
+ });
70
+
71
+ codemirrorInput.on('blur', function() {
72
+ wrapper.removeClass('focused');
73
+ });
74
+ });
75
+
76
+ resizeCodemirrorInputs();
77
+ windowElement.resize(resizeCodemirrorInputs);
78
+ }
79
+
80
+ // Code Mirror works best when there is a fixed width on its container, so
81
+ // let's detect the size the container is without the input and set the width.
82
+ function resizeCodemirrorInputs() {
83
+ codemirrorInputs.each(function() {
84
+ var wrapper = $(this);
85
+ wrapper.hide();
86
+ wrapper.css('width', wrapper.parent().innerWidth() + 'px');
87
+ wrapper.show();
88
+ });
89
+ }
90
+
91
+ activateBehavior();
92
+ });
@@ -0,0 +1,9 @@
1
+ // Add active class on click to style while loading via turbolinks.
2
+ App.ready(function() {
3
+ "use strict";
4
+
5
+ $('.flashes').addClass('animate');
6
+ $(document).on('page:before-change', function() {
7
+ $('.flashes').removeClass('animate');
8
+ });
9
+ });
@@ -0,0 +1,23 @@
1
+ App.ready(function() {
2
+ "use strict";
3
+ var body = $('body');
4
+ var links = $('a:not([data-method="delete"]):not([data-action="destroy"]):not(.has_many_add):not(.dropdown_menu_button):not([target="_blank"])');
5
+
6
+ // Add active class on click to style while loading via turbolinks
7
+ // and add loading class to the body element.
8
+ links.click(function() {
9
+ body.addClass('loading');
10
+ $(this).addClass('active');
11
+ });
12
+
13
+ // Remove loading and active classes on page load
14
+ body.removeClass('loading');
15
+ links.removeClass('active');
16
+
17
+ // We also need to make sure to remove the loading classes when the
18
+ // page is restored by Turbolinks when using the back button
19
+ document.addEventListener('page:restore', function() {
20
+ body.removeClass('loading');
21
+ links.removeClass('active');
22
+ });
23
+ });
@@ -0,0 +1,52 @@
1
+ //= require intl-tel-input
2
+ //= require intl-tel-utils
3
+
4
+ App.ready(function() {
5
+ "use strict";
6
+
7
+ function activateBehavior() {
8
+ $('.input.phone').each(function() {
9
+ var container = $(this);
10
+ var input = container.find('input');
11
+ var label = container.find('label');
12
+
13
+ // Set the container's class when the input field receives focus.
14
+ input.focus(function() {
15
+ container.addClass('focused');
16
+ });
17
+
18
+ // Set the container class based on whether or not the
19
+ // input field has a value and remove the focused class.
20
+ function setContainerCssClass() {
21
+ if (input.val().replace('+', '').trim() === '' ) {
22
+ container.removeClass('has-value');
23
+ container.addClass('blank');
24
+ } else {
25
+ container.removeClass('blank');
26
+ container.addClass('has-value');
27
+ }
28
+ }
29
+
30
+ input.blur(function() {
31
+ setContainerCssClass();
32
+ container.removeClass('focused');
33
+ });
34
+
35
+ setContainerCssClass();
36
+ container.addClass('animate');
37
+ });
38
+
39
+ $('.input.phone input[type="text"]').intlTelInput({
40
+ preferredCountries: ['us'],
41
+ responsiveDropdown: true
42
+ });
43
+ }
44
+
45
+ $('.has_many_add').click(function() {
46
+ setTimeout(function() {
47
+ activateBehavior();
48
+ }, 0);
49
+ });
50
+
51
+ activateBehavior();
52
+ });
@@ -0,0 +1,31 @@
1
+ // Highlight the label for a select field on focus.
2
+ App.ready(function() {
3
+ "use strict";
4
+
5
+ function activateBehavior(selector) {
6
+ $(selector).each(function() {
7
+ var container = $(this);
8
+ var input = container.find('select');
9
+ var label = container.find('label');
10
+
11
+ // Set the container's class when the input field receives focus.
12
+ input.focus(function() {
13
+ container.addClass('focused');
14
+ });
15
+
16
+ input.blur(function() {
17
+ container.removeClass('focused');
18
+ });
19
+ });
20
+ }
21
+
22
+ $('.has_many_add').click(function() {
23
+ setTimeout(function() {
24
+ activateBehavior('.has_many_fields:last .input.country');
25
+ activateBehavior('.has_many_fields:last .input.select');
26
+ }, 0);
27
+ });
28
+
29
+ activateBehavior('.input.country');
30
+ activateBehavior('.input.select');
31
+ });
@@ -0,0 +1,8 @@
1
+ // Activate any sortable columns. The gem on its own doesn't handle using Turbolinks.
2
+ // @see https://github.com/neo/activeadmin-sortable
3
+ App.ready(function() {
4
+ "use strict";
5
+
6
+ // Normally fired by $(document).ready
7
+ $('.handle').closest('tbody').activeAdminSortable();
8
+ });
@@ -0,0 +1,132 @@
1
+ //= require bootstrap
2
+ //= require codemirror
3
+ //= require codemirror/modes/css
4
+ //= require codemirror/modes/javascript
5
+ //= require codemirror/modes/xml
6
+ //= require codemirror/modes/htmlmixed
7
+ //= require summernote
8
+
9
+ // Summernote editor field.
10
+ // @see http://summernote.org
11
+ App.ready(function() {
12
+ "use strict";
13
+
14
+ var toolbar = [
15
+ ['style', ['bold', 'italic', 'underline', 'clear']],
16
+ ['fontsize', ['fontsize']],
17
+ ['color', ['color']],
18
+ ['para', ['ul', 'ol', 'paragraph']],
19
+ ['table', ['table']],
20
+ ['insert', ['link', 'picture', 'video']],
21
+ ['code', ['codeview', 'fullscreen']]
22
+ ];
23
+
24
+ function activateBehavior() {
25
+ $('.input.summernote').each(function() {
26
+ var wrapper = $(this);
27
+ var summernoteInput = wrapper.find('textarea').summernote({
28
+ codemirror: {
29
+ lineNumbers: true,
30
+ mode: 'htmlmixed',
31
+ theme: 'activeadmin_pro'
32
+ },
33
+ height: 200,
34
+ minHeight: 180,
35
+ tabsize: 2,
36
+ toolbar: toolbar,
37
+
38
+ onBlur: function(e) {
39
+ wrapper.removeClass('focused');
40
+ },
41
+
42
+ onFocus: function(e) {
43
+ wrapper.addClass('focused');
44
+ }
45
+ });
46
+
47
+ wrapper.find('label').click(function() {
48
+ summernoteInput.summernote('focus');
49
+ });
50
+
51
+ // Remove the default image upload form to avoid unpermitted params
52
+ $('.note-image-dialog').remove();
53
+
54
+ // Override the default image dialog with an Active Admin (jQuery UI) dialog
55
+ var pictureButton = wrapper.find('button[data-original-title="Picture"]');
56
+ pictureButton.unbind('click');
57
+ pictureButton.click(function(event) {
58
+ var dialogHtml = '<div id="summernote_image_dialog">';
59
+ dialogHtml += '<div class="input file">';
60
+ dialogHtml += '<label for="summernote_image_file">Upload Image</label>';
61
+ dialogHtml += '<input id="summernote_image_file" type="file">';
62
+ dialogHtml += '</div>';
63
+ dialogHtml += '<div class="input text">';
64
+ dialogHtml += '<label for="summernote_image_url">Image URL</label>';
65
+ dialogHtml += '<input id="summernote_image_url" type="text">';
66
+ dialogHtml += '</div>';
67
+ dialogHtml += '</div>';
68
+ $('#wrapper').prepend(dialogHtml);
69
+ $('#summernote_image_dialog').dialog({
70
+ autoOpen: true,
71
+ dialogClass: 'active_admin_dialog',
72
+ modal: true,
73
+ title: 'Insert Image',
74
+
75
+ buttons: [{
76
+ text: 'Insert Image',
77
+ click: function() {
78
+ var imageFile = $('#summernote_image_file')[0].files[0];
79
+ var imageUrl = $('#summernote_image_url').val();
80
+ var dialog = $(this);
81
+
82
+ if (imageFile !== undefined) {
83
+ var uploadButton = $('.ui-dialog-buttonpane button:first-of-type');
84
+ uploadButton.text('Uploading...');
85
+ uploadButton.prop('disabled', true);
86
+
87
+ var data = new FormData();
88
+ data.append('file', imageFile);
89
+
90
+ $.ajax({
91
+ data: data,
92
+ type: "POST",
93
+ url: "/admin/activeadmin_pro_summernote_images",
94
+ cache: false,
95
+ contentType: false,
96
+ processData: false,
97
+
98
+ success: function(url) {
99
+ dialog.dialog('close').remove();
100
+ summernoteInput.summernote('insertImage', url, url.substring(url.lastIndexOf('/') + 1));
101
+ },
102
+
103
+ error: function(err) {
104
+ var json_err = jQuery.parseJSON(err.responseText)
105
+ $('#wrapper').prepend('<div class="flashes animate"><div class="flash flash_notice">' + json_err.error + '</div></div>');
106
+ $('.note-editor .modal-dialog .note-image-input').val('');
107
+ }
108
+ });
109
+ return;
110
+ } else if (imageUrl.trim() !== '') {
111
+ dialog.dialog('close').remove();
112
+ summernoteInput.summernote('insertImage', imageUrl, imageUrl.substring(imageUrl.lastIndexOf('/') + 1));
113
+ return;
114
+ }
115
+
116
+ dialog.dialog('close').remove();
117
+ }
118
+ }, {
119
+ text: 'Cancel',
120
+ click: function() {
121
+ $(this).dialog('close').remove();
122
+ }
123
+ }]
124
+ });
125
+
126
+ return false;
127
+ });
128
+ });
129
+ }
130
+
131
+ activateBehavior();
132
+ });