wafflemix 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +96 -0
  3. data/Rakefile +40 -0
  4. data/app/assets/javascripts/mercury/page_editor.js.coffee +254 -0
  5. data/app/assets/javascripts/wafflemix/admin/admin.js.coffee +73 -0
  6. data/app/assets/javascripts/wafflemix/admin/admin_js.js +16 -0
  7. data/app/assets/javascripts/wafflemix/admin/bootstrap-datepicker.js +454 -0
  8. data/app/assets/javascripts/wafflemix/admin/jquery.nested_sortable.js +608 -0
  9. data/app/assets/javascripts/wafflemix/application.js +43 -0
  10. data/app/assets/javascripts/wafflemix/assets.js +2 -0
  11. data/app/assets/javascripts/wafflemix/contact_forms.js +2 -0
  12. data/app/assets/javascripts/wafflemix/mercury.js +469 -0
  13. data/app/assets/javascripts/wafflemix/pages.js +2 -0
  14. data/app/assets/javascripts/wafflemix/portfolios.js +2 -0
  15. data/app/assets/javascripts/wafflemix/posts.js +2 -0
  16. data/app/assets/javascripts/wafflemix/roles.js +2 -0
  17. data/app/assets/javascripts/wafflemix/users.js +2 -0
  18. data/app/assets/stylesheets/wafflemix/admin/admin.css.sass +76 -0
  19. data/app/assets/stylesheets/wafflemix/admin/bootstrap-datepicker.css +7 -0
  20. data/app/assets/stylesheets/wafflemix/application.css +15 -0
  21. data/app/assets/stylesheets/wafflemix/assets.css +4 -0
  22. data/app/assets/stylesheets/wafflemix/clearfix.css +20 -0
  23. data/app/assets/stylesheets/wafflemix/contact_forms.css +4 -0
  24. data/app/assets/stylesheets/wafflemix/main.css.sass +11 -0
  25. data/app/assets/stylesheets/wafflemix/mercury.css +23 -0
  26. data/app/assets/stylesheets/wafflemix/pages.css +4 -0
  27. data/app/assets/stylesheets/wafflemix/partials/_base.css.sass +131 -0
  28. data/app/assets/stylesheets/wafflemix/portfolios.css +4 -0
  29. data/app/assets/stylesheets/wafflemix/posts.css +4 -0
  30. data/app/assets/stylesheets/wafflemix/roles.css +4 -0
  31. data/app/assets/stylesheets/wafflemix/users.css +4 -0
  32. data/app/controllers/wafflemix/admin/assets_controller.rb +95 -0
  33. data/app/controllers/wafflemix/admin/categories_controller.rb +77 -0
  34. data/app/controllers/wafflemix/admin/contact_forms_controller.rb +77 -0
  35. data/app/controllers/wafflemix/admin/content_sections_controller.rb +85 -0
  36. data/app/controllers/wafflemix/admin/pages_controller.rb +93 -0
  37. data/app/controllers/wafflemix/admin/portfolios_controller.rb +93 -0
  38. data/app/controllers/wafflemix/admin/posts_controller.rb +82 -0
  39. data/app/controllers/wafflemix/admin/roles_controller.rb +77 -0
  40. data/app/controllers/wafflemix/admin/slides_controller.rb +88 -0
  41. data/app/controllers/wafflemix/admin/users_controller.rb +78 -0
  42. data/app/controllers/wafflemix/application_controller.rb +11 -0
  43. data/app/controllers/wafflemix/assets_controller.rb +71 -0
  44. data/app/controllers/wafflemix/categories_controller.rb +34 -0
  45. data/app/controllers/wafflemix/contact_forms_controller.rb +47 -0
  46. data/app/controllers/wafflemix/pages_controller.rb +56 -0
  47. data/app/controllers/wafflemix/portfolios_controller.rb +35 -0
  48. data/app/controllers/wafflemix/posts_controller.rb +52 -0
  49. data/app/helpers/wafflemix/admin/slides_helper.rb +11 -0
  50. data/app/helpers/wafflemix/application_helper.rb +88 -0
  51. data/app/helpers/wafflemix/assets_helper.rb +4 -0
  52. data/app/helpers/wafflemix/categories_helper.rb +4 -0
  53. data/app/helpers/wafflemix/contact_forms_helper.rb +4 -0
  54. data/app/helpers/wafflemix/content_sections_helper.rb +4 -0
  55. data/app/helpers/wafflemix/pages_helper.rb +23 -0
  56. data/app/helpers/wafflemix/portfolios_helper.rb +11 -0
  57. data/app/helpers/wafflemix/posts_helper.rb +5 -0
  58. data/app/helpers/wafflemix/roles_helper.rb +4 -0
  59. data/app/helpers/wafflemix/users_helper.rb +4 -0
  60. data/app/models/user.rb +10 -0
  61. data/app/models/wafflemix/Categorical.rb +8 -0
  62. data/app/models/wafflemix/asset.rb +22 -0
  63. data/app/models/wafflemix/category.rb +8 -0
  64. data/app/models/wafflemix/contact_form.rb +19 -0
  65. data/app/models/wafflemix/content_section.rb +21 -0
  66. data/app/models/wafflemix/image.rb +8 -0
  67. data/app/models/wafflemix/meta_content.rb +5 -0
  68. data/app/models/wafflemix/page.rb +39 -0
  69. data/app/models/wafflemix/portfolio.rb +16 -0
  70. data/app/models/wafflemix/post.rb +33 -0
  71. data/app/models/wafflemix/role.rb +10 -0
  72. data/app/models/wafflemix/slide.rb +14 -0
  73. data/app/models/wafflemix/user.rb +11 -0
  74. data/app/models/wafflemix/user_role.rb +8 -0
  75. data/app/views/devise/_links.erb +25 -0
  76. data/app/views/devise/confirmations/new.html.erb +12 -0
  77. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  78. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  79. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  80. data/app/views/devise/passwords/edit.html.erb +16 -0
  81. data/app/views/devise/passwords/new.html.erb +12 -0
  82. data/app/views/devise/registrations/edit.html.erb +25 -0
  83. data/app/views/devise/registrations/new.html.erb +18 -0
  84. data/app/views/devise/sessions/new.html.erb +17 -0
  85. data/app/views/devise/unlocks/new.html.erb +12 -0
  86. data/app/views/layouts/mercury.html.erb +24 -0
  87. data/app/views/layouts/wafflemix/admin.html.erb +19 -0
  88. data/app/views/layouts/wafflemix/example_layout.html.erb +35 -0
  89. data/app/views/wafflemix/admin/assets/_form.html.erb +22 -0
  90. data/app/views/wafflemix/admin/assets/add_image.js.erb +1 -0
  91. data/app/views/wafflemix/admin/assets/edit.html.erb +6 -0
  92. data/app/views/wafflemix/admin/assets/index.html.erb +41 -0
  93. data/app/views/wafflemix/admin/assets/new.html.erb +5 -0
  94. data/app/views/wafflemix/admin/assets/show.html.erb +20 -0
  95. data/app/views/wafflemix/admin/categories/_form.html.erb +29 -0
  96. data/app/views/wafflemix/admin/categories/edit.html.erb +6 -0
  97. data/app/views/wafflemix/admin/categories/index.html.erb +36 -0
  98. data/app/views/wafflemix/admin/categories/new.html.erb +5 -0
  99. data/app/views/wafflemix/admin/categories/show.html.erb +25 -0
  100. data/app/views/wafflemix/admin/contact_forms/_form.html.erb +15 -0
  101. data/app/views/wafflemix/admin/contact_forms/edit.html.erb +6 -0
  102. data/app/views/wafflemix/admin/contact_forms/index.html.erb +38 -0
  103. data/app/views/wafflemix/admin/contact_forms/new.html.erb +5 -0
  104. data/app/views/wafflemix/admin/contact_forms/show.html.erb +25 -0
  105. data/app/views/wafflemix/admin/content_sections/_form.html.erb +33 -0
  106. data/app/views/wafflemix/admin/content_sections/create.js.erb +3 -0
  107. data/app/views/wafflemix/admin/content_sections/destroy.js.erb +4 -0
  108. data/app/views/wafflemix/admin/content_sections/edit.html.erb +6 -0
  109. data/app/views/wafflemix/admin/content_sections/index.html.erb +29 -0
  110. data/app/views/wafflemix/admin/content_sections/new.html.erb +5 -0
  111. data/app/views/wafflemix/admin/content_sections/show.html.erb +25 -0
  112. data/app/views/wafflemix/admin/pages/_form.html.erb +47 -0
  113. data/app/views/wafflemix/admin/pages/_page.html.erb +15 -0
  114. data/app/views/wafflemix/admin/pages/edit.html.erb +3 -0
  115. data/app/views/wafflemix/admin/pages/index.html.erb +21 -0
  116. data/app/views/wafflemix/admin/pages/new.html.erb +3 -0
  117. data/app/views/wafflemix/admin/pages/show.html.erb +40 -0
  118. data/app/views/wafflemix/admin/portfolios/_form.html.erb +174 -0
  119. data/app/views/wafflemix/admin/portfolios/_portfolio.html.erb +11 -0
  120. data/app/views/wafflemix/admin/portfolios/edit.html.erb +5 -0
  121. data/app/views/wafflemix/admin/portfolios/index.html.erb +21 -0
  122. data/app/views/wafflemix/admin/portfolios/new.html.erb +5 -0
  123. data/app/views/wafflemix/admin/portfolios/show.html.erb +20 -0
  124. data/app/views/wafflemix/admin/posts/_form.html.erb +191 -0
  125. data/app/views/wafflemix/admin/posts/edit.html.erb +5 -0
  126. data/app/views/wafflemix/admin/posts/index.html.erb +38 -0
  127. data/app/views/wafflemix/admin/posts/new.html.erb +3 -0
  128. data/app/views/wafflemix/admin/posts/show.html.erb +20 -0
  129. data/app/views/wafflemix/admin/roles/_form.html.erb +21 -0
  130. data/app/views/wafflemix/admin/roles/edit.html.erb +6 -0
  131. data/app/views/wafflemix/admin/roles/index.html.erb +34 -0
  132. data/app/views/wafflemix/admin/roles/new.html.erb +5 -0
  133. data/app/views/wafflemix/admin/roles/show.html.erb +10 -0
  134. data/app/views/wafflemix/admin/slides/_form.html.erb +170 -0
  135. data/app/views/wafflemix/admin/slides/_slide.html.erb +11 -0
  136. data/app/views/wafflemix/admin/slides/edit.html.erb +5 -0
  137. data/app/views/wafflemix/admin/slides/index.html.erb +21 -0
  138. data/app/views/wafflemix/admin/slides/new.html.erb +5 -0
  139. data/app/views/wafflemix/admin/slides/show.html.erb +10 -0
  140. data/app/views/wafflemix/admin/users/_form.html.erb +29 -0
  141. data/app/views/wafflemix/admin/users/edit.html.erb +6 -0
  142. data/app/views/wafflemix/admin/users/index.html.erb +36 -0
  143. data/app/views/wafflemix/admin/users/new.html.erb +5 -0
  144. data/app/views/wafflemix/admin/users/show.html.erb +14 -0
  145. data/app/views/wafflemix/categories/index.erb +16 -0
  146. data/app/views/wafflemix/categories/show.html.erb +16 -0
  147. data/app/views/wafflemix/contact_forms/_form.html.erb +33 -0
  148. data/app/views/wafflemix/contact_forms/new.html.erb +19 -0
  149. data/app/views/wafflemix/contact_forms/show.html.erb +25 -0
  150. data/app/views/wafflemix/pages/home.html.erb +7 -0
  151. data/app/views/wafflemix/pages/index.html.erb +31 -0
  152. data/app/views/wafflemix/pages/show.html.erb +14 -0
  153. data/app/views/wafflemix/portfolios/index.html.erb +21 -0
  154. data/app/views/wafflemix/portfolios/show.html.erb +36 -0
  155. data/app/views/wafflemix/posts/_sidebar.html.erb +12 -0
  156. data/app/views/wafflemix/posts/index.html.erb +16 -0
  157. data/app/views/wafflemix/posts/show.html.erb +40 -0
  158. data/app/views/wafflemix/posts/tagged.html.erb +16 -0
  159. data/config/initializers/devise.rb +227 -0
  160. data/config/initializers/dragonfly.rb +16 -0
  161. data/config/initializers/formtastic.rb +78 -0
  162. data/config/initializers/spam_filter.rb +4 -0
  163. data/config/locales/devise.en.yml +57 -0
  164. data/config/routes.rb +55 -0
  165. data/db/migrate/20120814113226_create_wafflemix_pages.rb +19 -0
  166. data/db/migrate/20120901141321_create_wafflemix_users.rb +29 -0
  167. data/db/migrate/20120901150334_create_wafflemix_assets.rb +11 -0
  168. data/db/migrate/20120901151421_create_wafflemix_roles.rb +9 -0
  169. data/db/migrate/20120901151704_create_wafflemix_user_roles.rb +13 -0
  170. data/db/migrate/20120915124116_add_ancestry_to_pages.rb +7 -0
  171. data/db/migrate/20120918100336_create_wafflemix_categories.rb +15 -0
  172. data/db/migrate/20120923131130_create_wafflemix_slides.rb +11 -0
  173. data/db/migrate/20120923131307_create_wafflemix_content_sections.rb +12 -0
  174. data/db/migrate/20120923135949_add_position_to_slides.rb +5 -0
  175. data/db/migrate/20121005124419_update_asset_table.rb +10 -0
  176. data/db/migrate/20121113131239_create_wafflemix_posts.rb +15 -0
  177. data/db/migrate/20121113132413_add_translation_table_for_posts.rb +9 -0
  178. data/db/migrate/20121114135432_update_draft_to_boolean_on_posts.rb +11 -0
  179. data/db/migrate/20121120125114_add_page_translations.rb +9 -0
  180. data/db/migrate/20121205221122_acts_as_taggable_on_migration.rb +30 -0
  181. data/db/migrate/20121206132733_re_do_categories.rb +19 -0
  182. data/db/migrate/20121206132923_add_new_categories_table.rb +11 -0
  183. data/db/migrate/20121206133026_add_category_joins_table.rb +14 -0
  184. data/db/migrate/20121211095114_finalize_asset_table.rb +11 -0
  185. data/db/migrate/20121211095847_store_asset_url.rb +5 -0
  186. data/db/migrate/20130202161212_create_wafflemix_images.rb +11 -0
  187. data/db/migrate/20130202182435_add_extra_fields_to_slides.rb +6 -0
  188. data/db/migrate/20130204225256_create_wafflemix_portfolios.rb +11 -0
  189. data/db/migrate/20130204230818_add_ancestry_to_portfolio.rb +6 -0
  190. data/db/migrate/20130216190558_create_wafflemix_meta_contents.rb +13 -0
  191. data/db/migrate/20130219121412_create_wafflemix_contact_forms.rb +12 -0
  192. data/db/migrate/20130219130609_add_spam_to_contact_forms.rb +5 -0
  193. data/lib/tasks/wafflemix_tasks.rake +15 -0
  194. data/lib/templates/erb/scaffold/_form.html.erb +11 -0
  195. data/lib/wafflemix/engine.rb +9 -0
  196. data/lib/wafflemix/version.rb +3 -0
  197. data/lib/wafflemix.rb +17 -0
  198. data/test/dummy/README.rdoc +261 -0
  199. data/test/dummy/Rakefile +7 -0
  200. data/test/dummy/app/assets/javascripts/application.js +15 -0
  201. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  202. data/test/dummy/app/controllers/application_controller.rb +3 -0
  203. data/test/dummy/app/helpers/application_helper.rb +2 -0
  204. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  205. data/test/dummy/config/application.rb +64 -0
  206. data/test/dummy/config/boot.rb +10 -0
  207. data/test/dummy/config/environment.rb +5 -0
  208. data/test/dummy/config/environments/development.rb +39 -0
  209. data/test/dummy/config/environments/production.rb +69 -0
  210. data/test/dummy/config/environments/test.rb +37 -0
  211. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  212. data/test/dummy/config/initializers/inflections.rb +15 -0
  213. data/test/dummy/config/initializers/local_s3.rb +3 -0
  214. data/test/dummy/config/initializers/mime_types.rb +5 -0
  215. data/test/dummy/config/initializers/secret_token.rb +7 -0
  216. data/test/dummy/config/initializers/session_store.rb +8 -0
  217. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  218. data/test/dummy/config/locales/en.yml +5 -0
  219. data/test/dummy/config/routes.rb +5 -0
  220. data/test/dummy/config.ru +4 -0
  221. data/test/dummy/db/schema.rb +87 -0
  222. data/test/dummy/public/404.html +26 -0
  223. data/test/dummy/public/422.html +26 -0
  224. data/test/dummy/public/500.html +25 -0
  225. data/test/dummy/public/favicon.ico +0 -0
  226. data/test/dummy/script/rails +6 -0
  227. data/test/fixtures/wafflemix/assets.yml +11 -0
  228. data/test/fixtures/wafflemix/categories.yml +13 -0
  229. data/test/fixtures/wafflemix/contact_forms.yml +13 -0
  230. data/test/fixtures/wafflemix/content_sections.yml +13 -0
  231. data/test/fixtures/wafflemix/images.yml +11 -0
  232. data/test/fixtures/wafflemix/meta_contents.yml +15 -0
  233. data/test/fixtures/wafflemix/pages.yml +19 -0
  234. data/test/fixtures/wafflemix/portfolios.yml +11 -0
  235. data/test/fixtures/wafflemix/posts.yml +11 -0
  236. data/test/fixtures/wafflemix/roles.yml +7 -0
  237. data/test/fixtures/wafflemix/slides.yml +7 -0
  238. data/test/fixtures/wafflemix/user_roles.yml +9 -0
  239. data/test/fixtures/wafflemix/users.yml +11 -0
  240. data/test/functional/wafflemix/assets_controller_test.rb +51 -0
  241. data/test/functional/wafflemix/categories_controller_test.rb +51 -0
  242. data/test/functional/wafflemix/contact_forms_controller_test.rb +51 -0
  243. data/test/functional/wafflemix/content_sections_controller_test.rb +51 -0
  244. data/test/functional/wafflemix/pages_controller_test.rb +51 -0
  245. data/test/functional/wafflemix/portfolios_controller_test.rb +51 -0
  246. data/test/functional/wafflemix/posts_controller_test.rb +51 -0
  247. data/test/functional/wafflemix/roles_controller_test.rb +51 -0
  248. data/test/functional/wafflemix/slides_controller_test.rb +51 -0
  249. data/test/functional/wafflemix/users_controller_test.rb +51 -0
  250. data/test/integration/navigation_test.rb +10 -0
  251. data/test/test_helper.rb +15 -0
  252. data/test/unit/helpers/wafflemix/assets_helper_test.rb +6 -0
  253. data/test/unit/helpers/wafflemix/categories_helper_test.rb +6 -0
  254. data/test/unit/helpers/wafflemix/contact_forms_helper_test.rb +6 -0
  255. data/test/unit/helpers/wafflemix/content_sections_helper_test.rb +6 -0
  256. data/test/unit/helpers/wafflemix/pages_helper_test.rb +6 -0
  257. data/test/unit/helpers/wafflemix/portfolios_helper_test.rb +6 -0
  258. data/test/unit/helpers/wafflemix/posts_helper_test.rb +6 -0
  259. data/test/unit/helpers/wafflemix/roles_helper_test.rb +6 -0
  260. data/test/unit/helpers/wafflemix/slides_helper_test.rb +6 -0
  261. data/test/unit/helpers/wafflemix/users_helper_test.rb +6 -0
  262. data/test/unit/wafflemix/asset_test.rb +9 -0
  263. data/test/unit/wafflemix/category_test.rb +9 -0
  264. data/test/unit/wafflemix/contact_form_test.rb +9 -0
  265. data/test/unit/wafflemix/content_section_test.rb +9 -0
  266. data/test/unit/wafflemix/image_test.rb +9 -0
  267. data/test/unit/wafflemix/meta_content_test.rb +9 -0
  268. data/test/unit/wafflemix/page_test.rb +9 -0
  269. data/test/unit/wafflemix/portfolio_test.rb +9 -0
  270. data/test/unit/wafflemix/post_test.rb +9 -0
  271. data/test/unit/wafflemix/role_test.rb +9 -0
  272. data/test/unit/wafflemix/slide_test.rb +9 -0
  273. data/test/unit/wafflemix/user_role_test.rb +9 -0
  274. data/test/unit/wafflemix/user_test.rb +9 -0
  275. data/test/wafflemix_test.rb +7 -0
  276. metadata +654 -0
@@ -0,0 +1,469 @@
1
+ /*!
2
+ * Mercury Editor is a CoffeeScript and jQuery based WYSIWYG editor. Documentation and other useful information can be
3
+ * found at https://github.com/jejacks0n/mercury
4
+ *
5
+ * Minimum jQuery requirements are 1.7
6
+ *= require_self
7
+ *
8
+ * You can include the Rails jQuery ujs script here to get some nicer behaviors in modals, panels and lightviews when
9
+ * using :remote => true within the contents rendered in them.
10
+ * require jquery_ujs
11
+ *
12
+ * Add any requires for the support libraries that integrate nicely with Mercury Editor.
13
+ * require mercury/support/history
14
+ *
15
+ * Require Mercury Editor itself.
16
+ *= require mercury/toolbar
17
+ *= require mercury/mercury
18
+ *
19
+ * Require any localizations you wish to support
20
+ * Example: es.locale, or fr.locale -- regional dialects are in each language file so never en_US for instance.
21
+ * Make sure you enable the localization feature in the configuration.
22
+ * require mercury/locales/swedish_chef.locale
23
+ *
24
+ * Add all requires for plugins that extend or change the behavior of Mercury Editor.
25
+ * require mercury/plugins/save_as_xml/plugin.js
26
+ *
27
+ * Require any files you want to use that either extend, or change the default Mercury behavior.
28
+ * require mercury_overrides
29
+ */
30
+ window.Mercury = {
31
+
32
+ // # Mercury Configuration
33
+ config: {
34
+ // ## Toolbars
35
+ //
36
+ // This is where you can customize the toolbars by adding or removing buttons, or changing them and their
37
+ // behaviors. Any top level object put here will create a new toolbar. Buttons are simply nested inside the
38
+ // toolbars, along with button groups.
39
+ //
40
+ // Some toolbars are custom (the snippets toolbar for instance), and to denote that use _custom: true. You can then
41
+ // build the toolbar yourself with it's own behavior.
42
+ //
43
+ // Buttons can be grouped, and a button group is simply a way to wrap buttons for styling -- they can also handle
44
+ // enabling or disabling all the buttons within it by using a context. The table button group is a good example of
45
+ // this.
46
+ //
47
+ // It's important to note that each of the button names (keys), in each toolbar object must be unique, regardless of
48
+ // if it's in a button group, or nested, etc. This is because styling is applied to them by name, and because their
49
+ // name is used in the event that's fired when you click on them.
50
+ //
51
+ // Button format: `[label, description, {type: action, type: action, etc}]`
52
+ //
53
+ // ### The available button types are:
54
+ //
55
+ // - toggle: toggles on or off when clicked, otherwise behaves like a button
56
+ // - modal: opens a modal window, expects the action to be one of:
57
+ // 1. a string url
58
+ // 2. a function that returns a string url
59
+ // - lightview: opens a lightview window (like modal, but different UI), expects the action to be one of:
60
+ // 1. a string url
61
+ // 2. a function that returns a string url
62
+ // - panel: opens a panel dialog, expects the action to be one of:
63
+ // 1. a string url
64
+ // 2. a function that returns a string url
65
+ // - palette: opens a palette window, expects the action to be one of:
66
+ // 1. a string url
67
+ // 2. a function that returns a string url
68
+ // - select: opens a pulldown style window, expects the action to be one of:
69
+ // 1. a string url
70
+ // 2. a function that returns a string url
71
+ // - context: calls a callback function, expects the action to be:
72
+ // 1. a function that returns a boolean to highlight the button
73
+ // note: if a function isn't provided, the key will be passed to the contextHandler, in which case a default
74
+ // context will be used (for more info read the Contexts section below)
75
+ // - mode: toggle a given mode in the editor, expects the action to be:
76
+ // 1. a string, denoting the name of the mode
77
+ // note: it's assumed that when a specific mode is turned on, all other modes will be turned off, which happens
78
+ // automatically, thus putting the editor into a specific "state"
79
+ // - regions: allows buttons to be enabled/disabled based on what region type has focus, expects:
80
+ // 1. an array of region types (eg. ['full', 'markdown'])
81
+ // - preload: allows some dialog views to be loaded when the button is created instead of on first open, expects:
82
+ // 1. a boolean true / false
83
+ // note: this is only used by panels, selects, and palettes
84
+ //
85
+ // Separators are any "button" that's not an array, and are expected to be a string. You can use two different
86
+ // separator styles: line ('-'), and spacer (' ').
87
+ //
88
+ // ### Adding Contexts
89
+ //
90
+ // Contexts are used callback functions used for highlighting and disabling/enabling buttons and buttongroups. When
91
+ // the cursor enters an element within an html region for instance we want to disable or highlight buttons based on
92
+ // the properties of the given node. You can see examples of contexts in, and add your own to:
93
+ // `Mercury.Toolbar.Button.contexts` and `Mercury.Toolbar.ButtonGroup.contexts`
94
+ toolbars: {
95
+ primary: {
96
+ save: ['Save', 'Save this page'],
97
+ preview: ['Preview', 'Preview this page', { toggle: true, mode: true }],
98
+ sep1: ' ',
99
+ undoredo: {
100
+ undo: ['Undo', 'Undo your last action'],
101
+ redo: ['Redo', 'Redo your last action'],
102
+ sep: ' '
103
+ },
104
+ insertLink: ['Link', 'Insert Link', { modal: '/mercury/modals/link.html', regions: ['full', 'markdown'] }],
105
+ insertMedia: ['Media', 'Insert Media (images and videos)', { modal: '/mercury/modals/media.html', regions: ['full', 'markdown'] }],
106
+ insertTable: ['Table', 'Insert Table', { modal: '/mercury/modals/table.html', regions: ['full', 'markdown'] }],
107
+ insertCharacter: ['Character', 'Special Characters', { modal: '/mercury/modals/character.html', regions: ['full', 'markdown'] }],
108
+ snippetPanel: ['Snippet', 'Snippet Panel', { panel: '/mercury/panels/snippets.html' }],
109
+ sep2: ' ',
110
+ historyPanel: ['History', 'Page Version History', { panel: '/mercury/panels/history.html' }],
111
+ sep3: ' ',
112
+ notesPanel: ['Notes', 'Page Notes', { panel: '/mercury/panels/notes.html' }]
113
+ },
114
+
115
+ editable: {
116
+ _regions: ['full', 'markdown'],
117
+ predefined: {
118
+ style: ['Style', null, { select: '/mercury/selects/style.html', preload: true }],
119
+ sep1: ' ',
120
+ formatblock: ['Block Format', null, { select: '/mercury/selects/formatblock.html', preload: true }],
121
+ sep2: '-'
122
+ },
123
+ colors: {
124
+ backColor: ['Background Color', null, { palette: '/mercury/palettes/backcolor.html', context: true, preload: true, regions: ['full'] }],
125
+ sep1: ' ',
126
+ foreColor: ['Text Color', null, { palette: '/mercury/palettes/forecolor.html', context: true, preload: true, regions: ['full'] }],
127
+ sep2: '-'
128
+ },
129
+ decoration: {
130
+ bold: ['Bold', null, { context: true }],
131
+ italic: ['Italicize', null, { context: true }],
132
+ overline: ['Overline', null, { context: true, regions: ['full'] }],
133
+ strikethrough: ['Strikethrough', null, { context: true, regions: ['full'] }],
134
+ underline: ['Underline', null, { context: true, regions: ['full'] }],
135
+ sep: '-'
136
+ },
137
+ script: {
138
+ subscript: ['Subscript', null, { context: true }],
139
+ superscript: ['Superscript', null, { context: true }],
140
+ sep: '-'
141
+ },
142
+ justify: {
143
+ justifyLeft: ['Align Left', null, { context: true, regions: ['full'] }],
144
+ justifyCenter: ['Center', null, { context: true, regions: ['full'] }],
145
+ justifyRight: ['Align Right', null, { context: true, regions: ['full'] }],
146
+ justifyFull: ['Justify Full', null, { context: true, regions: ['full'] }],
147
+ sep: '-'
148
+ },
149
+ list: {
150
+ insertUnorderedList: ['Unordered List', null, { context: true }],
151
+ insertOrderedList: ['Numbered List', null, { context: true }],
152
+ sep: '-'
153
+ },
154
+ indent: {
155
+ outdent: ['Decrease Indentation'],
156
+ indent: ['Increase Indentation'],
157
+ sep: '-'
158
+ },
159
+ table: {
160
+ _context: true,
161
+ insertRowBefore: ['Insert Table Row', 'Insert a table row before the cursor', { regions: ['full'] }],
162
+ insertRowAfter: ['Insert Table Row', 'Insert a table row after the cursor', { regions: ['full'] }],
163
+ deleteRow: ['Delete Table Row', 'Delete this table row', { regions: ['full'] }],
164
+ insertColumnBefore: ['Insert Table Column', 'Insert a table column before the cursor', { regions: ['full'] }],
165
+ insertColumnAfter: ['Insert Table Column', 'Insert a table column after the cursor', { regions: ['full'] }],
166
+ deleteColumn: ['Delete Table Column', 'Delete this table column', { regions: ['full'] }],
167
+ sep1: ' ',
168
+ increaseColspan: ['Increase Cell Columns', 'Increase the cells colspan'],
169
+ decreaseColspan: ['Decrease Cell Columns', 'Decrease the cells colspan and add a new cell'],
170
+ increaseRowspan: ['Increase Cell Rows', 'Increase the cells rowspan'],
171
+ decreaseRowspan: ['Decrease Cell Rows', 'Decrease the cells rowspan and add a new cell'],
172
+ sep2: '-'
173
+ },
174
+ rules: {
175
+ horizontalRule: ['Horizontal Rule', 'Insert a horizontal rule'],
176
+ sep1: '-'
177
+ },
178
+ formatting: {
179
+ removeFormatting: ['Remove Formatting', 'Remove formatting for the selection', { regions: ['full'] }],
180
+ sep2: ' '
181
+ },
182
+ editors: {
183
+ htmlEditor: ['Edit HTML', 'Edit the HTML content', { regions: ['full'] }]
184
+ }
185
+ },
186
+
187
+ snippets: {
188
+ _custom: true,
189
+ actions: {
190
+ editSnippet: ['Edit Snippet Settings'],
191
+ sep1: ' ',
192
+ removeSnippet: ['Remove Snippet']
193
+ }
194
+ }
195
+ },
196
+
197
+
198
+ // ## Region Options
199
+ //
200
+ // You can customize some aspects of how regions are found, identified, and saved.
201
+ //
202
+ // attribute: Mercury identifies editable regions by a data-mercury attribute. This attribute has to be added in
203
+ // your HTML in advance, and is the only real code/naming exposed in the implementation of Mercury. To allow this
204
+ // to be as configurable as possible, you can set the name of this attribute. If you change this, you should adjust
205
+ // the injected styles as well.
206
+ //
207
+ // identifier: This is used as a unique identifier for any given region (and thus should be unique to the page).
208
+ // By default this is the id attribute but can be changed to a data attribute should you want to use something
209
+ // custom instead.
210
+ //
211
+ // dataAttributes: The dataAttributes is an array of data attributes that will be serialized and returned to the
212
+ // server upon saving. These attributes, when applied to a Mercury region element, will be automatically serialized
213
+ // and submitted with the AJAX request sent when a page is saved. These are expected to be HTML5 data attributes,
214
+ // and 'data-' will automatically be prepended to each item in this directive. (ex. ['scope', 'version'])
215
+ //
216
+ // determineType: This function is called after checking the data-type attribute for the correct field type. Use
217
+ // it if you want to dynamically set the type based on inspection of the region.
218
+ regions: {
219
+ attribute: 'data-mercury',
220
+ identifier: 'id',
221
+ dataAttributes: []
222
+ // determineType: function(region){},
223
+ },
224
+
225
+
226
+ // ## Snippet Options / Preview
227
+ //
228
+ // When a user drags a snippet onto the page they'll be prompted to enter options for the given snippet. The server
229
+ // is expected to respond with a form. Once the user submits this form, an Ajax request is sent to the server with
230
+ // the options provided; this preview request is expected to respond with the rendered markup for the snippet.
231
+ //
232
+ // method: The HTTP method used when submitting both the options and the preview. We use POST by default because a
233
+ // snippet options form may contain large text inputs and we don't want that to be truncated when sent to the
234
+ // server.
235
+ //
236
+ // optionsUrl: The url that the options form will be loaded from.
237
+ //
238
+ // previewUrl: The url that the options will be submitted to, and will return the rendered snippet markup.
239
+ //
240
+ // **Note:** `:name` will be replaced with the snippet name in the urls (eg. /mercury/snippets/example/options.html)
241
+ snippets: {
242
+ method: 'POST',
243
+ optionsUrl: '/mercury/snippets/:name/options.html',
244
+ previewUrl: '/mercury/snippets/:name/preview.html'
245
+ },
246
+
247
+
248
+ // ## Image Uploading
249
+ //
250
+ // If you drag images from your desktop into regions that support it, it will be uploaded to the server and inserted
251
+ // into the region. You can disable or enable this feature, the accepted mime-types, file size restrictions, and
252
+ // other things related to uploading.
253
+ //
254
+ // **Note:** Image uploading is only supported in some region types, and some browsers.
255
+ //
256
+ // enabled: You can set this to true, or false if you want to disable the feature entirely.
257
+ //
258
+ // allowedMimeTypes: You can restrict the types of files that can be uploaded by providing a list of allowed mime
259
+ // types.
260
+ //
261
+ // maxFileSize: You can restrict large files by setting the maxFileSize (in bytes).
262
+ //
263
+ // inputName: When uploading, a form is generated and submitted to the server via Ajax. If your server would prefer
264
+ // a different name for how the image comes through, you can change the inputName.
265
+ //
266
+ // url: The url that the image upload will be submitted to.
267
+ //
268
+ // handler: You can use false to let Mercury handle it for you, or you can provide a handler function that can
269
+ // modify the response from the server. This can be useful if your server doesn't respond the way Mercury expects.
270
+ // The handler function should take the response from the server and return an object that matches:
271
+ // `{image: {url: '[your provided url]'}`
272
+ uploading: {
273
+ enabled: true,
274
+ allowedMimeTypes: ['image/jpeg', 'image/gif', 'image/png'],
275
+ maxFileSize: 1235242880,
276
+ inputName: 'asset[asset]',
277
+ url: '/assets',
278
+ handler: false
279
+ },
280
+
281
+
282
+ // ## Localization / I18n
283
+ //
284
+ // Include the .locale files you want to support when loading Mercury. The files are always named by the language,
285
+ // and not the regional dialect (eg. en.locale.js) because the regional dialects are nested within the primary
286
+ // locale files.
287
+ //
288
+ // The client locale will be used first, and if no proper locale file is found for their language then the fallback
289
+ // preferredLocale configuration will be used. If one isn't provided, and the client locale isn't included, the
290
+ // strings will remain untranslated.
291
+ //
292
+ // enabled: Set to false to disable, true to enable.
293
+ //
294
+ // preferredLocale: If a client doesn't support the locales you've included, this is used as a fallback.
295
+ localization: {
296
+ enabled: false,
297
+ preferredLocale: 'swedish_chef-BORK'
298
+ },
299
+
300
+
301
+ // ## Behaviors
302
+ //
303
+ // Behaviors are used to change the default behaviors of a given region type when a given button is clicked. For
304
+ // example, you may prefer to add HR tags using an HR wrapped within a div with a classname (for styling). You
305
+ // can add your own complex behaviors here and they'll be shared across all regions.
306
+ //
307
+ // If you want to add behaviors to specific region types, you can mix them into the actions property of any region
308
+ // type.
309
+ //
310
+ // Mercury.Regions.Full.actions.htmlEditor = function() {}
311
+ //
312
+ // You can see how the behavior matches up directly with the button names. It's also important to note that the
313
+ // callback functions are executed within the scope of the given region, so you have access to all it's methods.
314
+ behaviors: {
315
+ //foreColor: function(selection, options) { selection.wrap('<span style="color:' + options.value.toHex() + '">', true) },
316
+ htmlEditor: function() { Mercury.modal('/mercury/modals/htmleditor.html', { title: 'HTML Editor', fullHeight: true, handler: 'htmlEditor' }); }
317
+ },
318
+
319
+
320
+ // ## Global Behaviors
321
+ //
322
+ // Global behaviors are much like behaviors, but are more "global". Things like save, exit, etc. can be included
323
+ // here. They'll only be called once, and execute within the scope of whatever editor is instantiated (eg.
324
+ // PageEditor).
325
+ //
326
+ // An example of changing how saving works:
327
+ //
328
+ // save: function() {
329
+ // var data = top.JSON.stringify(this.serialize(), null, ' ');
330
+ // var content = '<textarea style="width:500px;height:200px" wrap="off">' + data + '</textarea>';
331
+ // Mercury.modal(null, {title: 'Saving', closeButton: true, content: content})
332
+ // }
333
+ //
334
+ // This is a nice way to add functionality, when the behaviors aren't region specific. These can be triggered by a
335
+ // button, or manually with `Mercury.trigger('action', {action: 'barrelRoll'})`
336
+ globalBehaviors: {
337
+ exit: function() { window.location.href = this.iframeSrc() },
338
+ barrelRoll: function() { $('body').css({webkitTransform: 'rotate(360deg)'}) }
339
+ },
340
+
341
+
342
+ // ## Ajax and CSRF Headers
343
+ //
344
+ // Some server frameworks require that you provide a specific header for Ajax requests. The values for these CSRF
345
+ // tokens are typically stored in the rendered DOM. By default, Mercury will look for the Rails specific meta tag,
346
+ // and provide the X-CSRF-Token header on Ajax requests, but you can modify this configuration if the system you're
347
+ // using doesn't follow the same standard.
348
+ csrfSelector: 'meta[name="csrf-token"]',
349
+ csrfHeader: 'X-CSRF-Token',
350
+
351
+
352
+ // ## Editor URLs
353
+ //
354
+ // When loading a given page, you may want to tweak this regex. It's to allow the url to differ from the page
355
+ // you're editing, and the url at which you access it.
356
+ editorUrlRegEx: /([http|https]:\/\/.[^\/]*)\/editor\/?(.*)/i,
357
+
358
+
359
+ // ## Hijacking Links & Forms
360
+ //
361
+ // Mercury will hijack links and forms that don't have a target set, or the target is set to _self and will set it
362
+ // to _parent. This is because the target must be set properly for Mercury to not get in the way of some
363
+ // functionality, like proper page loads on form submissions etc. Mercury doesn't do this to links or forms that
364
+ // are within editable regions because it doesn't want to impact the html that's saved. With that being explained,
365
+ // you can add classes to links or forms that you don't want this behavior added to. Let's say you have links that
366
+ // open a lightbox style window, and you don't want the targets of these to be set to _parent. You can add classes
367
+ // to this array, and they will be ignored when the hijacking is applied.
368
+ nonHijackableClasses: [],
369
+
370
+
371
+ // ## Pasting & Sanitizing
372
+ //
373
+ // When pasting content into Mercury it may sometimes contain HTML tags and attributes. This markup is used to
374
+ // style the content and makes the pasted content look (and behave) the same as the original content. This can be a
375
+ // desired feature or an annoyance, so you can enable various sanitizing methods to clean the content when it's
376
+ // pasted.
377
+ //
378
+ // sanitize: Can be any of the following:
379
+ // - false: no sanitizing is done, the content is pasted the exact same as it was copied by the user
380
+ // - 'whitelist': content is cleaned using the settings specified in the tag white list (described below)
381
+ // - 'text': all html is stripped before pasting, leaving only the raw text
382
+ //
383
+ // whitelist: The white list allows you to specify tags and attributes that are allowed when pasting content. Each
384
+ // item in this object should contain the allowed tag, and an array of attributes that are allowed on that tag. If
385
+ // the allowed attributes array is empty, all attributes will be removed. If a tag is not present in this list, it
386
+ // will be removed, but without removing any of the text or tags inside it.
387
+ //
388
+ // **Note:** Content is *always* sanitized if looks like it's from MS Word or similar editors regardless of this
389
+ // configuration.
390
+ pasting: {
391
+ sanitize: 'whitelist',
392
+ whitelist: {
393
+ h1: [],
394
+ h2: [],
395
+ h3: [],
396
+ h4: [],
397
+ h5: [],
398
+ h6: [],
399
+ table: [],
400
+ thead: [],
401
+ tbody: [],
402
+ tfoot: [],
403
+ tr: [],
404
+ th: ['colspan', 'rowspan'],
405
+ td: ['colspan', 'rowspan'],
406
+ div: ['class'],
407
+ span: ['class'],
408
+ ul: [],
409
+ ol: [],
410
+ li: [],
411
+ b: [],
412
+ strong: [],
413
+ i: [],
414
+ em: [],
415
+ u: [],
416
+ strike: [],
417
+ br: [],
418
+ p: [],
419
+ hr: [],
420
+ a: ['href', 'target', 'title', 'name'],
421
+ img: ['src', 'title', 'alt']
422
+ }
423
+ },
424
+
425
+
426
+ // ## Injected Styles
427
+ //
428
+ // Mercury tries to stay as much out of your code as possible, but because regions appear within your document we
429
+ // need to include a few styles to indicate regions, as well as the different states of them (eg. focused). These
430
+ // styles are injected into your document, and as simple as they might be, you may want to change them.
431
+ injectedStyles: '' +
432
+ '[data-mercury] { min-height: 10px; outline: 1px dotted #09F } ' +
433
+ '[data-mercury]:focus { outline: none; -webkit-box-shadow: 0 0 10px #09F, 0 0 1px #045; box-shadow: 0 0 10px #09F, 0 0 1px #045 }' +
434
+ '[data-mercury].focus { outline: none; -webkit-box-shadow: 0 0 10px #09F, 0 0 1px #045; box-shadow: 0 0 10px #09F, 0 0 1px #045 }' +
435
+ '[data-mercury]:after { content: "."; display: block; visibility: hidden; clear: both; height: 0; overflow: hidden; }' +
436
+ '[data-mercury] table { border: 1px dotted red; min-width: 6px; }' +
437
+ '[data-mercury] th { border: 1px dotted red; min-width: 6px; }' +
438
+ '[data-mercury] td { border: 1px dotted red; min-width: 6px; }' +
439
+ '[data-mercury] .mercury-textarea { border: 0; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; resize: none; }' +
440
+ '[data-mercury] .mercury-textarea:focus { outline: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }'
441
+ },
442
+
443
+ // ## Silent Mode
444
+ //
445
+ // Turning silent mode on will disable asking about unsaved changes before leaving the page.
446
+ silent: false,
447
+
448
+ // ## Debug Mode
449
+ //
450
+ // Turning debug mode on will log events and other various things (using console.debug if available).
451
+ debug: false,
452
+
453
+ // The onload method is provided as a callback in case you want to override default Mercury Editor behavior. It will
454
+ // be called directly after the Mercury scripts have loaded, but before anything has been initialized. It's a good
455
+ // place to add or change functionality.
456
+ onload: function() {
457
+ Mercury.on('ready', function() {
458
+ var link = $('#mercury_iframe').contents().find('#edit_link');
459
+ console.log("mercury ready ready", link);
460
+ mercuryInstance.saveUrl = link.data('save-url');
461
+ link.hide();
462
+ });
463
+
464
+ Mercury.on('saved', function() {
465
+ window.location.href = window.location.href.replace(/\/editor\//i, '/');
466
+ });
467
+ }
468
+
469
+ };
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,76 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require formtastic-bootstrap
13
+ *= require wafflemix/admin/bootstrap-datepicker
14
+ *= require jquery.fileupload-ui
15
+ *= require wafflemix/main
16
+ */
17
+
18
+ .placeholder
19
+ border: 1px dashed #4183C4
20
+ -webkit-border-radius: 3px
21
+ -moz-border-radius: 3px
22
+ border-radius: 3px
23
+
24
+ .container .row-fluid
25
+ ul.sortable, ul.one_level_sortable
26
+ margin-left: 0px
27
+ li
28
+ list-style-type: none
29
+ margin-bottom: 14px
30
+ .list_item
31
+ border: 1px solid #DDDDDD
32
+ margin-bottom: 4px
33
+ background-color: #EEEEEE
34
+ padding: 4px
35
+ height: 100%
36
+ ul
37
+ li
38
+ margin-bottom: 0px
39
+
40
+ .list_content
41
+ float: left
42
+ width: 60%
43
+
44
+ .list_actions
45
+ float: right
46
+ width: 40%
47
+ height: 81px
48
+ line-height: 81px
49
+ margin-bottom: 0px
50
+
51
+ .tab-pane label
52
+ display: none
53
+
54
+ .add_content_part_input
55
+ label
56
+ display: block
57
+
58
+ .tab-content
59
+ textarea
60
+ height: 250px
61
+ width: 98%
62
+
63
+ #draggable
64
+ li
65
+ display: inline
66
+ margin: 0 8px 8px 0
67
+
68
+ #droppable
69
+ margin-left: 0px
70
+ background-color: #F2F2F2
71
+ border: 1px dashed #708090
72
+ min-height: 70px
73
+ padding: 8px 25px 0 25px
74
+ li
75
+ display: inline
76
+ margin: 0 8px 8px 0
@@ -0,0 +1,7 @@
1
+ /*
2
+ Datepicker for Bootstrap
3
+ Copyright 2012 Stefan Petre
4
+ Licensed under the Apache License v2.0
5
+ http://www.apache.org/licenses/LICENSE-2.0
6
+ */
7
+ .datepicker { top: 0; left: 0; padding: 4px; margin-top: 1px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; /*.dow { border-top: 1px solid #ddd !important; }*/ } .datepicker:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; left: 6px; } .datepicker:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; position: absolute; top: -6px; left: 7px; } .datepicker > div { display: none; } .datepicker table { width: 100%; margin: 0; } .datepicker td, .datepicker th { text-align: center; width: 20px; height: 20px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker td.day:hover { background: #eeeeee; cursor: pointer; } .datepicker td.old, .datepicker td.new { color: #999999; } .datepicker td.active, .datepicker td.active:hover { background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker td.active:hover, .datepicker td.active:hover:hover, .datepicker td.active:active, .datepicker td.active:hover:active, .datepicker td.active.active, .datepicker td.active:hover.active, .datepicker td.active.disabled, .datepicker td.active:hover.disabled, .datepicker td.active[disabled], .datepicker td.active:hover[disabled] { background-color: #0044cc; } .datepicker td.active:active, .datepicker td.active:hover:active, .datepicker td.active.active, .datepicker td.active:hover.active { background-color: #003399 \9; } .datepicker td span { display: block; width: 47px; height: 54px; line-height: 54px; float: left; margin: 2px; cursor: pointer; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker td span:hover { background: #eeeeee; } .datepicker td span.active { background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker td span.active:hover, .datepicker td span.active:active, .datepicker td span.active.active, .datepicker td span.active.disabled, .datepicker td span.active[disabled] { background-color: #0044cc; } .datepicker td span.active:active, .datepicker td span.active.active { background-color: #003399 \9; } .datepicker td span.old { color: #999999; } .datepicker th.switch { width: 145px; } .datepicker th.next, .datepicker th.prev { font-size: 19.5px; } .datepicker thead tr:first-child th { cursor: pointer; } .datepicker thead tr:first-child th:hover { background: #eeeeee; } .input-append.date .add-on i, .input-prepend.date .add-on i { display: block; cursor: pointer; width: 16px; height: 16px; }
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require formtastic-bootstrap
13
+ *= require wafflemix/main
14
+ *= require wafflemix/clearfix
15
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,20 @@
1
+ .clearfix:after {
2
+ content: ".";
3
+ display: block;
4
+ clear: both;
5
+ visibility: hidden;
6
+ line-height: 0;
7
+ height: 0;
8
+ }
9
+
10
+ .clearfix {
11
+ display: inline-block;
12
+ }
13
+
14
+ html[xmlns] .clearfix {
15
+ display: block;
16
+ }
17
+
18
+ * html .clearfix {
19
+ height: 1%;
20
+ }
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,11 @@
1
+ @import "bootstrap"
2
+ @import "bootstrap-responsive"
3
+ @import "partials/base"
4
+
5
+ .navbar-fixed-top .brand_switch
6
+ color: #fff
7
+ margin-left: 0px
8
+
9
+ #action_buttons
10
+ margin: 16px 0
11
+ clear: both