tribeca_cms 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (565) hide show
  1. data/Gemfile +58 -0
  2. data/LICENSE +1 -0
  3. data/README.textile +0 -0
  4. data/app/assets/images/locomotive/background/body.png +0 -0
  5. data/app/assets/images/locomotive/datepicker/ui-widget-content-top.png +0 -0
  6. data/app/assets/images/locomotive/form/error-arrow.png +0 -0
  7. data/app/assets/images/locomotive/form/input-sep.png +0 -0
  8. data/app/assets/images/locomotive/icons/flags/de.png +0 -0
  9. data/app/assets/images/locomotive/icons/flags/en.png +0 -0
  10. data/app/assets/images/locomotive/icons/flags/es.png +0 -0
  11. data/app/assets/images/locomotive/icons/flags/et.png +0 -0
  12. data/app/assets/images/locomotive/icons/flags/fr.png +0 -0
  13. data/app/assets/images/locomotive/icons/flags/it.png +0 -0
  14. data/app/assets/images/locomotive/icons/flags/nb.png +0 -0
  15. data/app/assets/images/locomotive/icons/flags/nl.png +0 -0
  16. data/app/assets/images/locomotive/icons/flags/pl.png +0 -0
  17. data/app/assets/images/locomotive/icons/flags/pt-BR.png +0 -0
  18. data/app/assets/images/locomotive/icons/flags/ru.png +0 -0
  19. data/app/assets/images/locomotive/icons/start.png +0 -0
  20. data/app/assets/images/locomotive/list/empty.png +0 -0
  21. data/app/assets/images/locomotive/list/item-left.png +0 -0
  22. data/app/assets/images/locomotive/nocoffee.png +0 -0
  23. data/app/assets/images/locomotive/plugins/sites_picker_top_arrow.png +0 -0
  24. data/app/assets/images/locomotive/rails.png +0 -0
  25. data/app/assets/javascripts/aloha/plugins/custom/locomotive_media/css/image.css +3 -0
  26. data/app/assets/javascripts/aloha/plugins/custom/locomotive_media/img/image.gif +0 -0
  27. data/app/assets/javascripts/aloha/plugins/custom/locomotive_media/lib/locomotive_media-plugin.js +96 -0
  28. data/app/assets/javascripts/aloha/plugins/custom/locomotive_media/nls/fr/i18n.js +1 -0
  29. data/app/assets/javascripts/aloha/plugins/custom/locomotive_media/nls/i18n.js +4 -0
  30. data/app/assets/javascripts/aloha/plugins/custom/locomotive_media/package.json +1 -0
  31. data/app/assets/javascripts/locomotive.js +25 -0
  32. data/app/assets/javascripts/locomotive/aloha.js.coffee +2 -0
  33. data/app/assets/javascripts/locomotive/application.js.coffee +12 -0
  34. data/app/assets/javascripts/locomotive/inline_editor.js.coffee +22 -0
  35. data/app/assets/javascripts/locomotive/models/account.js.coffee +11 -0
  36. data/app/assets/javascripts/locomotive/models/content_asset.js.coffee +20 -0
  37. data/app/assets/javascripts/locomotive/models/content_entry.js.coffee +61 -0
  38. data/app/assets/javascripts/locomotive/models/content_type.js.coffee +26 -0
  39. data/app/assets/javascripts/locomotive/models/custom_field.js.coffee +38 -0
  40. data/app/assets/javascripts/locomotive/models/custom_field_select_option.js.coffee +16 -0
  41. data/app/assets/javascripts/locomotive/models/domain.js.coffee +3 -0
  42. data/app/assets/javascripts/locomotive/models/editable_element.js.coffee +27 -0
  43. data/app/assets/javascripts/locomotive/models/membership.js.coffee +13 -0
  44. data/app/assets/javascripts/locomotive/models/page.js.coffee +27 -0
  45. data/app/assets/javascripts/locomotive/models/site.js.coffee +34 -0
  46. data/app/assets/javascripts/locomotive/models/snippet.js.coffee +11 -0
  47. data/app/assets/javascripts/locomotive/models/theme_asset.js.coffee +11 -0
  48. data/app/assets/javascripts/locomotive/models/translation.js.coffee +5 -0
  49. data/app/assets/javascripts/locomotive/not_logged_in.js.coffee +1 -0
  50. data/app/assets/javascripts/locomotive/utils/aloha_settings.js.coffee +37 -0
  51. data/app/assets/javascripts/locomotive/utils/core_ext.js +75 -0
  52. data/app/assets/javascripts/locomotive/utils/growl.js +14 -0
  53. data/app/assets/javascripts/locomotive/utils/handlebar_helpers.js.coffee +9 -0
  54. data/app/assets/javascripts/locomotive/utils/tinymce_settings.js.coffee +48 -0
  55. data/app/assets/javascripts/locomotive/views/application_view.js.coffee +92 -0
  56. data/app/assets/javascripts/locomotive/views/content_assets/picker_item_view.js.coffee +30 -0
  57. data/app/assets/javascripts/locomotive/views/content_assets/picker_view.js.coffee +58 -0
  58. data/app/assets/javascripts/locomotive/views/content_entries/_form_view.js.coffee +144 -0
  59. data/app/assets/javascripts/locomotive/views/content_entries/_popup_form_view.js.coffee +90 -0
  60. data/app/assets/javascripts/locomotive/views/content_entries/edit_view.js.coffee +9 -0
  61. data/app/assets/javascripts/locomotive/views/content_entries/index_view.js.coffee +36 -0
  62. data/app/assets/javascripts/locomotive/views/content_entries/new_view.js.coffee +8 -0
  63. data/app/assets/javascripts/locomotive/views/content_types/_form_view.js.coffee +86 -0
  64. data/app/assets/javascripts/locomotive/views/content_types/custom_field_entry_view.js.coffee +104 -0
  65. data/app/assets/javascripts/locomotive/views/content_types/custom_fields_view.coffee +94 -0
  66. data/app/assets/javascripts/locomotive/views/content_types/edit_view.coffee +14 -0
  67. data/app/assets/javascripts/locomotive/views/content_types/new_view.js.coffee +11 -0
  68. data/app/assets/javascripts/locomotive/views/content_types/select_options_view.js.coffee +89 -0
  69. data/app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee +86 -0
  70. data/app/assets/javascripts/locomotive/views/editable_elements/control_view.js.coffee +24 -0
  71. data/app/assets/javascripts/locomotive/views/editable_elements/edit_all_view.js.coffee +83 -0
  72. data/app/assets/javascripts/locomotive/views/editable_elements/file_view.js.coffee +74 -0
  73. data/app/assets/javascripts/locomotive/views/editable_elements/long_text_view.js.coffee +36 -0
  74. data/app/assets/javascripts/locomotive/views/editable_elements/short_text_view.js.coffee +22 -0
  75. data/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee +124 -0
  76. data/app/assets/javascripts/locomotive/views/inline_editor/toolbar_view.js.coffee +145 -0
  77. data/app/assets/javascripts/locomotive/views/my_account/edit_view.js.coffee +24 -0
  78. data/app/assets/javascripts/locomotive/views/pages/_form_view.js.coffee +162 -0
  79. data/app/assets/javascripts/locomotive/views/pages/edit_view.js.coffee +31 -0
  80. data/app/assets/javascripts/locomotive/views/pages/index_view.js.coffee +11 -0
  81. data/app/assets/javascripts/locomotive/views/pages/list_view.js.coffee +40 -0
  82. data/app/assets/javascripts/locomotive/views/pages/new_view.js.coffee +8 -0
  83. data/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee +92 -0
  84. data/app/assets/javascripts/locomotive/views/shared/fields/file_view.js.coffee +88 -0
  85. data/app/assets/javascripts/locomotive/views/shared/fields/has_many_view.js.coffee +125 -0
  86. data/app/assets/javascripts/locomotive/views/shared/fields/many_to_many_view.js.coffee +131 -0
  87. data/app/assets/javascripts/locomotive/views/shared/fields/select_view.js.coffee +83 -0
  88. data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +138 -0
  89. data/app/assets/javascripts/locomotive/views/shared/list_item_view.js.coffee +22 -0
  90. data/app/assets/javascripts/locomotive/views/shared/list_view.js.coffee +53 -0
  91. data/app/assets/javascripts/locomotive/views/sites/domain_entry_view.js.coffee +26 -0
  92. data/app/assets/javascripts/locomotive/views/sites/domains_view.js.coffee +84 -0
  93. data/app/assets/javascripts/locomotive/views/sites/membership_entry_view.js.coffee +31 -0
  94. data/app/assets/javascripts/locomotive/views/sites/memberships_view.js.coffee +41 -0
  95. data/app/assets/javascripts/locomotive/views/sites/new_view.js.coffee +43 -0
  96. data/app/assets/javascripts/locomotive/views/snippets/_form_view.js.coffee +75 -0
  97. data/app/assets/javascripts/locomotive/views/snippets/edit_view.js.coffee +6 -0
  98. data/app/assets/javascripts/locomotive/views/snippets/list_item_view.js.coffee +8 -0
  99. data/app/assets/javascripts/locomotive/views/snippets/list_view.js.coffee +17 -0
  100. data/app/assets/javascripts/locomotive/views/snippets/new_view.js.coffee +8 -0
  101. data/app/assets/javascripts/locomotive/views/theme_assets/_form_view.js.coffee +104 -0
  102. data/app/assets/javascripts/locomotive/views/theme_assets/edit_view.js.coffee +16 -0
  103. data/app/assets/javascripts/locomotive/views/theme_assets/image_picker_view.js.coffee +48 -0
  104. data/app/assets/javascripts/locomotive/views/theme_assets/index_view.js.coffee +91 -0
  105. data/app/assets/javascripts/locomotive/views/theme_assets/list_item_view.js.coffee +8 -0
  106. data/app/assets/javascripts/locomotive/views/theme_assets/list_view.js.coffee +17 -0
  107. data/app/assets/javascripts/locomotive/views/theme_assets/new_view.js.coffee +8 -0
  108. data/app/assets/javascripts/locomotive/views/translations/_form_view.js.coffee +20 -0
  109. data/app/assets/javascripts/locomotive/views/translations/edit_view.js.coffee +6 -0
  110. data/app/assets/javascripts/locomotive/views/translations/new_view.js.coffee +8 -0
  111. data/app/assets/javascripts/tinymce/plugins/jqueryinlinepopups/editor_plugin.js +240 -0
  112. data/app/assets/javascripts/tinymce/plugins/locomotive_media/editor_plugin.js +78 -0
  113. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/content.css +66 -0
  114. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/dialog.css.scss +78 -0
  115. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/butt2.png +0 -0
  116. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/button-bg.png +0 -0
  117. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/buttons.png +0 -0
  118. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/down_arrow.gif +0 -0
  119. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/fade-butt.png +0 -0
  120. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/icons.png +0 -0
  121. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/items.gif +0 -0
  122. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/menu-arrow.png +0 -0
  123. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/menu-check.png +0 -0
  124. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/progress.gif +0 -0
  125. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/tabs.gif +0 -0
  126. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/img/toolbarbg.png +0 -0
  127. data/app/assets/javascripts/tinymce/themes/advanced/skins/locomotive/ui.css +1018 -0
  128. data/app/assets/stylesheets/locomotive.css +16 -0
  129. data/app/assets/stylesheets/locomotive/backoffice/_box.css.scss +157 -0
  130. data/app/assets/stylesheets/locomotive/backoffice/_buttons.css.scss +178 -0
  131. data/app/assets/stylesheets/locomotive/backoffice/application.css.scss +332 -0
  132. data/app/assets/stylesheets/locomotive/backoffice/codemirror_changes.css.scss +19 -0
  133. data/app/assets/stylesheets/locomotive/backoffice/content_assets.css.scss +130 -0
  134. data/app/assets/stylesheets/locomotive/backoffice/datepicker.css.scss +178 -0
  135. data/app/assets/stylesheets/locomotive/backoffice/dialog_changes.css.scss +141 -0
  136. data/app/assets/stylesheets/locomotive/backoffice/editable_elements.css.scss +71 -0
  137. data/app/assets/stylesheets/locomotive/backoffice/formtastic_changes.css.scss +735 -0
  138. data/app/assets/stylesheets/locomotive/backoffice/layout.css.scss +205 -0
  139. data/app/assets/stylesheets/locomotive/backoffice/menu.css +8 -0
  140. data/app/assets/stylesheets/locomotive/backoffice/menu/_colors.css.scss +125 -0
  141. data/app/assets/stylesheets/locomotive/backoffice/menu/_helpers.css.scss +6 -0
  142. data/app/assets/stylesheets/locomotive/backoffice/menu/default.css.scss +32 -0
  143. data/app/assets/stylesheets/locomotive/backoffice/menu/main.css.scss +127 -0
  144. data/app/assets/stylesheets/locomotive/backoffice/menu/sub.css.scss +276 -0
  145. data/app/assets/stylesheets/locomotive/backoffice/sites_picker.css.scss +12 -0
  146. data/app/assets/stylesheets/locomotive/inline_editor.css +13 -0
  147. data/app/assets/stylesheets/locomotive/inline_editor/_buttons.css.scss +60 -0
  148. data/app/assets/stylesheets/locomotive/inline_editor/layout.css.scss +22 -0
  149. data/app/assets/stylesheets/locomotive/inline_editor/toolbar.css.scss +114 -0
  150. data/app/assets/stylesheets/locomotive/not_logged_in.css +8 -0
  151. data/app/assets/stylesheets/locomotive/not_logged_in/installation.css.scss +62 -0
  152. data/app/assets/stylesheets/locomotive/not_logged_in/layout.css.scss +185 -0
  153. data/app/assets/stylesheets/locomotive/shared/_helpers.css.scss +150 -0
  154. data/app/assets/stylesheets/locomotive/shared/_picker.css.scss +73 -0
  155. data/app/assets/stylesheets/locomotive/shared/common.css.scss +34 -0
  156. data/app/assets/stylesheets/locomotive/shared/content_locale_picker.css.scss +80 -0
  157. data/app/assets/stylesheets/locomotive/shared/growl.css.scss +29 -0
  158. data/app/cells/locomotive/content_locale_picker/show.html.haml +7 -0
  159. data/app/cells/locomotive/content_locale_picker_cell.rb +21 -0
  160. data/app/cells/locomotive/global_actions/show.html.haml +12 -0
  161. data/app/cells/locomotive/global_actions_cell.rb +36 -0
  162. data/app/cells/locomotive/main_menu/show.html.haml +13 -0
  163. data/app/cells/locomotive/main_menu_cell.rb +12 -0
  164. data/app/cells/locomotive/menu/show.html.haml +1 -0
  165. data/app/cells/locomotive/menu_cell.rb +102 -0
  166. data/app/cells/locomotive/settings_menu_cell.rb +14 -0
  167. data/app/cells/locomotive/sub_menu/show.html.haml +4 -0
  168. data/app/cells/locomotive/sub_menu_cell.rb +13 -0
  169. data/app/controllers/locomotive/accounts_controller.rb +18 -0
  170. data/app/controllers/locomotive/api/accounts_controller.rb +79 -0
  171. data/app/controllers/locomotive/api/base_controller.rb +50 -0
  172. data/app/controllers/locomotive/api/content_assets_controller.rb +39 -0
  173. data/app/controllers/locomotive/api/content_entries_controller.rb +45 -0
  174. data/app/controllers/locomotive/api/content_types_controller.rb +39 -0
  175. data/app/controllers/locomotive/api/current_site_controller.rb +58 -0
  176. data/app/controllers/locomotive/api/documentation_controller.rb +15 -0
  177. data/app/controllers/locomotive/api/memberships_controller.rb +97 -0
  178. data/app/controllers/locomotive/api/my_account_controller.rb +35 -0
  179. data/app/controllers/locomotive/api/pages_controller.rb +41 -0
  180. data/app/controllers/locomotive/api/sites_controller.rb +93 -0
  181. data/app/controllers/locomotive/api/snippets_controller.rb +40 -0
  182. data/app/controllers/locomotive/api/theme_assets_controller.rb +39 -0
  183. data/app/controllers/locomotive/api/tokens_controller.rb +54 -0
  184. data/app/controllers/locomotive/api/translations_controller.rb +31 -0
  185. data/app/controllers/locomotive/base_controller.rb +61 -0
  186. data/app/controllers/locomotive/content_assets_controller.rb +23 -0
  187. data/app/controllers/locomotive/content_entries_controller.rb +71 -0
  188. data/app/controllers/locomotive/content_types_controller.rb +40 -0
  189. data/app/controllers/locomotive/current_site_controller.rb +52 -0
  190. data/app/controllers/locomotive/installation_controller.rb +72 -0
  191. data/app/controllers/locomotive/memberships_controller.rb +29 -0
  192. data/app/controllers/locomotive/my_account_controller.rb +24 -0
  193. data/app/controllers/locomotive/pages_controller.rb +63 -0
  194. data/app/controllers/locomotive/passwords_controller.rb +19 -0
  195. data/app/controllers/locomotive/public/base_controller.rb +22 -0
  196. data/app/controllers/locomotive/public/content_entries_controller.rb +55 -0
  197. data/app/controllers/locomotive/public/pages_controller.rb +50 -0
  198. data/app/controllers/locomotive/public/robots_controller.rb +16 -0
  199. data/app/controllers/locomotive/public/sitemaps_controller.rb +14 -0
  200. data/app/controllers/locomotive/sessions_controller.rb +29 -0
  201. data/app/controllers/locomotive/sites_controller.rb +33 -0
  202. data/app/controllers/locomotive/snippets_controller.rb +47 -0
  203. data/app/controllers/locomotive/theme_assets_controller.rb +52 -0
  204. data/app/controllers/locomotive/translations_controller.rb +32 -0
  205. data/app/helpers/locomotive/accounts_helper.rb +13 -0
  206. data/app/helpers/locomotive/base_helper.rb +182 -0
  207. data/app/helpers/locomotive/content_entries_helper.rb +15 -0
  208. data/app/helpers/locomotive/content_types_helper.rb +72 -0
  209. data/app/helpers/locomotive/custom_fields_helper.rb +70 -0
  210. data/app/helpers/locomotive/installation_helper.rb +9 -0
  211. data/app/helpers/locomotive/pages_helper.rb +95 -0
  212. data/app/helpers/locomotive/sites_helper.rb +15 -0
  213. data/app/helpers/locomotive/snippets_helper.rb +20 -0
  214. data/app/helpers/locomotive/theme_assets_helper.rb +30 -0
  215. data/app/helpers/locomotive/translations_helper.rb +19 -0
  216. data/app/inputs/locomotive/code_input.rb +51 -0
  217. data/app/inputs/locomotive/empty_input.rb +35 -0
  218. data/app/inputs/locomotive/file_input.rb +45 -0
  219. data/app/inputs/locomotive/locale_input.rb +40 -0
  220. data/app/inputs/locomotive/locales_input.rb +60 -0
  221. data/app/inputs/locomotive/rte_input.rb +13 -0
  222. data/app/inputs/locomotive/small_code_input.rb +22 -0
  223. data/app/inputs/locomotive/subdomain_input.rb +22 -0
  224. data/app/inputs/locomotive/toggle_input.rb +13 -0
  225. data/app/mailers/locomotive/devise_mailer.rb +10 -0
  226. data/app/mailers/locomotive/notifications.rb +15 -0
  227. data/app/models/locomotive/ability.rb +89 -0
  228. data/app/models/locomotive/account.rb +117 -0
  229. data/app/models/locomotive/content_asset.rb +40 -0
  230. data/app/models/locomotive/content_entry.rb +197 -0
  231. data/app/models/locomotive/content_type.rb +224 -0
  232. data/app/models/locomotive/editable_control.rb +52 -0
  233. data/app/models/locomotive/editable_element.rb +122 -0
  234. data/app/models/locomotive/editable_file.rb +85 -0
  235. data/app/models/locomotive/editable_long_text.rb +5 -0
  236. data/app/models/locomotive/editable_short_text.rb +66 -0
  237. data/app/models/locomotive/extensions/asset/types.rb +31 -0
  238. data/app/models/locomotive/extensions/asset/vignette.rb +19 -0
  239. data/app/models/locomotive/extensions/content_type/default_values.rb +57 -0
  240. data/app/models/locomotive/extensions/content_type/item_template.rb +49 -0
  241. data/app/models/locomotive/extensions/content_type/sync.rb +62 -0
  242. data/app/models/locomotive/extensions/page/editable_elements.rb +105 -0
  243. data/app/models/locomotive/extensions/page/listed.rb +18 -0
  244. data/app/models/locomotive/extensions/page/parse.rb +125 -0
  245. data/app/models/locomotive/extensions/page/redirect.rb +25 -0
  246. data/app/models/locomotive/extensions/page/render.rb +93 -0
  247. data/app/models/locomotive/extensions/page/templatized.rb +163 -0
  248. data/app/models/locomotive/extensions/page/tree.rb +133 -0
  249. data/app/models/locomotive/extensions/shared/seo.rb +16 -0
  250. data/app/models/locomotive/extensions/site/first_installation.rb +20 -0
  251. data/app/models/locomotive/extensions/site/locales.rb +112 -0
  252. data/app/models/locomotive/extensions/site/subdomain_domains.rb +91 -0
  253. data/app/models/locomotive/membership.rb +75 -0
  254. data/app/models/locomotive/page.rb +130 -0
  255. data/app/models/locomotive/site.rb +79 -0
  256. data/app/models/locomotive/snippet.rb +70 -0
  257. data/app/models/locomotive/theme_asset.rb +175 -0
  258. data/app/models/locomotive/translation.rb +32 -0
  259. data/app/presenters/locomotive/account_presenter.rb +19 -0
  260. data/app/presenters/locomotive/base_presenter.rb +99 -0
  261. data/app/presenters/locomotive/content_asset_presenter.rb +43 -0
  262. data/app/presenters/locomotive/content_entry_presenter.rb +217 -0
  263. data/app/presenters/locomotive/content_field_presenter.rb +71 -0
  264. data/app/presenters/locomotive/content_type_presenter.rb +68 -0
  265. data/app/presenters/locomotive/editable_control_presenter.rb +19 -0
  266. data/app/presenters/locomotive/editable_element_presenter.rb +40 -0
  267. data/app/presenters/locomotive/editable_file_presenter.rb +29 -0
  268. data/app/presenters/locomotive/editable_long_text_presenter.rb +5 -0
  269. data/app/presenters/locomotive/editable_short_text_presenter.rb +27 -0
  270. data/app/presenters/locomotive/membership_presenter.rb +36 -0
  271. data/app/presenters/locomotive/page_presenter.rb +58 -0
  272. data/app/presenters/locomotive/site_presenter.rb +36 -0
  273. data/app/presenters/locomotive/snippet_presenter.rb +22 -0
  274. data/app/presenters/locomotive/theme_asset_presenter.rb +61 -0
  275. data/app/presenters/locomotive/translation_presenter.rb +9 -0
  276. data/app/uploaders/locomotive/content_asset_uploader.rb +13 -0
  277. data/app/uploaders/locomotive/editable_file_uploader.rb +15 -0
  278. data/app/uploaders/locomotive/theme_asset_uploader.rb +28 -0
  279. data/app/views/locomotive/accounts/new.html.haml +21 -0
  280. data/app/views/locomotive/content_assets/_asset.html.haml +5 -0
  281. data/app/views/locomotive/content_assets/_picker.html.haml +33 -0
  282. data/app/views/locomotive/content_entries/_form.html.haml +22 -0
  283. data/app/views/locomotive/content_entries/_list.html.haml +18 -0
  284. data/app/views/locomotive/content_entries/edit.html.haml +21 -0
  285. data/app/views/locomotive/content_entries/index.html.haml +32 -0
  286. data/app/views/locomotive/content_entries/new.html.haml +19 -0
  287. data/app/views/locomotive/content_types/_form.html.haml +39 -0
  288. data/app/views/locomotive/content_types/edit.html.haml +19 -0
  289. data/app/views/locomotive/content_types/new.html.haml +15 -0
  290. data/app/views/locomotive/current_site/_form.html.haml +36 -0
  291. data/app/views/locomotive/current_site/edit.html.haml +19 -0
  292. data/app/views/locomotive/custom_fields/_form.html.haml +61 -0
  293. data/app/views/locomotive/custom_fields/_select_templates.html.haml +16 -0
  294. data/app/views/locomotive/custom_fields/types/_belongs_to.html.haml +5 -0
  295. data/app/views/locomotive/custom_fields/types/_boolean.html.haml +4 -0
  296. data/app/views/locomotive/custom_fields/types/_date.html.haml +5 -0
  297. data/app/views/locomotive/custom_fields/types/_file.html.haml +4 -0
  298. data/app/views/locomotive/custom_fields/types/_has_many.html.haml +70 -0
  299. data/app/views/locomotive/custom_fields/types/_many_to_many.html.haml +41 -0
  300. data/app/views/locomotive/custom_fields/types/_select.html.haml +34 -0
  301. data/app/views/locomotive/custom_fields/types/_string.html.haml +4 -0
  302. data/app/views/locomotive/custom_fields/types/_text.html.haml +5 -0
  303. data/app/views/locomotive/devise_mailer/reset_password_instructions.html.haml +12 -0
  304. data/app/views/locomotive/errors/404.html.haml +7 -0
  305. data/app/views/locomotive/errors/500.html.haml +7 -0
  306. data/app/views/locomotive/errors/no_page.html.haml +1 -0
  307. data/app/views/locomotive/errors/no_site.html.haml +1 -0
  308. data/app/views/locomotive/installation/step_1.html.haml +23 -0
  309. data/app/views/locomotive/installation/step_2.html.haml +24 -0
  310. data/app/views/locomotive/layouts/application.html.haml +34 -0
  311. data/app/views/locomotive/layouts/error.html.haml +1 -0
  312. data/app/views/locomotive/layouts/not_logged_in.html.haml +18 -0
  313. data/app/views/locomotive/memberships/new.html.haml +14 -0
  314. data/app/views/locomotive/my_account/edit.html.haml +40 -0
  315. data/app/views/locomotive/notifications/new_content_entry.html.haml +29 -0
  316. data/app/views/locomotive/pages/_editable_elements.html.haml +64 -0
  317. data/app/views/locomotive/pages/_form.html.haml +61 -0
  318. data/app/views/locomotive/pages/_page.html.haml +42 -0
  319. data/app/views/locomotive/pages/edit.html.haml +18 -0
  320. data/app/views/locomotive/pages/index.html.haml +19 -0
  321. data/app/views/locomotive/pages/new.html.haml +15 -0
  322. data/app/views/locomotive/passwords/edit.html.haml +18 -0
  323. data/app/views/locomotive/passwords/new.html.haml +17 -0
  324. data/app/views/locomotive/public/pages/show_toolbar.html.haml +64 -0
  325. data/app/views/locomotive/public/sitemaps/show.xml.builder +29 -0
  326. data/app/views/locomotive/sessions/new.html.haml +17 -0
  327. data/app/views/locomotive/shared/_footer.html.haml +1 -0
  328. data/app/views/locomotive/shared/_form_actions.html.haml +14 -0
  329. data/app/views/locomotive/shared/_head.html.haml +38 -0
  330. data/app/views/locomotive/shared/_header.html.haml +10 -0
  331. data/app/views/locomotive/shared/_locale_picker_link.html.haml +6 -0
  332. data/app/views/locomotive/shared/_main_app_head.html.haml +1 -0
  333. data/app/views/locomotive/shared/_site_picker.html.haml +10 -0
  334. data/app/views/locomotive/shared/actions/_contents.html.haml +7 -0
  335. data/app/views/locomotive/shared/menu/_contents.html.haml +51 -0
  336. data/app/views/locomotive/sites/_domains.html.haml +22 -0
  337. data/app/views/locomotive/sites/_form.html.haml +12 -0
  338. data/app/views/locomotive/sites/_memberships.html.haml +27 -0
  339. data/app/views/locomotive/sites/new.html.haml +12 -0
  340. data/app/views/locomotive/snippets/_form.html.haml +13 -0
  341. data/app/views/locomotive/snippets/_snippet.html.haml +8 -0
  342. data/app/views/locomotive/snippets/edit.html.haml +18 -0
  343. data/app/views/locomotive/snippets/new.html.haml +15 -0
  344. data/app/views/locomotive/theme_assets/_asset.html.haml +11 -0
  345. data/app/views/locomotive/theme_assets/_form.html.haml +35 -0
  346. data/app/views/locomotive/theme_assets/_list.html.haml +7 -0
  347. data/app/views/locomotive/theme_assets/_picker.html.haml +25 -0
  348. data/app/views/locomotive/theme_assets/edit.html.haml +21 -0
  349. data/app/views/locomotive/theme_assets/index.html.haml +50 -0
  350. data/app/views/locomotive/theme_assets/new.html.haml +12 -0
  351. data/app/views/locomotive/translations/_form.html.haml +12 -0
  352. data/app/views/locomotive/translations/edit.html.haml +15 -0
  353. data/app/views/locomotive/translations/index.html.haml +26 -0
  354. data/app/views/locomotive/translations/new.html.haml +12 -0
  355. data/config/cucumber.yml +8 -0
  356. data/config/initializers/deny_phantomjs_ttf.rb +29 -0
  357. data/config/initializers/devise.rb +15 -0
  358. data/config/initializers/formtastic.rb +4 -0
  359. data/config/initializers/haml.rb +2 -0
  360. data/config/initializers/locomotive_loaded_first.rb +19 -0
  361. data/config/locales/admin_ui.de.yml +316 -0
  362. data/config/locales/admin_ui.en.yml +332 -0
  363. data/config/locales/admin_ui.es.yml +296 -0
  364. data/config/locales/admin_ui.et.yml +315 -0
  365. data/config/locales/admin_ui.fr.yml +326 -0
  366. data/config/locales/admin_ui.it.yml +295 -0
  367. data/config/locales/admin_ui.nb.yml +314 -0
  368. data/config/locales/admin_ui.nl.yml +279 -0
  369. data/config/locales/admin_ui.pl.yml +319 -0
  370. data/config/locales/admin_ui.pt-BR.yml +274 -0
  371. data/config/locales/admin_ui.ru.yml +313 -0
  372. data/config/locales/carrierwave.de.yml +4 -0
  373. data/config/locales/carrierwave.en.yml +4 -0
  374. data/config/locales/carrierwave.es.yml +4 -0
  375. data/config/locales/carrierwave.et.yml +4 -0
  376. data/config/locales/carrierwave.fr.yml +4 -0
  377. data/config/locales/carrierwave.it.yml +4 -0
  378. data/config/locales/carrierwave.nb.yml +4 -0
  379. data/config/locales/carrierwave.nl.yml +4 -0
  380. data/config/locales/carrierwave.pl.yml +4 -0
  381. data/config/locales/carrierwave.pt-BR.yml +4 -0
  382. data/config/locales/carrierwave.ru.yml +4 -0
  383. data/config/locales/default.de.yml +244 -0
  384. data/config/locales/default.en.yml +43 -0
  385. data/config/locales/default.es.yml +216 -0
  386. data/config/locales/default.et.yml +240 -0
  387. data/config/locales/default.fr.yml +224 -0
  388. data/config/locales/default.it.yml +243 -0
  389. data/config/locales/default.nb.yml +313 -0
  390. data/config/locales/default.nl.yml +170 -0
  391. data/config/locales/default.pl.yml +317 -0
  392. data/config/locales/default.pt-BR.yml +211 -0
  393. data/config/locales/default.ru.yml +279 -0
  394. data/config/locales/devise.de.yml +62 -0
  395. data/config/locales/devise.en.yml +63 -0
  396. data/config/locales/devise.es.yml +63 -0
  397. data/config/locales/devise.et.yml +64 -0
  398. data/config/locales/devise.fr.yml +67 -0
  399. data/config/locales/devise.it.yml +63 -0
  400. data/config/locales/devise.nb.yml +63 -0
  401. data/config/locales/devise.nl.yml +63 -0
  402. data/config/locales/devise.pl.yml +63 -0
  403. data/config/locales/devise.pt-BR.yml +61 -0
  404. data/config/locales/devise.ru.yml +63 -0
  405. data/config/locales/flash.de.yml +106 -0
  406. data/config/locales/flash.en.yml +115 -0
  407. data/config/locales/flash.es.yml +106 -0
  408. data/config/locales/flash.et.yml +106 -0
  409. data/config/locales/flash.fr.yml +106 -0
  410. data/config/locales/flash.it.yml +106 -0
  411. data/config/locales/flash.nb.yml +106 -0
  412. data/config/locales/flash.nl.yml +106 -0
  413. data/config/locales/flash.pl.yml +106 -0
  414. data/config/locales/flash.pt-BR.yml +106 -0
  415. data/config/locales/flash.ru.yml +106 -0
  416. data/config/locales/formtastic.de.yml +97 -0
  417. data/config/locales/formtastic.en.yml +105 -0
  418. data/config/locales/formtastic.es.yml +84 -0
  419. data/config/locales/formtastic.et.yml +103 -0
  420. data/config/locales/formtastic.fr.yml +94 -0
  421. data/config/locales/formtastic.it.yml +99 -0
  422. data/config/locales/formtastic.nb.yml +103 -0
  423. data/config/locales/formtastic.nl.yml +85 -0
  424. data/config/locales/formtastic.pl.yml +105 -0
  425. data/config/locales/formtastic.pt-BR.yml +70 -0
  426. data/config/locales/formtastic.ru.yml +103 -0
  427. data/config/routes.rb +116 -0
  428. data/lib/generators/locomotive/install/install_generator.rb +35 -0
  429. data/lib/generators/locomotive/install/templates/README +26 -0
  430. data/lib/generators/locomotive/install/templates/carrierwave.rb +28 -0
  431. data/lib/generators/locomotive/install/templates/dragonfly.rb +22 -0
  432. data/lib/generators/locomotive/install/templates/locomotive.rb +69 -0
  433. data/lib/generators/locomotive/install/templates/mongoid.yml +34 -0
  434. data/lib/locomotive.rb +136 -0
  435. data/lib/locomotive/action_controller.rb +5 -0
  436. data/lib/locomotive/action_controller/locale_helpers.rb +61 -0
  437. data/lib/locomotive/action_controller/public_responder.rb +17 -0
  438. data/lib/locomotive/action_controller/responder.rb +78 -0
  439. data/lib/locomotive/action_controller/section_helpers.rb +29 -0
  440. data/lib/locomotive/action_controller/url_helpers.rb +38 -0
  441. data/lib/locomotive/carrierwave.rb +10 -0
  442. data/lib/locomotive/carrierwave/asset.rb +72 -0
  443. data/lib/locomotive/carrierwave/base.rb +15 -0
  444. data/lib/locomotive/carrierwave/patches.rb +32 -0
  445. data/lib/locomotive/configuration.rb +122 -0
  446. data/lib/locomotive/core_ext.rb +64 -0
  447. data/lib/locomotive/custom_fields.rb +66 -0
  448. data/lib/locomotive/dependencies.rb +30 -0
  449. data/lib/locomotive/devise.rb +1 -0
  450. data/lib/locomotive/dragonfly.rb +38 -0
  451. data/lib/locomotive/engine.rb +37 -0
  452. data/lib/locomotive/formtastic.rb +13 -0
  453. data/lib/locomotive/haml.rb +1 -0
  454. data/lib/locomotive/httparty.rb +2 -0
  455. data/lib/locomotive/httparty/patches.rb +18 -0
  456. data/lib/locomotive/httparty/webservice.rb +42 -0
  457. data/lib/locomotive/kaminari.rb +35 -0
  458. data/lib/locomotive/liquid.rb +7 -0
  459. data/lib/locomotive/liquid/drops/base.rb +42 -0
  460. data/lib/locomotive/liquid/drops/content_entry.rb +76 -0
  461. data/lib/locomotive/liquid/drops/content_types.rb +50 -0
  462. data/lib/locomotive/liquid/drops/current_user.rb +21 -0
  463. data/lib/locomotive/liquid/drops/page.rb +55 -0
  464. data/lib/locomotive/liquid/drops/proxy_collection.rb +56 -0
  465. data/lib/locomotive/liquid/drops/site.rb +19 -0
  466. data/lib/locomotive/liquid/drops/uploader.rb +15 -0
  467. data/lib/locomotive/liquid/errors.rb +7 -0
  468. data/lib/locomotive/liquid/filters/base.rb +47 -0
  469. data/lib/locomotive/liquid/filters/date.rb +54 -0
  470. data/lib/locomotive/liquid/filters/html.rb +115 -0
  471. data/lib/locomotive/liquid/filters/misc.rb +65 -0
  472. data/lib/locomotive/liquid/filters/resize.rb +16 -0
  473. data/lib/locomotive/liquid/filters/text.rb +45 -0
  474. data/lib/locomotive/liquid/filters/translate.rb +16 -0
  475. data/lib/locomotive/liquid/patches.rb +21 -0
  476. data/lib/locomotive/liquid/tags/consume.rb +67 -0
  477. data/lib/locomotive/liquid/tags/csrf.rb +40 -0
  478. data/lib/locomotive/liquid/tags/editable.rb +5 -0
  479. data/lib/locomotive/liquid/tags/editable/base.rb +88 -0
  480. data/lib/locomotive/liquid/tags/editable/control.rb +31 -0
  481. data/lib/locomotive/liquid/tags/editable/file.rb +39 -0
  482. data/lib/locomotive/liquid/tags/editable/long_text.rb +33 -0
  483. data/lib/locomotive/liquid/tags/editable/short_text.rb +41 -0
  484. data/lib/locomotive/liquid/tags/extends.rb +47 -0
  485. data/lib/locomotive/liquid/tags/google_analytics.rb +39 -0
  486. data/lib/locomotive/liquid/tags/inherited_block.rb +31 -0
  487. data/lib/locomotive/liquid/tags/inline_editor.rb +40 -0
  488. data/lib/locomotive/liquid/tags/locale_switcher.rb +83 -0
  489. data/lib/locomotive/liquid/tags/nav.rb +155 -0
  490. data/lib/locomotive/liquid/tags/paginate.rb +111 -0
  491. data/lib/locomotive/liquid/tags/seo.rb +72 -0
  492. data/lib/locomotive/liquid/tags/snippet.rb +75 -0
  493. data/lib/locomotive/liquid/tags/with_scope.rb +47 -0
  494. data/lib/locomotive/logger.rb +11 -0
  495. data/lib/locomotive/middlewares.rb +4 -0
  496. data/lib/locomotive/middlewares/cache.rb +27 -0
  497. data/lib/locomotive/middlewares/fonts.rb +42 -0
  498. data/lib/locomotive/middlewares/inline_editor.rb +36 -0
  499. data/lib/locomotive/middlewares/seo_trailing_slash.rb +24 -0
  500. data/lib/locomotive/misc/api_documentation.rb +96 -0
  501. data/lib/locomotive/misc/api_documentation/bootstrap.html.haml +119 -0
  502. data/lib/locomotive/mongoid.rb +4 -0
  503. data/lib/locomotive/mongoid/document.rb +19 -0
  504. data/lib/locomotive/mongoid/liquid.rb +39 -0
  505. data/lib/locomotive/mongoid/patches.rb +106 -0
  506. data/lib/locomotive/mongoid/presenter.rb +73 -0
  507. data/lib/locomotive/presentable.rb +212 -0
  508. data/lib/locomotive/rails.rb +1 -0
  509. data/lib/locomotive/rails/action_view.rb +9 -0
  510. data/lib/locomotive/regexps.rb +11 -0
  511. data/lib/locomotive/render.rb +177 -0
  512. data/lib/locomotive/routing.rb +2 -0
  513. data/lib/locomotive/routing/default_constraint.rb +42 -0
  514. data/lib/locomotive/routing/site_dispatcher.rb +54 -0
  515. data/lib/locomotive/session_store.rb +64 -0
  516. data/lib/locomotive/version.rb +3 -0
  517. data/lib/locomotive_cms.rb +1 -0
  518. data/lib/tasks/cucumber.rake +66 -0
  519. data/lib/tasks/locomotive.rake +220 -0
  520. data/public/favicon.ico +0 -0
  521. data/vendor/assets/fonts/locomotive/fontawesome-webfont.eot +0 -0
  522. data/vendor/assets/fonts/locomotive/fontawesome-webfont.svg +255 -0
  523. data/vendor/assets/fonts/locomotive/fontawesome-webfont.ttf +0 -0
  524. data/vendor/assets/fonts/locomotive/fontawesome-webfont.woff +0 -0
  525. data/vendor/assets/javascripts/locomotive/ICanHandlebarz.js +88 -0
  526. data/vendor/assets/javascripts/locomotive/backbone.modelbinding.js +565 -0
  527. data/vendor/assets/javascripts/locomotive/backbone.sync.js +113 -0
  528. data/vendor/assets/javascripts/locomotive/cmd.js +31 -0
  529. data/vendor/assets/javascripts/locomotive/cookies.js +96 -0
  530. data/vendor/assets/javascripts/locomotive/datepicker_i18n.js.erb +28 -0
  531. data/vendor/assets/javascripts/locomotive/editable_field.js +50 -0
  532. data/vendor/assets/javascripts/locomotive/form_submit_notification.js +39 -0
  533. data/vendor/assets/javascripts/locomotive/growl.js +143 -0
  534. data/vendor/assets/javascripts/locomotive/handlebars.js +1493 -0
  535. data/vendor/assets/javascripts/locomotive/liquid_mode.js +42 -0
  536. data/vendor/assets/javascripts/locomotive/menu_toggler.js +37 -0
  537. data/vendor/assets/javascripts/locomotive/resize.js +9 -0
  538. data/vendor/assets/javascripts/locomotive/slugify.js +31 -0
  539. data/vendor/assets/javascripts/locomotive/smartupdater.js +296 -0
  540. data/vendor/assets/javascripts/locomotive/subscribe.js +367 -0
  541. data/vendor/assets/javascripts/locomotive/toggle.js +143 -0
  542. data/vendor/assets/javascripts/locomotive/vendor.js +1 -0
  543. data/vendor/assets/stylesheets/locomotive/blueprint/ie.css +26 -0
  544. data/vendor/assets/stylesheets/locomotive/blueprint/print.css +30 -0
  545. data/vendor/assets/stylesheets/locomotive/blueprint/screen.css +253 -0
  546. data/vendor/assets/stylesheets/locomotive/font-awesome.scss +329 -0
  547. data/vendor/assets/stylesheets/locomotive/jquery.css +3 -0
  548. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  549. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  550. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  551. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  552. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  553. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  554. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  555. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  556. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-icons_222222_256x240.png +0 -0
  557. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-icons_2e83ff_256x240.png +0 -0
  558. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-icons_454545_256x240.png +0 -0
  559. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-icons_888888_256x240.png +0 -0
  560. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-icons_cd0a0a_256x240.png +0 -0
  561. data/vendor/assets/stylesheets/locomotive/jquery/images/ui-icons_ffffff_256x240.png +0 -0
  562. data/vendor/assets/stylesheets/locomotive/jquery/ui.css +406 -0
  563. data/vendor/assets/stylesheets/locomotive/liquid_mode.css +7 -0
  564. data/vendor/assets/stylesheets/locomotive/toggle.css.scss +75 -0
  565. metadata +1171 -0
@@ -0,0 +1,143 @@
1
+ /**
2
+ *
3
+ * Copyright (c) 2009 Tony Dewan (http://www.tonydewan.com/)
4
+ * Licensed under the MIT License:
5
+ * http://www.opensource.org/licenses/mit-license.php
6
+ *
7
+ * Project home:
8
+ * http://www.tonydewan.com/code/checkToggle/
9
+ *
10
+ */
11
+
12
+ (function($) {
13
+ /**
14
+ * Version 1.0
15
+ * Replaces checkboxes with a toggle switch.
16
+ * usage: $("input[type='checkbox']").checkToggle(settings);
17
+ *
18
+ * @name checkToggle
19
+ * @type jquery
20
+ * @param Hash settings Settings
21
+ * @param String settings[on_label] Text used for the left-side (on) label. Defaults to "On"
22
+ * @param String settings[off_label] Text used for the right-side (off) label. Defaults to "Off"
23
+ * @param String settings[on_bg_color] Hex background color for On state
24
+ * @param String settings[off_bg_color] Hex background color for Off state
25
+ * @param String settings[skin_dir] Document relative (or absolute) path to the skin directory
26
+ * @param Bool settings[bypass_skin] Flags whether to bypass the inclusion of the skin.css file. Used if you've included the skin styles somewhere else already.
27
+ */
28
+
29
+ $.fn.checkToggle = function(action, settings) {
30
+
31
+ if (typeof(action) == 'object' || typeof(action) == 'undefined') {
32
+ settings = action || {};
33
+ action = 'initialize';
34
+ }
35
+
36
+ settings = $.extend({
37
+ toggle_width: 28,
38
+ on_label : 'Yes',
39
+ on_label_color : '#333333',
40
+ on_bg_color : '#8FE38D',
41
+ off_label : 'No',
42
+ off_label_color : '#cccccc',
43
+ off_bg_color: '#F8837C',
44
+ skin_dir : "skin/",
45
+ bypass_skin : false,
46
+
47
+ on_callback : function(el) {},
48
+ off_callback : function(el) {}
49
+ }, settings);
50
+
51
+ // FIXME (Didier Lafforgue) it works but it doesn't scale if we handle another locale
52
+ if (typeof window.locale != 'undefined' && window.locale == 'fr') {
53
+ settings.on_label = 'Oui';
54
+ settings.off_label = 'Non';
55
+ }
56
+
57
+ function showUncheckedState(element) {
58
+ element.parent().prev().css("color",settings.off_label_color).removeClass('on');
59
+ element.parent().next().css("color",settings.on_label_color).addClass('on');
60
+ element.parent().css("background-color", settings.off_bg_color).removeClass('on');
61
+ element.parent().parent().prev().removeAttr("checked").trigger('change');
62
+ element.removeClass("left").addClass("right");
63
+ }
64
+
65
+ function showCheckedState(element) {
66
+ element.parent().prev().css("color",settings.on_label_color).addClass('on');
67
+ element.parent().next().css("color",settings.off_label_color).removeClass('on');
68
+ element.parent().css("background-color", settings.on_bg_color).addClass('on');
69
+ element.parent().parent().prev().attr("checked", "checked").trigger('change');
70
+ element.removeClass("right").addClass("left");
71
+ }
72
+
73
+ function toggle(element){
74
+ var checked = $(element).parent().parent().prev().is(':checked');
75
+
76
+ // if it's set to on
77
+ if(checked){
78
+
79
+ $(element).animate({marginLeft: '0px'}, 100,
80
+
81
+ // callback function
82
+ function(){
83
+ showUncheckedState($(element));
84
+
85
+ if (typeof $.fn.publish != 'undefined')
86
+ $.publish('toggle.' + $(element).parent().parent().prev().attr('id') + '.unchecked', []);
87
+
88
+ settings.off_callback();
89
+ });
90
+
91
+ } else {
92
+ $(element).animate({marginLeft: settings.toggle_width + 'px'}, 100,
93
+
94
+ // callback function
95
+ function(){
96
+ showCheckedState($(element));
97
+
98
+ if (typeof $.fn.publish != 'undefined')
99
+ $.publish('toggle.' + $(element).parent().parent().prev().attr('id') + '.checked', []);
100
+
101
+ settings.on_callback();
102
+ });
103
+ }
104
+
105
+ };
106
+
107
+ return this.each(function () {
108
+
109
+ if (action == 'initialize') {// initialize the UI element
110
+
111
+ if ($(this).hasClass('simple')) return;
112
+
113
+ // hide the checkbox
114
+ $(this).css('display','none');
115
+
116
+ // insert the new toggle markup
117
+ if($(this).attr("checked") == "checked" || $(this).attr("checked") == true){
118
+ $(this).after('<div class="toggleSwitch"><span class="leftLabel on">'+settings.on_label+'<\/span><div class="switchArea on" style="background-color: '+settings.on_bg_color+'"><span class="switchHandle left" style="margin-left: ' + settings.toggle_width + 'px;"><\/span><\/div><span class="rightLabel" style="color:#cccccc">'+settings.off_label+'<\/span><\/div>');
119
+ }else{
120
+ $(this).after('<div class="toggleSwitch"><span class="leftLabel" style="color:#cccccc;">'+settings.on_label+'<\/span><div class="switchArea" style="background-color: '+settings.off_bg_color+'"><span class="switchHandle right" style="margin-left:0px"><\/span><\/div><span class="rightLabel on">'+settings.off_label+'<\/span><\/div>');
121
+ }
122
+
123
+ // Bind the switchHandle click events to the internal toggle function
124
+ $(this).next().find('div.switchArea').bind("click", function () {
125
+ toggle($(this).find('.switchHandle'));
126
+ })
127
+
128
+ } else if (action == 'sync') {
129
+ element = $(this).next().find('.switchHandle');
130
+
131
+ if ($(this).is(':checked'))
132
+ showCheckedState(element);
133
+ else
134
+ showUncheckedState(element);
135
+ } else {
136
+ console.log('unknown action for the checkToggle plugin')
137
+ }
138
+
139
+ });
140
+
141
+ };
142
+
143
+ })(jQuery);
@@ -0,0 +1 @@
1
+ //= require_directory .
@@ -0,0 +1,26 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+
4
+ Blueprint CSS Framework 0.8
5
+ http://blueprintcss.org
6
+
7
+ * Copyright (c) 2007-Present. See LICENSE for more info.
8
+ * See README for instructions on how to use Blueprint.
9
+ * For credits and origins, see AUTHORS.
10
+ * This is a compressed file. See the sources in the 'src' directory.
11
+
12
+ ----------------------------------------------------------------------- */
13
+
14
+ /* ie.css */
15
+ body {text-align:center;}
16
+ .container {text-align:left;}
17
+ * html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {overflow-x:hidden;}
18
+ * html legend {margin:0px -8px 16px 0;padding:0;}
19
+ ol {margin-left:2em;}
20
+ sup {vertical-align:text-top;}
21
+ sub {vertical-align:text-bottom;}
22
+ html>body p code {*white-space:normal;}
23
+ hr {margin:-8px auto 11px;}
24
+ .clearfix, .container {display:inline-block;}
25
+ * html .clearfix, * html .container {height:1%;}
26
+ fieldset {padding-top:0;}
@@ -0,0 +1,30 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+
4
+ Blueprint CSS Framework 0.8
5
+ http://blueprintcss.org
6
+
7
+ * Copyright (c) 2007-Present. See LICENSE for more info.
8
+ * See README for instructions on how to use Blueprint.
9
+ * For credits and origins, see AUTHORS.
10
+ * This is a compressed file. See the sources in the 'src' directory.
11
+
12
+ ----------------------------------------------------------------------- */
13
+
14
+ /* print.css */
15
+ body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
16
+ .container {background:none;}
17
+ hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
18
+ hr.space {background:#fff;color:#fff;}
19
+ h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
20
+ code {font:.9em "Courier New", Monaco, Courier, monospace;}
21
+ img {float:left;margin:1.5em 1.5em 1.5em 0;}
22
+ a img {border:none;}
23
+ p img.top {margin-top:0;}
24
+ blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
25
+ .small {font-size:.9em;}
26
+ .large {font-size:1.1em;}
27
+ .quiet {color:#999;}
28
+ .hide {display:none;}
29
+ a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
30
+ a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
@@ -0,0 +1,253 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+
4
+ Blueprint CSS Framework 0.8
5
+ http://blueprintcss.org
6
+
7
+ * Copyright (c) 2007-Present. See LICENSE for more info.
8
+ * See README for instructions on how to use Blueprint.
9
+ * For credits and origins, see AUTHORS.
10
+ * This is a compressed file. See the sources in the 'src' directory.
11
+
12
+ ----------------------------------------------------------------------- */
13
+
14
+ /* reset.css */
15
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
16
+ body {line-height:1.5;}
17
+ table {border-collapse:separate;border-spacing:0;}
18
+ caption, th, td {text-align:left;font-weight:normal;}
19
+ table, td, th {vertical-align:middle;}
20
+ blockquote:before, blockquote:after, q:before, q:after {content:"";}
21
+ blockquote, q {quotes:"" "";}
22
+ a img {border:none;}
23
+
24
+ /* typography.css */
25
+ body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
26
+ h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
27
+ h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
28
+ h2 {font-size:2em;margin-bottom:0.75em;}
29
+ h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
30
+ h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
31
+ h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
32
+ h6 {font-size:1em;font-weight:bold;}
33
+ h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
34
+ p {margin:0 0 1.5em;}
35
+ p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
36
+ p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
37
+ a:focus, a:hover {color:#000;}
38
+ a {color:#009;text-decoration:underline;}
39
+ blockquote {margin:1.5em;color:#666;font-style:italic;}
40
+ strong {font-weight:bold;}
41
+ em, dfn {font-style:italic;}
42
+ dfn {font-weight:bold;}
43
+ sup, sub {line-height:0;}
44
+ abbr, acronym {border-bottom:1px dotted #666;}
45
+ address {margin:0 0 1.5em;font-style:italic;}
46
+ del {color:#666;}
47
+ pre {margin:1.5em 0;white-space:pre;}
48
+ pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
49
+ li ul, li ol {margin:0 1.5em;}
50
+ ul, ol {margin:0 1.5em 1.5em 1.5em;}
51
+ ul {list-style-type:disc;}
52
+ ol {list-style-type:decimal;}
53
+ dl {margin:0 0 1.5em 0;}
54
+ dl dt {font-weight:bold;}
55
+ dd {margin-left:1.5em;}
56
+ table {margin-bottom:1.4em;width:100%;}
57
+ th {font-weight:bold;}
58
+ thead th {background:#c3d9ff;}
59
+ th, td, caption {padding:4px 10px 4px 5px;}
60
+ tr.even td {background:#e5ecf9;}
61
+ tfoot {font-style:italic;}
62
+ caption {background:#eee;}
63
+ .small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
64
+ .large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
65
+ .hide {display:none;}
66
+ .quiet {color:#666;}
67
+ .loud {color:#000;}
68
+ .highlight {background:#ff0;}
69
+ .added {background:#060;color:#fff;}
70
+ .removed {background:#900;color:#fff;}
71
+ .first {margin-left:0;padding-left:0;}
72
+ .last {margin-right:0;padding-right:0;}
73
+ .top {margin-top:0;padding-top:0;}
74
+ .bottom {margin-bottom:0;padding-bottom:0;}
75
+
76
+ /* grid.css */
77
+ .container {width:950px;margin:0 auto;}
78
+ .showgrid {background:url(src/grid.png);}
79
+ .column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
80
+ .last, div.last {margin-right:0;}
81
+ .span-1 {width:30px;}
82
+ .span-2 {width:70px;}
83
+ .span-3 {width:110px;}
84
+ .span-4 {width:150px;}
85
+ .span-5 {width:190px;}
86
+ .span-6 {width:230px;}
87
+ .span-7 {width:270px;}
88
+ .span-8 {width:310px;}
89
+ .span-9 {width:350px;}
90
+ .span-10 {width:390px;}
91
+ .span-11 {width:430px;}
92
+ .span-12 {width:470px;}
93
+ .span-13 {width:510px;}
94
+ .span-14 {width:550px;}
95
+ .span-15 {width:590px;}
96
+ .span-16 {width:630px;}
97
+ .span-17 {width:670px;}
98
+ .span-18 {width:710px;}
99
+ .span-19 {width:750px;}
100
+ .span-20 {width:790px;}
101
+ .span-21 {width:830px;}
102
+ .span-22 {width:870px;}
103
+ .span-23 {width:910px;}
104
+ .span-24 {width:950px;margin:0;}
105
+ div.span-24 {width:950px;margin:0;}
106
+ input.span-1, textarea.span-1, select.span-1 {width:30px!important;}
107
+ input.span-2, textarea.span-2, select.span-2 {width:50px!important;}
108
+ input.span-3, textarea.span-3, select.span-3 {width:90px!important;}
109
+ input.span-4, textarea.span-4, select.span-4 {width:130px!important;}
110
+ input.span-5, textarea.span-5, select.span-5 {width:170px!important;}
111
+ input.span-6, textarea.span-6, select.span-6 {width:210px!important;}
112
+ input.span-7, textarea.span-7, select.span-7 {width:250px!important;}
113
+ input.span-8, textarea.span-8, select.span-8 {width:290px!important;}
114
+ input.span-9, textarea.span-9, select.span-9 {width:330px!important;}
115
+ input.span-10, textarea.span-10, select.span-10 {width:370px!important;}
116
+ input.span-11, textarea.span-11, select.span-11 {width:410px!important;}
117
+ input.span-12, textarea.span-12, select.span-12 {width:450px!important;}
118
+ input.span-13, textarea.span-13, select.span-13 {width:490px!important;}
119
+ input.span-14, textarea.span-14, select.span-14 {width:530px!important;}
120
+ input.span-15, textarea.span-15, select.span-15 {width:570px!important;}
121
+ input.span-16, textarea.span-16, select.span-16 {width:610px!important;}
122
+ input.span-17, textarea.span-17, select.span-17 {width:650px!important;}
123
+ input.span-18, textarea.span-18, select.span-18 {width:690px!important;}
124
+ input.span-19, textarea.span-19, select.span-19 {width:730px!important;}
125
+ input.span-20, textarea.span-20, select.span-20 {width:770px!important;}
126
+ input.span-21, textarea.span-21, select.span-21 {width:810px!important;}
127
+ input.span-22, textarea.span-22, select.span-22 {width:850px!important;}
128
+ input.span-23, textarea.span-23, select.span-23 {width:890px!important;}
129
+ input.span-24, textarea.span-24, select.span-24 {width:940px!important;}
130
+ .append-1 {padding-right:40px;}
131
+ .append-2 {padding-right:80px;}
132
+ .append-3 {padding-right:120px;}
133
+ .append-4 {padding-right:160px;}
134
+ .append-5 {padding-right:200px;}
135
+ .append-6 {padding-right:240px;}
136
+ .append-7 {padding-right:280px;}
137
+ .append-8 {padding-right:320px;}
138
+ .append-9 {padding-right:360px;}
139
+ .append-10 {padding-right:400px;}
140
+ .append-11 {padding-right:440px;}
141
+ .append-12 {padding-right:480px;}
142
+ .append-13 {padding-right:520px;}
143
+ .append-14 {padding-right:560px;}
144
+ .append-15 {padding-right:600px;}
145
+ .append-16 {padding-right:640px;}
146
+ .append-17 {padding-right:680px;}
147
+ .append-18 {padding-right:720px;}
148
+ .append-19 {padding-right:760px;}
149
+ .append-20 {padding-right:800px;}
150
+ .append-21 {padding-right:840px;}
151
+ .append-22 {padding-right:880px;}
152
+ .append-23 {padding-right:920px;}
153
+ .prepend-1 {padding-left:40px;}
154
+ .prepend-2 {padding-left:80px;}
155
+ .prepend-3 {padding-left:120px;}
156
+ .prepend-4 {padding-left:160px;}
157
+ .prepend-5 {padding-left:200px;}
158
+ .prepend-6 {padding-left:240px;}
159
+ .prepend-7 {padding-left:280px;}
160
+ .prepend-8 {padding-left:320px;}
161
+ .prepend-9 {padding-left:360px;}
162
+ .prepend-10 {padding-left:400px;}
163
+ .prepend-11 {padding-left:440px;}
164
+ .prepend-12 {padding-left:480px;}
165
+ .prepend-13 {padding-left:520px;}
166
+ .prepend-14 {padding-left:560px;}
167
+ .prepend-15 {padding-left:600px;}
168
+ .prepend-16 {padding-left:640px;}
169
+ .prepend-17 {padding-left:680px;}
170
+ .prepend-18 {padding-left:720px;}
171
+ .prepend-19 {padding-left:760px;}
172
+ .prepend-20 {padding-left:800px;}
173
+ .prepend-21 {padding-left:840px;}
174
+ .prepend-22 {padding-left:880px;}
175
+ .prepend-23 {padding-left:920px;}
176
+ div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
177
+ div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
178
+ .pull-1 {margin-left:-40px;}
179
+ .pull-2 {margin-left:-80px;}
180
+ .pull-3 {margin-left:-120px;}
181
+ .pull-4 {margin-left:-160px;}
182
+ .pull-5 {margin-left:-200px;}
183
+ .pull-6 {margin-left:-240px;}
184
+ .pull-7 {margin-left:-280px;}
185
+ .pull-8 {margin-left:-320px;}
186
+ .pull-9 {margin-left:-360px;}
187
+ .pull-10 {margin-left:-400px;}
188
+ .pull-11 {margin-left:-440px;}
189
+ .pull-12 {margin-left:-480px;}
190
+ .pull-13 {margin-left:-520px;}
191
+ .pull-14 {margin-left:-560px;}
192
+ .pull-15 {margin-left:-600px;}
193
+ .pull-16 {margin-left:-640px;}
194
+ .pull-17 {margin-left:-680px;}
195
+ .pull-18 {margin-left:-720px;}
196
+ .pull-19 {margin-left:-760px;}
197
+ .pull-20 {margin-left:-800px;}
198
+ .pull-21 {margin-left:-840px;}
199
+ .pull-22 {margin-left:-880px;}
200
+ .pull-23 {margin-left:-920px;}
201
+ .pull-24 {margin-left:-960px;}
202
+ .pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
203
+ .push-1 {margin:0 -40px 1.5em 40px;}
204
+ .push-2 {margin:0 -80px 1.5em 80px;}
205
+ .push-3 {margin:0 -120px 1.5em 120px;}
206
+ .push-4 {margin:0 -160px 1.5em 160px;}
207
+ .push-5 {margin:0 -200px 1.5em 200px;}
208
+ .push-6 {margin:0 -240px 1.5em 240px;}
209
+ .push-7 {margin:0 -280px 1.5em 280px;}
210
+ .push-8 {margin:0 -320px 1.5em 320px;}
211
+ .push-9 {margin:0 -360px 1.5em 360px;}
212
+ .push-10 {margin:0 -400px 1.5em 400px;}
213
+ .push-11 {margin:0 -440px 1.5em 440px;}
214
+ .push-12 {margin:0 -480px 1.5em 480px;}
215
+ .push-13 {margin:0 -520px 1.5em 520px;}
216
+ .push-14 {margin:0 -560px 1.5em 560px;}
217
+ .push-15 {margin:0 -600px 1.5em 600px;}
218
+ .push-16 {margin:0 -640px 1.5em 640px;}
219
+ .push-17 {margin:0 -680px 1.5em 680px;}
220
+ .push-18 {margin:0 -720px 1.5em 720px;}
221
+ .push-19 {margin:0 -760px 1.5em 760px;}
222
+ .push-20 {margin:0 -800px 1.5em 800px;}
223
+ .push-21 {margin:0 -840px 1.5em 840px;}
224
+ .push-22 {margin:0 -880px 1.5em 880px;}
225
+ .push-23 {margin:0 -920px 1.5em 920px;}
226
+ .push-24 {margin:0 -960px 1.5em 960px;}
227
+ .push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
228
+ .prepend-top {margin-top:1.5em;}
229
+ .append-bottom {margin-bottom:1.5em;}
230
+ .box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
231
+ hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
232
+ hr.space {background:#fff;color:#fff;}
233
+ .clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
234
+ .clearfix, .container {display:block;}
235
+ .clear {clear:both;}
236
+
237
+ /* forms.css */
238
+ label {font-weight:bold;}
239
+ fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
240
+ legend {font-weight:bold;font-size:1.2em;}
241
+ input.text, input.title, textarea, select {margin:0.5em 0;border:1px solid #bbb;}
242
+ input.text:focus, input.title:focus, textarea:focus, select:focus {border:1px solid #666;}
243
+ input.text, input.title {width:300px;padding:5px;}
244
+ input.title {font-size:1.5em;}
245
+ textarea {width:390px;height:250px;padding:5px;}
246
+
247
+ /*.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
248
+ .error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
249
+ .notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
250
+ .success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
251
+ .error a {color:#8a1f11;}
252
+ .notice a {color:#514721;}
253
+ .success a {color:#264409;}*/