releaf 0.1.2 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (322) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +19 -21
  3. data/lib/releaf.rb +1 -34
  4. data/lib/releaf/all.rb +3 -0
  5. data/lib/releaf/rspec.rb +4 -0
  6. data/lib/releaf/rspec/features_matchers.rb +76 -0
  7. data/lib/releaf/rspec/helpers.rb +227 -0
  8. data/lib/releaf/rspec/matchers.rb +16 -0
  9. data/lib/releaf/test.rb +5 -0
  10. data/spec/factories/author.rb +6 -0
  11. data/spec/factories/book.rb +5 -0
  12. data/spec/factories/chapter.rb +7 -0
  13. data/spec/factories/common.rb +5 -0
  14. data/spec/factories/home_page.rb +5 -0
  15. data/spec/factories/node.rb +43 -0
  16. data/spec/factories/node_route.rb +7 -0
  17. data/spec/factories/publisher.rb +5 -0
  18. data/spec/factories/role.rb +21 -0
  19. data/spec/factories/text_page.rb +5 -0
  20. data/spec/factories/user.rb +22 -0
  21. data/spec/rails_helper.rb +122 -0
  22. data/spec/spec_helper.rb +81 -24
  23. data/spec/support/controller_macros.rb +8 -0
  24. data/spec/support/excel_helpers.rb +63 -0
  25. data/spec/support/shared/service_includer.rb +9 -0
  26. data/spec/support/wait_steps.rb +23 -0
  27. metadata +141 -499
  28. data/README.md +0 -77
  29. data/Rakefile +0 -70
  30. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  31. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_75_ffffff_40x100.png +0 -0
  32. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  33. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_65_ffffff_1x400.png +0 -0
  34. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_dadada_1x400.png +0 -0
  35. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  36. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  37. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  38. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_222222_256x240.png +0 -0
  39. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_2e83ff_256x240.png +0 -0
  40. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_454545_256x240.png +0 -0
  41. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_888888_256x240.png +0 -0
  42. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_cd0a0a_256x240.png +0 -0
  43. data/app/assets/images/releaf/3rd_party/lightbox/close.png +0 -0
  44. data/app/assets/images/releaf/3rd_party/lightbox/loading.gif +0 -0
  45. data/app/assets/images/releaf/3rd_party/lightbox/next.png +0 -0
  46. data/app/assets/images/releaf/3rd_party/lightbox/prev.png +0 -0
  47. data/app/assets/images/releaf/add.png +0 -0
  48. data/app/assets/images/releaf/background.jpg +0 -0
  49. data/app/assets/images/releaf/button/button_bgr.gif +0 -0
  50. data/app/assets/images/releaf/button/button_hover_bgr.png +0 -0
  51. data/app/assets/images/releaf/controllers/content/close.gif +0 -0
  52. data/app/assets/images/releaf/controllers/content/close_active.gif +0 -0
  53. data/app/assets/images/releaf/controllers/content/close_hover.gif +0 -0
  54. data/app/assets/images/releaf/controllers/content/global_fields_bgr.png +0 -0
  55. data/app/assets/images/releaf/controllers/content/open.gif +0 -0
  56. data/app/assets/images/releaf/controllers/content/open_2.gif +0 -0
  57. data/app/assets/images/releaf/controllers/content/open_active.gif +0 -0
  58. data/app/assets/images/releaf/controllers/content/open_hover.gif +0 -0
  59. data/app/assets/images/releaf/controllers/sessions/background.jpg +0 -0
  60. data/app/assets/images/releaf/controllers/sessions/logo.jpg +0 -0
  61. data/app/assets/images/releaf/expand_tool/close.png +0 -0
  62. data/app/assets/images/releaf/expand_tool/close_hover.png +0 -0
  63. data/app/assets/images/releaf/expand_tool/close_hover_shim.png +0 -0
  64. data/app/assets/images/releaf/expand_tool/close_shim.png +0 -0
  65. data/app/assets/images/releaf/expand_tool/loader.gif +0 -0
  66. data/app/assets/images/releaf/expand_tool/open.png +0 -0
  67. data/app/assets/images/releaf/expand_tool/open_hover.png +0 -0
  68. data/app/assets/images/releaf/expand_tool/open_hover_shim.png +0 -0
  69. data/app/assets/images/releaf/expand_tool/open_shim.png +0 -0
  70. data/app/assets/images/releaf/favicon.ico +0 -0
  71. data/app/assets/images/releaf/globalFieldContainerBgr.png +0 -0
  72. data/app/assets/images/releaf/icons/129.png +0 -0
  73. data/app/assets/images/releaf/icons/130.png +0 -0
  74. data/app/assets/images/releaf/icons/accept.png +0 -0
  75. data/app/assets/images/releaf/icons/add.png +0 -0
  76. data/app/assets/images/releaf/icons/arrow_down.png +0 -0
  77. data/app/assets/images/releaf/icons/arrow_left.png +0 -0
  78. data/app/assets/images/releaf/icons/arrow_refresh.png +0 -0
  79. data/app/assets/images/releaf/icons/arrow_up.png +0 -0
  80. data/app/assets/images/releaf/icons/bin_empty.png +0 -0
  81. data/app/assets/images/releaf/icons/bullet_black.png +0 -0
  82. data/app/assets/images/releaf/icons/bullet_connect.png +0 -0
  83. data/app/assets/images/releaf/icons/bullet_start.png +0 -0
  84. data/app/assets/images/releaf/icons/bullet_tick.png +0 -0
  85. data/app/assets/images/releaf/icons/chrome.png +0 -0
  86. data/app/assets/images/releaf/icons/control_play.png +0 -0
  87. data/app/assets/images/releaf/icons/date.png +0 -0
  88. data/app/assets/images/releaf/icons/delete.png +0 -0
  89. data/app/assets/images/releaf/icons/disk.png +0 -0
  90. data/app/assets/images/releaf/icons/drag-handle.png +0 -0
  91. data/app/assets/images/releaf/icons/error.png +0 -0
  92. data/app/assets/images/releaf/icons/eye.png +0 -0
  93. data/app/assets/images/releaf/icons/firefox.png +0 -0
  94. data/app/assets/images/releaf/icons/google-not-available.gif +0 -0
  95. data/app/assets/images/releaf/icons/google.gif +0 -0
  96. data/app/assets/images/releaf/icons/keyboard.png +0 -0
  97. data/app/assets/images/releaf/icons/left_16.png +0 -0
  98. data/app/assets/images/releaf/icons/link.png +0 -0
  99. data/app/assets/images/releaf/icons/magnifier.png +0 -0
  100. data/app/assets/images/releaf/icons/notAllowed.png +0 -0
  101. data/app/assets/images/releaf/icons/page_white_add.png +0 -0
  102. data/app/assets/images/releaf/icons/page_white_edit.png +0 -0
  103. data/app/assets/images/releaf/icons/page_white_put.png +0 -0
  104. data/app/assets/images/releaf/icons/page_white_text.png +0 -0
  105. data/app/assets/images/releaf/icons/pencil.png +0 -0
  106. data/app/assets/images/releaf/icons/picture.png +0 -0
  107. data/app/assets/images/releaf/icons/right_16.png +0 -0
  108. data/app/assets/images/releaf/icons/tick.png +0 -0
  109. data/app/assets/images/releaf/icons/warning.png +0 -0
  110. data/app/assets/images/releaf/icons/world_go.png +0 -0
  111. data/app/assets/images/releaf/icons/world_link.png +0 -0
  112. data/app/assets/images/releaf/input/autocompleteExpandIcon.png +0 -0
  113. data/app/assets/images/releaf/input/input_bgr.gif +0 -0
  114. data/app/assets/images/releaf/language_root.png +0 -0
  115. data/app/assets/images/releaf/loader.gif +0 -0
  116. data/app/assets/images/releaf/logout.png +0 -0
  117. data/app/assets/images/releaf/main_menu/active_bgr.png +0 -0
  118. data/app/assets/images/releaf/main_menu/bgr.png +0 -0
  119. data/app/assets/images/releaf/main_menu/hover_bgr.png +0 -0
  120. data/app/assets/images/releaf/module.png +0 -0
  121. data/app/assets/images/releaf/panel_layout/active_bgr.png +0 -0
  122. data/app/assets/images/releaf/panel_layout/secondary_panel_horizontal_bgr.png +0 -0
  123. data/app/assets/images/releaf/panel_layout/secondary_panel_vertical_bgr.png +0 -0
  124. data/app/assets/images/releaf/releaf_table/selected_bgr.png +0 -0
  125. data/app/assets/images/releaf/releaf_table/th_bgr.gif +0 -0
  126. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/README.md +0 -73
  127. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/jquery.cookie.js +0 -47
  128. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/server.js +0 -24
  129. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.html +0 -19
  130. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.js +0 -80
  131. data/app/assets/javascripts/releaf/3rd_party/jquery-ui-timepicker-addon.js +0 -1882
  132. data/app/assets/javascripts/releaf/3rd_party/lightbox.js.erb +0 -379
  133. data/app/assets/javascripts/releaf/application.js +0 -14
  134. data/app/assets/javascripts/releaf/controllers/base.js +0 -130
  135. data/app/assets/javascripts/releaf/controllers/releaf/content.js +0 -90
  136. data/app/assets/javascripts/releaf/controllers/releaf/translations.js +0 -31
  137. data/app/assets/javascripts/releaf/include/continuous_scroll.js +0 -321
  138. data/app/assets/javascripts/releaf/include/field.type_autocomplete.js +0 -58
  139. data/app/assets/javascripts/releaf/include/field.type_date_or_datetime_or_time.js +0 -43
  140. data/app/assets/javascripts/releaf/include/field.type_richtext.js +0 -90
  141. data/app/assets/javascripts/releaf/include/localization.js +0 -12
  142. data/app/assets/javascripts/releaf/include/nested_fields.js +0 -64
  143. data/app/assets/javascripts/releaf/include/sortable.js +0 -29
  144. data/app/assets/javascripts/releaf/lib/request_url.js +0 -183
  145. data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-1.9.2.custom.css.erb +0 -464
  146. data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-timepicker-addon.css +0 -10
  147. data/app/assets/stylesheets/releaf/3rd_party/lightbox.css.erb +0 -157
  148. data/app/assets/stylesheets/releaf/application.css.erb +0 -122
  149. data/app/assets/stylesheets/releaf/controllers/base.css.erb +0 -205
  150. data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +0 -422
  151. data/app/assets/stylesheets/releaf/controllers/releaf/sessions.css.scss.erb +0 -116
  152. data/app/assets/stylesheets/releaf/controllers/releaf/translations.css.erb +0 -205
  153. data/app/assets/stylesheets/releaf/include/button.css.erb +0 -176
  154. data/app/assets/stylesheets/releaf/include/field.css.erb +0 -281
  155. data/app/assets/stylesheets/releaf/include/input.css.erb +0 -40
  156. data/app/assets/stylesheets/releaf/include/main_menu.css.erb +0 -66
  157. data/app/assets/stylesheets/releaf/include/pagination.css.erb +0 -29
  158. data/app/assets/stylesheets/releaf/include/panel_layout.css.erb +0 -251
  159. data/app/assets/stylesheets/releaf/include/releaf_table.css.erb +0 -112
  160. data/app/assets/stylesheets/releaf/include/sortable.css.erb +0 -12
  161. data/app/controllers/releaf/admins_controller.rb +0 -55
  162. data/app/controllers/releaf/application_controller.rb +0 -11
  163. data/app/controllers/releaf/base_application_controller.rb +0 -18
  164. data/app/controllers/releaf/base_controller.rb +0 -571
  165. data/app/controllers/releaf/content_controller.rb +0 -183
  166. data/app/controllers/releaf/roles_controller.rb +0 -38
  167. data/app/controllers/releaf/sessions_controller.rb +0 -27
  168. data/app/controllers/releaf/tinymce_assets_controller.rb +0 -26
  169. data/app/controllers/releaf/translations_controller.rb +0 -117
  170. data/app/helpers/releaf/admin_helper.rb +0 -59
  171. data/app/helpers/releaf/application_helper.rb +0 -4
  172. data/app/helpers/releaf/pagination_renderer.rb +0 -44
  173. data/app/helpers/releaf/releaf_devise_helper.rb +0 -8
  174. data/app/models/releaf/admin.rb +0 -60
  175. data/app/models/releaf/blank_node_base.rb +0 -29
  176. data/app/models/releaf/node.rb +0 -222
  177. data/app/models/releaf/node_base.rb +0 -31
  178. data/app/models/releaf/role.rb +0 -126
  179. data/app/models/releaf/tinymce_asset.rb +0 -6
  180. data/app/views/layouts/releaf/admin.html.haml +0 -57
  181. data/app/views/layouts/releaf/devise.html.haml +0 -32
  182. data/app/views/releaf/aliases/_edit.body.html.haml +0 -50
  183. data/app/views/releaf/aliases/_edit.header.html.haml +0 -19
  184. data/app/views/releaf/aliases/_index.row.html.haml +0 -5
  185. data/app/views/releaf/aliases/_secondary_panel.html.haml +0 -13
  186. data/app/views/releaf/base/_edit.body.html.haml +0 -11
  187. data/app/views/releaf/base/_edit.field.html.haml +0 -23
  188. data/app/views/releaf/base/_edit.field_type_autocomplete.html.haml +0 -15
  189. data/app/views/releaf/base/_edit.field_type_boolean.html.haml +0 -5
  190. data/app/views/releaf/base/_edit.field_type_date.html.haml +0 -8
  191. data/app/views/releaf/base/_edit.field_type_datetime.html.haml +0 -8
  192. data/app/views/releaf/base/_edit.field_type_delete_nested.html.haml +0 -3
  193. data/app/views/releaf/base/_edit.field_type_file.html.haml +0 -10
  194. data/app/views/releaf/base/_edit.field_type_image.html.haml +0 -12
  195. data/app/views/releaf/base/_edit.field_type_item.html.haml +0 -31
  196. data/app/views/releaf/base/_edit.field_type_link.html.haml +0 -4
  197. data/app/views/releaf/base/_edit.field_type_link_i18n.html.haml +0 -26
  198. data/app/views/releaf/base/_edit.field_type_password.html.haml +0 -4
  199. data/app/views/releaf/base/_edit.field_type_richtext.html.haml +0 -4
  200. data/app/views/releaf/base/_edit.field_type_richtext_i18n.html.haml +0 -27
  201. data/app/views/releaf/base/_edit.field_type_text.html.haml +0 -4
  202. data/app/views/releaf/base/_edit.field_type_text_i18n.html.haml +0 -27
  203. data/app/views/releaf/base/_edit.field_type_textarea.html.haml +0 -4
  204. data/app/views/releaf/base/_edit.field_type_textarea_i18n.html.haml +0 -27
  205. data/app/views/releaf/base/_edit.field_type_time.html.haml +0 -8
  206. data/app/views/releaf/base/_edit.fields.association.html.haml +0 -48
  207. data/app/views/releaf/base/_edit.fields.has_many_template.html.haml +0 -15
  208. data/app/views/releaf/base/_edit.fields.html.haml +0 -20
  209. data/app/views/releaf/base/_edit.footer.html.haml +0 -14
  210. data/app/views/releaf/base/_edit.form.html.haml +0 -4
  211. data/app/views/releaf/base/_edit.header.html.haml +0 -3
  212. data/app/views/releaf/base/_index.body.html.haml +0 -6
  213. data/app/views/releaf/base/_index.cell.html.haml +0 -20
  214. data/app/views/releaf/base/_index.footer.html.haml +0 -28
  215. data/app/views/releaf/base/_index.header.html.haml +0 -4
  216. data/app/views/releaf/base/_index.row.html.haml +0 -6
  217. data/app/views/releaf/base/_index.search.html.haml +0 -5
  218. data/app/views/releaf/base/_index.table.html.haml +0 -24
  219. data/app/views/releaf/base/_secondary_panel.html.haml +0 -10
  220. data/app/views/releaf/base/_show.body.html.haml +0 -3
  221. data/app/views/releaf/base/_show.field.html.haml +0 -20
  222. data/app/views/releaf/base/_show.field_type_date.html.haml +0 -9
  223. data/app/views/releaf/base/_show.field_type_date_time.html.haml +0 -9
  224. data/app/views/releaf/base/_show.field_type_email.html.haml +0 -6
  225. data/app/views/releaf/base/_show.field_type_file.html.haml +0 -7
  226. data/app/views/releaf/base/_show.field_type_image.html.haml +0 -10
  227. data/app/views/releaf/base/_show.field_type_item.html.haml +0 -11
  228. data/app/views/releaf/base/_show.field_type_link.html.haml +0 -14
  229. data/app/views/releaf/base/_show.field_type_password.html.haml +0 -6
  230. data/app/views/releaf/base/_show.field_type_richtext.html.haml +0 -6
  231. data/app/views/releaf/base/_show.field_type_text.html.haml +0 -6
  232. data/app/views/releaf/base/_show.field_type_textarea.html.haml +0 -6
  233. data/app/views/releaf/base/_show.field_type_time.html.haml +0 -9
  234. data/app/views/releaf/base/_show.field_type_url.html.haml +0 -7
  235. data/app/views/releaf/base/_show.fields.association.html.haml +0 -36
  236. data/app/views/releaf/base/_show.fields.has_many_template.html.haml +0 -12
  237. data/app/views/releaf/base/_show.fields.html.haml +0 -17
  238. data/app/views/releaf/base/_show.footer.html.haml +0 -18
  239. data/app/views/releaf/base/_show.header.html.haml +0 -3
  240. data/app/views/releaf/base/confirm_destroy.html.haml +0 -17
  241. data/app/views/releaf/base/edit.html.haml +0 -1
  242. data/app/views/releaf/base/index.html.haml +0 -3
  243. data/app/views/releaf/base/new.html.haml +0 -1
  244. data/app/views/releaf/base/show.html.haml +0 -3
  245. data/app/views/releaf/content/_edit.body.html.haml +0 -46
  246. data/app/views/releaf/content/_edit.content_fields.html.haml +0 -11
  247. data/app/views/releaf/content/_edit.fields.html.haml +0 -17
  248. data/app/views/releaf/content/_edit.slug.html.haml +0 -12
  249. data/app/views/releaf/content/_get_content_form.html.haml +0 -7
  250. data/app/views/releaf/content/_secondary_panel.html.haml +0 -3
  251. data/app/views/releaf/content/_tree_level.html.haml +0 -16
  252. data/app/views/releaf/content/ajax.new.html.haml +0 -3
  253. data/app/views/releaf/content/index.html.haml +0 -0
  254. data/app/views/releaf/roles/_edit.field.permissions.html.haml +0 -5
  255. data/app/views/releaf/roles/_show.field.default.html.haml +0 -6
  256. data/app/views/releaf/roles/_show.field.permissions.html.haml +0 -11
  257. data/app/views/releaf/sessions/new.html.haml +0 -17
  258. data/app/views/releaf/translations/_edit.body.html.haml +0 -50
  259. data/app/views/releaf/translations/_edit.header.html.haml +0 -19
  260. data/app/views/releaf/translations/_index.row.html.haml +0 -5
  261. data/app/views/releaf/translations/_secondary_panel.html.haml +0 -13
  262. data/bin/releaf +0 -25
  263. data/lib/generators/releaf/install_generator.rb +0 -87
  264. data/lib/generators/releaf/templates/config/common_fields.yml.example +0 -17
  265. data/lib/generators/releaf/templates/controllers/home_controller.rb +0 -4
  266. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  267. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
  268. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  269. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
  270. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
  271. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  272. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  273. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  274. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_222222_256x240.png +0 -0
  275. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_2e83ff_256x240.png +0 -0
  276. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_454545_256x240.png +0 -0
  277. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_888888_256x240.png +0 -0
  278. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
  279. data/lib/generators/releaf/templates/images/3rd_party/lightbox/close.png +0 -0
  280. data/lib/generators/releaf/templates/images/3rd_party/lightbox/loading.gif +0 -0
  281. data/lib/generators/releaf/templates/images/3rd_party/lightbox/next.png +0 -0
  282. data/lib/generators/releaf/templates/images/3rd_party/lightbox/prev.png +0 -0
  283. data/lib/generators/releaf/templates/initializers/releaf.rb +0 -20
  284. data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +0 -25
  285. data/lib/generators/releaf/templates/initializers/releaf_store_current_template.rb +0 -25
  286. data/lib/generators/releaf/templates/javascripts/3rd_party/jquery.jcarousel.js +0 -1058
  287. data/lib/generators/releaf/templates/javascripts/3rd_party/jquery_ui.js +0 -14850
  288. data/lib/generators/releaf/templates/javascripts/3rd_party/lightbox.js.erb +0 -379
  289. data/lib/generators/releaf/templates/javascripts/application.js +0 -15
  290. data/lib/generators/releaf/templates/javascripts/lib/init_jcarousel.js +0 -40
  291. data/lib/generators/releaf/templates/javascripts/lib/js_check.js +0 -8
  292. data/lib/generators/releaf/templates/javascripts/lib/request_url.js +0 -169
  293. data/lib/generators/releaf/templates/javascripts/lib/sortable.js +0 -29
  294. data/lib/generators/releaf/templates/migrations/create_releaf_admins.rb +0 -53
  295. data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +0 -25
  296. data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +0 -12
  297. data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +0 -11
  298. data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +0 -31
  299. data/lib/generators/releaf/templates/models/admin_ability.rb +0 -51
  300. data/lib/generators/releaf/templates/seeds.rb +0 -64
  301. data/lib/generators/releaf/templates/stylesheets/3rd_party/jquery_ui/smoothness.css.erb +0 -1174
  302. data/lib/generators/releaf/templates/stylesheets/3rd_party/lightbox.css.erb +0 -157
  303. data/lib/generators/releaf/templates/stylesheets/3rd_party/reset.css +0 -48
  304. data/lib/generators/releaf/templates/stylesheets/application.scss +0 -15
  305. data/lib/generators/releaf/templates/stylesheets/style.scss +0 -45
  306. data/lib/generators/releaf/templates/views/home/index.html.haml +0 -1
  307. data/lib/generators/releaf/templates/views/layouts/application.html.haml +0 -26
  308. data/lib/i18n/backend/releaf.rb +0 -97
  309. data/lib/i18n/backend/releaf/translation.rb +0 -61
  310. data/lib/i18n/backend/releaf/translation_data.rb +0 -39
  311. data/lib/i18n/backend/releaf/translation_group.rb +0 -34
  312. data/lib/i18n/releaf.rb +0 -1
  313. data/lib/releaf/boolean_at.rb +0 -77
  314. data/lib/releaf/engine.rb +0 -4
  315. data/lib/releaf/globalize3/fallbacks.rb +0 -19
  316. data/lib/releaf/resources.rb +0 -101
  317. data/lib/releaf/slug.rb +0 -118
  318. data/lib/releaf/version.rb +0 -3
  319. data/lib/tasks/releaf_tasks.rake +0 -4
  320. data/spec/factories/factories.rb +0 -24
  321. data/spec/features/admin_spec.rb +0 -41
  322. data/templates/releaf/installer.rb +0 -207
@@ -1,379 +0,0 @@
1
- // Place any jQuery/helper plugins in here.
2
- // Lightbox
3
-
4
- /*
5
- Lightbox v2.51
6
- by Lokesh Dhakar - http://www.lokeshdhakar.com
7
-
8
- For more information, visit:
9
- http://lokeshdhakar.com/projects/lightbox2/
10
-
11
- Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
12
- - free for use in both personal and commercial projects
13
- - attribution requires leaving author name, author link, and the license info intact
14
-
15
- Thanks
16
- - Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), and Thomas Fuchs(mir.aculo.us) for ideas, libs, and snippets.
17
- - Artemy Tregubenko (arty.name) for cleanup and help in updating to latest proto-aculous in v2.05.
18
-
19
-
20
- Table of Contents
21
- =================
22
- LightboxOptions
23
-
24
- Lightbox
25
- - constructor
26
- - init
27
- - enable
28
- - build
29
- - start
30
- - changeImage
31
- - sizeContainer
32
- - showImage
33
- - updateNav
34
- - updateDetails
35
- - preloadNeigbhoringImages
36
- - enableKeyboardNav
37
- - disableKeyboardNav
38
- - keyboardAction
39
- - end
40
-
41
- options = new LightboxOptions
42
- lightbox = new Lightbox options
43
- */
44
-
45
- (function() {
46
- var $, Lightbox, LightboxOptions;
47
-
48
- $ = jQuery;
49
-
50
- LightboxOptions = (function() {
51
-
52
- function LightboxOptions() {
53
- this.fileLoadingImage = '<%= asset_path('3rd_party/lightbox/loading.gif') %>';
54
- this.fileCloseImage = '<%= asset_path('3rd_party/lightbox/close.png') %>';
55
- this.resizeDuration = 700;
56
- this.fadeDuration = 500;
57
- this.labelImage = "Image";
58
- this.labelOf = "of";
59
- }
60
-
61
- return LightboxOptions;
62
-
63
- })();
64
-
65
- Lightbox = (function() {
66
-
67
- function Lightbox(options) {
68
- this.options = options;
69
- this.album = [];
70
- this.currentImageIndex = void 0;
71
- this.init();
72
- }
73
-
74
- Lightbox.prototype.init = function() {
75
- this.enable();
76
- return this.build();
77
- };
78
-
79
- Lightbox.prototype.enable = function() {
80
- var _this = this;
81
- return $('body').on('click', 'a[data-lightbox], area[data-lightbox]', function(e) {
82
- _this.start($(e.currentTarget));
83
- return false;
84
- });
85
- };
86
-
87
- Lightbox.prototype.build = function() {
88
- var $lightbox,
89
- _this = this;
90
- $("<div>", {
91
- id: 'lightboxOverlay'
92
- }).after($('<div/>', {
93
- id: 'lightbox'
94
- }).append($('<div/>', {
95
- "class": 'lb-outerContainer'
96
- }).append($('<div/>', {
97
- "class": 'lb-container'
98
- }).append($('<img/>', {
99
- "class": 'lb-image'
100
- }), $('<div/>', {
101
- "class": 'lb-nav'
102
- }).append($('<a/>', {
103
- "class": 'lb-prev'
104
- }), $('<a/>', {
105
- "class": 'lb-next'
106
- })), $('<div/>', {
107
- "class": 'lb-loader'
108
- }).append($('<a/>', {
109
- "class": 'lb-cancel'
110
- }).append($('<img/>', {
111
- src: this.options.fileLoadingImage
112
- }))))), $('<div/>', {
113
- "class": 'lb-dataContainer'
114
- }).append($('<div/>', {
115
- "class": 'lb-data'
116
- }).append($('<div/>', {
117
- "class": 'lb-details'
118
- }).append($('<span/>', {
119
- "class": 'lb-caption'
120
- }), $('<span/>', {
121
- "class": 'lb-number'
122
- })), $('<div/>', {
123
- "class": 'lb-closeContainer'
124
- }).append($('<a/>', {
125
- "class": 'lb-close'
126
- }).append($('<img/>', {
127
- src: this.options.fileCloseImage
128
- }))))))).appendTo($('body'));
129
- $('#lightboxOverlay').hide().on('click', function(e) {
130
- _this.end();
131
- return false;
132
- });
133
- $lightbox = $('#lightbox');
134
- $lightbox.hide().on('click', function(e) {
135
- if ($(e.target).attr('id') === 'lightbox') _this.end();
136
- return false;
137
- });
138
- $lightbox.find('.lb-outerContainer').on('click', function(e) {
139
- if ($(e.target).attr('id') === 'lightbox') _this.end();
140
- return false;
141
- });
142
- $lightbox.find('.lb-prev').on('click', function(e) {
143
- _this.changeImage(_this.currentImageIndex - 1);
144
- return false;
145
- });
146
- $lightbox.find('.lb-next').on('click', function(e) {
147
- _this.changeImage(_this.currentImageIndex + 1);
148
- return false;
149
- });
150
- $lightbox.find('.lb-loader, .lb-close').on('click', function(e) {
151
- _this.end();
152
- return false;
153
- });
154
- };
155
-
156
- Lightbox.prototype.start = function($link) {
157
- var $lightbox, $window, a, i, imageNumber, left, top, _len, _ref;
158
- $(window).on("resize", this.sizeOverlay);
159
- $('select, object, embed').css({
160
- visibility: "hidden"
161
- });
162
- $('#lightboxOverlay').width($(document).width()).height($(document).height()).fadeIn(this.options.fadeDuration);
163
- this.album = [];
164
- imageNumber = 0;
165
- if ($link.attr('data-lightbox-group') == undefined) {
166
- this.album.push({
167
- link: $link.attr('href'),
168
- title: $link.attr('title')
169
- });
170
- } else {
171
- _ref = $($link.prop("tagName") + '[data-lightbox-group="' + $link.attr('data-lightbox-group') + '"]');
172
- for (i = 0, _len = _ref.length; i < _len; i++) {
173
- a = _ref[i];
174
- this.album.push({
175
- link: $(a).attr('href'),
176
- title: $(a).attr('title')
177
- });
178
- if ($(a).attr('href') === $link.attr('href')) imageNumber = i;
179
- }
180
- }
181
- $window = $(window);
182
- top = $window.scrollTop() + $window.height() / 10;
183
- left = $window.scrollLeft();
184
- $lightbox = $('#lightbox');
185
- $lightbox.css({
186
- top: top + 'px',
187
- left: left + 'px'
188
- }).fadeIn(this.options.fadeDuration);
189
- this.changeImage(imageNumber);
190
- };
191
-
192
- Lightbox.prototype.changeImage = function(imageNumber) {
193
- var $image, $lightbox, preloader,
194
- _this = this;
195
- this.disableKeyboardNav();
196
- $lightbox = $('#lightbox');
197
- $image = $lightbox.find('.lb-image');
198
- this.sizeOverlay();
199
- $('#lightboxOverlay').fadeIn(this.options.fadeDuration);
200
- $('.loader').fadeIn('slow');
201
- $lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
202
- $lightbox.find('.lb-outerContainer').addClass('animating');
203
- preloader = new Image;
204
- preloader.onload = function() {
205
- $image.attr('src', _this.album[imageNumber].link);
206
-
207
- var containerWidth, containerHeight;
208
- var doc = {
209
- w: $(window).width() - 100,
210
- h: $(window).height() - 160
211
- };
212
- var cont = {
213
- w: preloader.width,
214
- h: preloader.height
215
- };
216
-
217
- var aspect = preloader.width / preloader.height;
218
- if(preloader.width > doc.w) {
219
- if(doc.w / aspect > doc.h) {
220
- cont.w = doc.h * aspect;
221
- cont.h = doc.h;
222
- } else {
223
- cont.w = doc.w;
224
- cont.h = doc.w / aspect;
225
- }
226
- } else if(preloader.height > doc.h) {
227
- cont.w = doc.h * aspect;
228
- cont.h = doc.h;
229
- }
230
- $image.css({
231
- height: cont.h,
232
- width: cont.w
233
- });
234
- return _this.sizeContainer(cont.w, cont.h);
235
- };
236
- preloader.src = this.album[imageNumber].link;
237
- this.currentImageIndex = imageNumber;
238
- };
239
-
240
- Lightbox.prototype.sizeOverlay = function() {
241
- return $('#lightboxOverlay').width($(document).width()).height($(document).height());
242
- };
243
-
244
- Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
245
- var $container, $lightbox, $outerContainer, containerBottomPadding, containerLeftPadding, containerRightPadding, containerTopPadding, newHeight, newWidth, oldHeight, oldWidth,
246
- _this = this;
247
- $lightbox = $('#lightbox');
248
- $outerContainer = $lightbox.find('.lb-outerContainer');
249
- oldWidth = $outerContainer.outerWidth();
250
- oldHeight = $outerContainer.outerHeight();
251
- $container = $lightbox.find('.lb-container');
252
- containerTopPadding = parseInt($container.css('padding-top'), 10);
253
- containerRightPadding = parseInt($container.css('padding-right'), 10);
254
- containerBottomPadding = parseInt($container.css('padding-bottom'), 10);
255
- containerLeftPadding = parseInt($container.css('padding-left'), 10);
256
- newWidth = imageWidth + containerLeftPadding + containerRightPadding;
257
- newHeight = imageHeight + containerTopPadding + containerBottomPadding;
258
- if (newWidth !== oldWidth && newHeight !== oldHeight) {
259
- $outerContainer.animate({
260
- width: newWidth,
261
- height: newHeight
262
- }, this.options.resizeDuration, 'swing');
263
- } else if (newWidth !== oldWidth) {
264
- $outerContainer.animate({
265
- width: newWidth
266
- }, this.options.resizeDuration, 'swing');
267
- } else if (newHeight !== oldHeight) {
268
- $outerContainer.animate({
269
- height: newHeight
270
- }, this.options.resizeDuration, 'swing');
271
- }
272
- setTimeout(function() {
273
- $lightbox.find('.lb-dataContainer').width(newWidth);
274
- $lightbox.find('.lb-prevLink').height(newHeight);
275
- $lightbox.find('.lb-nextLink').height(newHeight);
276
- _this.showImage();
277
- }, this.options.resizeDuration);
278
- };
279
-
280
- Lightbox.prototype.showImage = function() {
281
- var $lightbox;
282
- $lightbox = $('#lightbox');
283
- $lightbox.find('.lb-loader').hide();
284
- $lightbox.find('.lb-image').fadeIn('slow');
285
- this.updateNav();
286
- this.updateDetails();
287
- this.preloadNeighboringImages();
288
- this.enableKeyboardNav();
289
- };
290
-
291
- Lightbox.prototype.updateNav = function() {
292
- var $lightbox;
293
- $lightbox = $('#lightbox');
294
- $lightbox.find('.lb-nav').show();
295
- if (this.currentImageIndex > 0) $lightbox.find('.lb-prev').show();
296
- if (this.currentImageIndex < this.album.length - 1) {
297
- $lightbox.find('.lb-next').show();
298
- }
299
- };
300
-
301
- Lightbox.prototype.updateDetails = function() {
302
- var $lightbox,
303
- _this = this;
304
- $lightbox = $('#lightbox');
305
- if (typeof this.album[this.currentImageIndex].title !== 'undefined' && this.album[this.currentImageIndex].title !== "") {
306
- $lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast');
307
- }
308
- if (this.album.length > 1) {
309
- $lightbox.find('.lb-number').html(this.options.labelImage + ' ' + (this.currentImageIndex + 1) + ' ' + this.options.labelOf + ' ' + this.album.length).fadeIn('fast');
310
- } else {
311
- $lightbox.find('.lb-number').hide();
312
- }
313
- $lightbox.find('.lb-outerContainer').removeClass('animating');
314
- $lightbox.find('.lb-dataContainer').fadeIn(this.resizeDuration, function() {
315
- return _this.sizeOverlay();
316
- });
317
- };
318
-
319
- Lightbox.prototype.preloadNeighboringImages = function() {
320
- var preloadNext, preloadPrev;
321
- if (this.album.length > this.currentImageIndex + 1) {
322
- preloadNext = new Image;
323
- preloadNext.src = this.album[this.currentImageIndex + 1].link;
324
- }
325
- if (this.currentImageIndex > 0) {
326
- preloadPrev = new Image;
327
- preloadPrev.src = this.album[this.currentImageIndex - 1].link;
328
- }
329
- };
330
-
331
- Lightbox.prototype.enableKeyboardNav = function() {
332
- $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
333
- };
334
-
335
- Lightbox.prototype.disableKeyboardNav = function() {
336
- $(document).off('.keyboard');
337
- };
338
-
339
- Lightbox.prototype.keyboardAction = function(event) {
340
- var KEYCODE_ESC, KEYCODE_LEFTARROW, KEYCODE_RIGHTARROW, key, keycode;
341
- KEYCODE_ESC = 27;
342
- KEYCODE_LEFTARROW = 37;
343
- KEYCODE_RIGHTARROW = 39;
344
- keycode = event.keyCode;
345
- key = String.fromCharCode(keycode).toLowerCase();
346
- if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
347
- this.end();
348
- } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
349
- if (this.currentImageIndex !== 0) {
350
- this.changeImage(this.currentImageIndex - 1);
351
- }
352
- } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
353
- if (this.currentImageIndex !== this.album.length - 1) {
354
- this.changeImage(this.currentImageIndex + 1);
355
- }
356
- }
357
- };
358
-
359
- Lightbox.prototype.end = function() {
360
- this.disableKeyboardNav();
361
- $(window).off("resize", this.sizeOverlay);
362
- $('#lightbox').fadeOut(this.options.fadeDuration);
363
- $('#lightboxOverlay').fadeOut(this.options.fadeDuration);
364
- return $('select, object, embed').css({
365
- visibility: "visible"
366
- });
367
- };
368
-
369
- return Lightbox;
370
-
371
- })();
372
-
373
- $(function() {
374
- var lightbox, options;
375
- options = new LightboxOptions;
376
- return lightbox = new Lightbox(options);
377
- });
378
-
379
- }).call(this);
@@ -1,15 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require 3rd_party/jquery_ui
@@ -1,40 +0,0 @@
1
- //= require ../3rd_party/jquery.jcarousel
2
-
3
- jQuery(document).ready(function() {
4
-
5
- jQuery(document.body).on('initcarousel', function(e) {
6
- var target = jQuery(e.target);
7
-
8
- target.find('.carousel_wrap').each(function() {
9
- var carousel_wrap = jQuery(this);
10
- var carousel_controls_wrap = carousel_wrap.find('.carousel_controls');
11
- var carousel_controls = carousel_controls_wrap.find('a[data-nr], button[data-nr]');
12
-
13
- carousel_wrap.find('.jcarousel').jcarousel({
14
- wrap: 'circular',
15
- vertical: false,
16
- scroll: 1,
17
- buttonNextHTML: null,
18
- buttonPrevHTML: null,
19
- auto: 5,
20
- itemVisibleInCallback: {
21
- onBeforeAnimation: function (carousel, item, idx, state) {
22
- var jitem = jQuery(item);
23
- carousel_controls.removeClass('active');
24
- jQuery(carousel_controls[jitem.attr('data-nr')]).addClass('active');
25
- }
26
- },
27
- initCallback: function(carousel) {
28
- carousel_controls_wrap.on('click', 'a[data-nr], button[data-nr]', function() {
29
- var link = jQuery(this);
30
- carousel.scroll(jQuery.jcarousel.intval(link.attr('data-nr')));
31
- });
32
- }
33
- });
34
- });
35
- });
36
-
37
- jQuery(document.body).trigger('initcarousel');
38
-
39
- });
40
-
@@ -1,8 +0,0 @@
1
- if ((document) && (document.getElementById)) {
2
- var jsClassName = 'javascriptOn';
3
- if (document.body.className)
4
- {
5
- jsClassName = ' '.concat(jsClassName);
6
- }
7
- document.body.className = document.body.className.concat(jsClassName);
8
- }
@@ -1,169 +0,0 @@
1
- // EXAMPLE: var newurl = new RequestUrl().add({ 'do': 'import', ajax: 1 }).getUrl();
2
-
3
- // constructor
4
- function RequestUrl( params )
5
- {
6
- if( params === undefined )
7
- {
8
- params = {};
9
- }
10
- var keepCurrentQuery = true;
11
- if( params === false || params.baseUrl !== undefined )
12
- {
13
- keepCurrentQuery = false;
14
- }
15
- if( typeof params == 'string' )
16
- {
17
- params = { baseUrl: params };
18
- }
19
- // setup members
20
- this.path = '';
21
- this.query = {};
22
- // get url
23
- var baseUrl = params.baseUrl || location.href;
24
- // remove anchor
25
- baseUrl = baseUrl.split( '#' ).shift();
26
- // split url
27
- var urlParts = baseUrl.split( '?' );
28
- this.path = urlParts.shift();
29
- if( keepCurrentQuery && urlParts.length > 0 )
30
- {
31
- var queryParts = urlParts.shift().split( '&' );
32
- for( var i = 0; i < queryParts.length; i++ )
33
- {
34
- var variable = queryParts[ i ].split( '=' );
35
- var name = variable.shift();
36
-
37
- if( variable.length > 0 )
38
- {
39
- var value = variable.shift();
40
- }
41
- else
42
- {
43
- var value = '';
44
- }
45
-
46
- if( unescape( name ).substr( unescape( name ).length - 2, 2 ) == '[]' )
47
- {
48
- name = unescape( name );
49
- }
50
-
51
- if( name.substr( name.length - 2, 2 ) == '[]' )
52
- {
53
- name = name.substr( 0, name.length - 2 );
54
- if( this.query[ name ] === undefined || !(this.query[ name ] instanceof Array) )
55
- {
56
- this.query[ name ] = [];
57
- }
58
- this.query[ name ].push( value );
59
- }
60
- else
61
- {
62
- this.query[ name ] = value;
63
- }
64
- }
65
- }
66
- if( params.keep !== undefined && params.keep instanceof Array )
67
- {
68
- var filteredQuery = {};
69
- for( var i = 0; i < params.keep.length; i++ )
70
- {
71
- if( this.query[ params.keep[i] ] !== undefined )
72
- {
73
- filteredQuery[ params.keep[i] ] = this.query[ params.keep[i] ];
74
- }
75
- }
76
- this.query = filteredQuery;
77
- }
78
- }
79
-
80
- RequestUrl.prototype.add = function( params, value )
81
- {
82
- if( params instanceof Array )
83
- {
84
- for( var i = 0; i < params.length; i++ )
85
- {
86
- if( params[ i ].name !== undefined && params[ i ].value !== undefined )
87
- {
88
- this.query[ params[ i ].name ] = params[ i ].value;
89
- }
90
- }
91
- }
92
- else if( params instanceof Object )
93
- {
94
- for( var i in params )
95
- {
96
- this.query[ i ] = params[ i ];
97
- }
98
- }
99
- else if( typeof params == 'string' )
100
- {
101
- if( value === undefined )
102
- {
103
- var temp = new RequestUrl( '?' + params );
104
- for( var i in temp.query )
105
- {
106
- this.query[ i ] = temp.query[i];
107
- }
108
- }
109
- else
110
- {
111
- this.query[ params ] = value;
112
- }
113
- }
114
- return this;
115
- }
116
-
117
- RequestUrl.prototype.removeAll = function( preserveParams )
118
- {
119
- for( var i in this.query )
120
- {
121
- if( preserveParams === undefined || jQuery.inArray(i, preserveParams) == -1 )
122
- {
123
- this.remove(i);
124
- }
125
- }
126
- return this;
127
- }
128
-
129
- RequestUrl.prototype.remove = function( name )
130
- {
131
- delete this.query[ name ];
132
- return this;
133
- }
134
-
135
- RequestUrl.prototype.get = function( name )
136
- {
137
- if( this.query[ name ] !== undefined )
138
- {
139
- return this.query[ name ];
140
- }
141
- return null;
142
- }
143
-
144
- RequestUrl.prototype.getUrl = function()
145
- {
146
- var query = '';
147
- var isFirst = true;
148
- for( var i in this.query )
149
- {
150
- if( !isFirst )
151
- {
152
- query += '&';
153
- }
154
- else
155
- {
156
- isFirst = false;
157
- }
158
- if( this.query[ i ] instanceof Array )
159
- {
160
- query += i + '[]=' + this.query[ i ].join( '&' + i + '[]=' );
161
- }
162
- else
163
- {
164
- query += i + '=' + this.query[ i ];
165
- }
166
- }
167
-
168
- return this.path + '?' + query;
169
- }