releaf 0.1.2 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +19 -21
- data/lib/releaf.rb +1 -34
- data/lib/releaf/all.rb +3 -0
- data/lib/releaf/rspec.rb +4 -0
- data/lib/releaf/rspec/features_matchers.rb +76 -0
- data/lib/releaf/rspec/helpers.rb +227 -0
- data/lib/releaf/rspec/matchers.rb +16 -0
- data/lib/releaf/test.rb +5 -0
- data/spec/factories/author.rb +6 -0
- data/spec/factories/book.rb +5 -0
- data/spec/factories/chapter.rb +7 -0
- data/spec/factories/common.rb +5 -0
- data/spec/factories/home_page.rb +5 -0
- data/spec/factories/node.rb +43 -0
- data/spec/factories/node_route.rb +7 -0
- data/spec/factories/publisher.rb +5 -0
- data/spec/factories/role.rb +21 -0
- data/spec/factories/text_page.rb +5 -0
- data/spec/factories/user.rb +22 -0
- data/spec/rails_helper.rb +122 -0
- data/spec/spec_helper.rb +81 -24
- data/spec/support/controller_macros.rb +8 -0
- data/spec/support/excel_helpers.rb +63 -0
- data/spec/support/shared/service_includer.rb +9 -0
- data/spec/support/wait_steps.rb +23 -0
- metadata +141 -499
- data/README.md +0 -77
- data/Rakefile +0 -70
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/close.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/loading.gif +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/next.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/prev.png +0 -0
- data/app/assets/images/releaf/add.png +0 -0
- data/app/assets/images/releaf/background.jpg +0 -0
- data/app/assets/images/releaf/button/button_bgr.gif +0 -0
- data/app/assets/images/releaf/button/button_hover_bgr.png +0 -0
- data/app/assets/images/releaf/controllers/content/close.gif +0 -0
- data/app/assets/images/releaf/controllers/content/close_active.gif +0 -0
- data/app/assets/images/releaf/controllers/content/close_hover.gif +0 -0
- data/app/assets/images/releaf/controllers/content/global_fields_bgr.png +0 -0
- data/app/assets/images/releaf/controllers/content/open.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_2.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_active.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_hover.gif +0 -0
- data/app/assets/images/releaf/controllers/sessions/background.jpg +0 -0
- data/app/assets/images/releaf/controllers/sessions/logo.jpg +0 -0
- data/app/assets/images/releaf/expand_tool/close.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_hover.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_hover_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/loader.gif +0 -0
- data/app/assets/images/releaf/expand_tool/open.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_hover.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_hover_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_shim.png +0 -0
- data/app/assets/images/releaf/favicon.ico +0 -0
- data/app/assets/images/releaf/globalFieldContainerBgr.png +0 -0
- data/app/assets/images/releaf/icons/129.png +0 -0
- data/app/assets/images/releaf/icons/130.png +0 -0
- data/app/assets/images/releaf/icons/accept.png +0 -0
- data/app/assets/images/releaf/icons/add.png +0 -0
- data/app/assets/images/releaf/icons/arrow_down.png +0 -0
- data/app/assets/images/releaf/icons/arrow_left.png +0 -0
- data/app/assets/images/releaf/icons/arrow_refresh.png +0 -0
- data/app/assets/images/releaf/icons/arrow_up.png +0 -0
- data/app/assets/images/releaf/icons/bin_empty.png +0 -0
- data/app/assets/images/releaf/icons/bullet_black.png +0 -0
- data/app/assets/images/releaf/icons/bullet_connect.png +0 -0
- data/app/assets/images/releaf/icons/bullet_start.png +0 -0
- data/app/assets/images/releaf/icons/bullet_tick.png +0 -0
- data/app/assets/images/releaf/icons/chrome.png +0 -0
- data/app/assets/images/releaf/icons/control_play.png +0 -0
- data/app/assets/images/releaf/icons/date.png +0 -0
- data/app/assets/images/releaf/icons/delete.png +0 -0
- data/app/assets/images/releaf/icons/disk.png +0 -0
- data/app/assets/images/releaf/icons/drag-handle.png +0 -0
- data/app/assets/images/releaf/icons/error.png +0 -0
- data/app/assets/images/releaf/icons/eye.png +0 -0
- data/app/assets/images/releaf/icons/firefox.png +0 -0
- data/app/assets/images/releaf/icons/google-not-available.gif +0 -0
- data/app/assets/images/releaf/icons/google.gif +0 -0
- data/app/assets/images/releaf/icons/keyboard.png +0 -0
- data/app/assets/images/releaf/icons/left_16.png +0 -0
- data/app/assets/images/releaf/icons/link.png +0 -0
- data/app/assets/images/releaf/icons/magnifier.png +0 -0
- data/app/assets/images/releaf/icons/notAllowed.png +0 -0
- data/app/assets/images/releaf/icons/page_white_add.png +0 -0
- data/app/assets/images/releaf/icons/page_white_edit.png +0 -0
- data/app/assets/images/releaf/icons/page_white_put.png +0 -0
- data/app/assets/images/releaf/icons/page_white_text.png +0 -0
- data/app/assets/images/releaf/icons/pencil.png +0 -0
- data/app/assets/images/releaf/icons/picture.png +0 -0
- data/app/assets/images/releaf/icons/right_16.png +0 -0
- data/app/assets/images/releaf/icons/tick.png +0 -0
- data/app/assets/images/releaf/icons/warning.png +0 -0
- data/app/assets/images/releaf/icons/world_go.png +0 -0
- data/app/assets/images/releaf/icons/world_link.png +0 -0
- data/app/assets/images/releaf/input/autocompleteExpandIcon.png +0 -0
- data/app/assets/images/releaf/input/input_bgr.gif +0 -0
- data/app/assets/images/releaf/language_root.png +0 -0
- data/app/assets/images/releaf/loader.gif +0 -0
- data/app/assets/images/releaf/logout.png +0 -0
- data/app/assets/images/releaf/main_menu/active_bgr.png +0 -0
- data/app/assets/images/releaf/main_menu/bgr.png +0 -0
- data/app/assets/images/releaf/main_menu/hover_bgr.png +0 -0
- data/app/assets/images/releaf/module.png +0 -0
- data/app/assets/images/releaf/panel_layout/active_bgr.png +0 -0
- data/app/assets/images/releaf/panel_layout/secondary_panel_horizontal_bgr.png +0 -0
- data/app/assets/images/releaf/panel_layout/secondary_panel_vertical_bgr.png +0 -0
- data/app/assets/images/releaf/releaf_table/selected_bgr.png +0 -0
- data/app/assets/images/releaf/releaf_table/th_bgr.gif +0 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/README.md +0 -73
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/jquery.cookie.js +0 -47
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/server.js +0 -24
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.html +0 -19
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.js +0 -80
- data/app/assets/javascripts/releaf/3rd_party/jquery-ui-timepicker-addon.js +0 -1882
- data/app/assets/javascripts/releaf/3rd_party/lightbox.js.erb +0 -379
- data/app/assets/javascripts/releaf/application.js +0 -14
- data/app/assets/javascripts/releaf/controllers/base.js +0 -130
- data/app/assets/javascripts/releaf/controllers/releaf/content.js +0 -90
- data/app/assets/javascripts/releaf/controllers/releaf/translations.js +0 -31
- data/app/assets/javascripts/releaf/include/continuous_scroll.js +0 -321
- data/app/assets/javascripts/releaf/include/field.type_autocomplete.js +0 -58
- data/app/assets/javascripts/releaf/include/field.type_date_or_datetime_or_time.js +0 -43
- data/app/assets/javascripts/releaf/include/field.type_richtext.js +0 -90
- data/app/assets/javascripts/releaf/include/localization.js +0 -12
- data/app/assets/javascripts/releaf/include/nested_fields.js +0 -64
- data/app/assets/javascripts/releaf/include/sortable.js +0 -29
- data/app/assets/javascripts/releaf/lib/request_url.js +0 -183
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-1.9.2.custom.css.erb +0 -464
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-timepicker-addon.css +0 -10
- data/app/assets/stylesheets/releaf/3rd_party/lightbox.css.erb +0 -157
- data/app/assets/stylesheets/releaf/application.css.erb +0 -122
- data/app/assets/stylesheets/releaf/controllers/base.css.erb +0 -205
- data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +0 -422
- data/app/assets/stylesheets/releaf/controllers/releaf/sessions.css.scss.erb +0 -116
- data/app/assets/stylesheets/releaf/controllers/releaf/translations.css.erb +0 -205
- data/app/assets/stylesheets/releaf/include/button.css.erb +0 -176
- data/app/assets/stylesheets/releaf/include/field.css.erb +0 -281
- data/app/assets/stylesheets/releaf/include/input.css.erb +0 -40
- data/app/assets/stylesheets/releaf/include/main_menu.css.erb +0 -66
- data/app/assets/stylesheets/releaf/include/pagination.css.erb +0 -29
- data/app/assets/stylesheets/releaf/include/panel_layout.css.erb +0 -251
- data/app/assets/stylesheets/releaf/include/releaf_table.css.erb +0 -112
- data/app/assets/stylesheets/releaf/include/sortable.css.erb +0 -12
- data/app/controllers/releaf/admins_controller.rb +0 -55
- data/app/controllers/releaf/application_controller.rb +0 -11
- data/app/controllers/releaf/base_application_controller.rb +0 -18
- data/app/controllers/releaf/base_controller.rb +0 -571
- data/app/controllers/releaf/content_controller.rb +0 -183
- data/app/controllers/releaf/roles_controller.rb +0 -38
- data/app/controllers/releaf/sessions_controller.rb +0 -27
- data/app/controllers/releaf/tinymce_assets_controller.rb +0 -26
- data/app/controllers/releaf/translations_controller.rb +0 -117
- data/app/helpers/releaf/admin_helper.rb +0 -59
- data/app/helpers/releaf/application_helper.rb +0 -4
- data/app/helpers/releaf/pagination_renderer.rb +0 -44
- data/app/helpers/releaf/releaf_devise_helper.rb +0 -8
- data/app/models/releaf/admin.rb +0 -60
- data/app/models/releaf/blank_node_base.rb +0 -29
- data/app/models/releaf/node.rb +0 -222
- data/app/models/releaf/node_base.rb +0 -31
- data/app/models/releaf/role.rb +0 -126
- data/app/models/releaf/tinymce_asset.rb +0 -6
- data/app/views/layouts/releaf/admin.html.haml +0 -57
- data/app/views/layouts/releaf/devise.html.haml +0 -32
- data/app/views/releaf/aliases/_edit.body.html.haml +0 -50
- data/app/views/releaf/aliases/_edit.header.html.haml +0 -19
- data/app/views/releaf/aliases/_index.row.html.haml +0 -5
- data/app/views/releaf/aliases/_secondary_panel.html.haml +0 -13
- data/app/views/releaf/base/_edit.body.html.haml +0 -11
- data/app/views/releaf/base/_edit.field.html.haml +0 -23
- data/app/views/releaf/base/_edit.field_type_autocomplete.html.haml +0 -15
- data/app/views/releaf/base/_edit.field_type_boolean.html.haml +0 -5
- data/app/views/releaf/base/_edit.field_type_date.html.haml +0 -8
- data/app/views/releaf/base/_edit.field_type_datetime.html.haml +0 -8
- data/app/views/releaf/base/_edit.field_type_delete_nested.html.haml +0 -3
- data/app/views/releaf/base/_edit.field_type_file.html.haml +0 -10
- data/app/views/releaf/base/_edit.field_type_image.html.haml +0 -12
- data/app/views/releaf/base/_edit.field_type_item.html.haml +0 -31
- data/app/views/releaf/base/_edit.field_type_link.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_link_i18n.html.haml +0 -26
- data/app/views/releaf/base/_edit.field_type_password.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_richtext.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_richtext_i18n.html.haml +0 -27
- data/app/views/releaf/base/_edit.field_type_text.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_text_i18n.html.haml +0 -27
- data/app/views/releaf/base/_edit.field_type_textarea.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_textarea_i18n.html.haml +0 -27
- data/app/views/releaf/base/_edit.field_type_time.html.haml +0 -8
- data/app/views/releaf/base/_edit.fields.association.html.haml +0 -48
- data/app/views/releaf/base/_edit.fields.has_many_template.html.haml +0 -15
- data/app/views/releaf/base/_edit.fields.html.haml +0 -20
- data/app/views/releaf/base/_edit.footer.html.haml +0 -14
- data/app/views/releaf/base/_edit.form.html.haml +0 -4
- data/app/views/releaf/base/_edit.header.html.haml +0 -3
- data/app/views/releaf/base/_index.body.html.haml +0 -6
- data/app/views/releaf/base/_index.cell.html.haml +0 -20
- data/app/views/releaf/base/_index.footer.html.haml +0 -28
- data/app/views/releaf/base/_index.header.html.haml +0 -4
- data/app/views/releaf/base/_index.row.html.haml +0 -6
- data/app/views/releaf/base/_index.search.html.haml +0 -5
- data/app/views/releaf/base/_index.table.html.haml +0 -24
- data/app/views/releaf/base/_secondary_panel.html.haml +0 -10
- data/app/views/releaf/base/_show.body.html.haml +0 -3
- data/app/views/releaf/base/_show.field.html.haml +0 -20
- data/app/views/releaf/base/_show.field_type_date.html.haml +0 -9
- data/app/views/releaf/base/_show.field_type_date_time.html.haml +0 -9
- data/app/views/releaf/base/_show.field_type_email.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_file.html.haml +0 -7
- data/app/views/releaf/base/_show.field_type_image.html.haml +0 -10
- data/app/views/releaf/base/_show.field_type_item.html.haml +0 -11
- data/app/views/releaf/base/_show.field_type_link.html.haml +0 -14
- data/app/views/releaf/base/_show.field_type_password.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_richtext.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_text.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_textarea.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_time.html.haml +0 -9
- data/app/views/releaf/base/_show.field_type_url.html.haml +0 -7
- data/app/views/releaf/base/_show.fields.association.html.haml +0 -36
- data/app/views/releaf/base/_show.fields.has_many_template.html.haml +0 -12
- data/app/views/releaf/base/_show.fields.html.haml +0 -17
- data/app/views/releaf/base/_show.footer.html.haml +0 -18
- data/app/views/releaf/base/_show.header.html.haml +0 -3
- data/app/views/releaf/base/confirm_destroy.html.haml +0 -17
- data/app/views/releaf/base/edit.html.haml +0 -1
- data/app/views/releaf/base/index.html.haml +0 -3
- data/app/views/releaf/base/new.html.haml +0 -1
- data/app/views/releaf/base/show.html.haml +0 -3
- data/app/views/releaf/content/_edit.body.html.haml +0 -46
- data/app/views/releaf/content/_edit.content_fields.html.haml +0 -11
- data/app/views/releaf/content/_edit.fields.html.haml +0 -17
- data/app/views/releaf/content/_edit.slug.html.haml +0 -12
- data/app/views/releaf/content/_get_content_form.html.haml +0 -7
- data/app/views/releaf/content/_secondary_panel.html.haml +0 -3
- data/app/views/releaf/content/_tree_level.html.haml +0 -16
- data/app/views/releaf/content/ajax.new.html.haml +0 -3
- data/app/views/releaf/content/index.html.haml +0 -0
- data/app/views/releaf/roles/_edit.field.permissions.html.haml +0 -5
- data/app/views/releaf/roles/_show.field.default.html.haml +0 -6
- data/app/views/releaf/roles/_show.field.permissions.html.haml +0 -11
- data/app/views/releaf/sessions/new.html.haml +0 -17
- data/app/views/releaf/translations/_edit.body.html.haml +0 -50
- data/app/views/releaf/translations/_edit.header.html.haml +0 -19
- data/app/views/releaf/translations/_index.row.html.haml +0 -5
- data/app/views/releaf/translations/_secondary_panel.html.haml +0 -13
- data/bin/releaf +0 -25
- data/lib/generators/releaf/install_generator.rb +0 -87
- data/lib/generators/releaf/templates/config/common_fields.yml.example +0 -17
- data/lib/generators/releaf/templates/controllers/home_controller.rb +0 -4
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_454545_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_888888_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/close.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/loading.gif +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/next.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/prev.png +0 -0
- data/lib/generators/releaf/templates/initializers/releaf.rb +0 -20
- data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +0 -25
- data/lib/generators/releaf/templates/initializers/releaf_store_current_template.rb +0 -25
- data/lib/generators/releaf/templates/javascripts/3rd_party/jquery.jcarousel.js +0 -1058
- data/lib/generators/releaf/templates/javascripts/3rd_party/jquery_ui.js +0 -14850
- data/lib/generators/releaf/templates/javascripts/3rd_party/lightbox.js.erb +0 -379
- data/lib/generators/releaf/templates/javascripts/application.js +0 -15
- data/lib/generators/releaf/templates/javascripts/lib/init_jcarousel.js +0 -40
- data/lib/generators/releaf/templates/javascripts/lib/js_check.js +0 -8
- data/lib/generators/releaf/templates/javascripts/lib/request_url.js +0 -169
- data/lib/generators/releaf/templates/javascripts/lib/sortable.js +0 -29
- data/lib/generators/releaf/templates/migrations/create_releaf_admins.rb +0 -53
- data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +0 -25
- data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +0 -12
- data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +0 -11
- data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +0 -31
- data/lib/generators/releaf/templates/models/admin_ability.rb +0 -51
- data/lib/generators/releaf/templates/seeds.rb +0 -64
- data/lib/generators/releaf/templates/stylesheets/3rd_party/jquery_ui/smoothness.css.erb +0 -1174
- data/lib/generators/releaf/templates/stylesheets/3rd_party/lightbox.css.erb +0 -157
- data/lib/generators/releaf/templates/stylesheets/3rd_party/reset.css +0 -48
- data/lib/generators/releaf/templates/stylesheets/application.scss +0 -15
- data/lib/generators/releaf/templates/stylesheets/style.scss +0 -45
- data/lib/generators/releaf/templates/views/home/index.html.haml +0 -1
- data/lib/generators/releaf/templates/views/layouts/application.html.haml +0 -26
- data/lib/i18n/backend/releaf.rb +0 -97
- data/lib/i18n/backend/releaf/translation.rb +0 -61
- data/lib/i18n/backend/releaf/translation_data.rb +0 -39
- data/lib/i18n/backend/releaf/translation_group.rb +0 -34
- data/lib/i18n/releaf.rb +0 -1
- data/lib/releaf/boolean_at.rb +0 -77
- data/lib/releaf/engine.rb +0 -4
- data/lib/releaf/globalize3/fallbacks.rb +0 -19
- data/lib/releaf/resources.rb +0 -101
- data/lib/releaf/slug.rb +0 -118
- data/lib/releaf/version.rb +0 -3
- data/lib/tasks/releaf_tasks.rake +0 -4
- data/spec/factories/factories.rb +0 -24
- data/spec/features/admin_spec.rb +0 -41
- data/templates/releaf/installer.rb +0 -207
@@ -1,90 +0,0 @@
|
|
1
|
-
//= require ../../lib/request_url
|
2
|
-
|
3
|
-
jQuery(document).ready(function() {
|
4
|
-
// var controller_body = jQuery(document.body);
|
5
|
-
var controller_body = jQuery('.controller-releaf-content');
|
6
|
-
if (controller_body.length) {
|
7
|
-
|
8
|
-
jQuery('.secondary_panel .tree_container').delegate('a.create', 'click', function(e) {
|
9
|
-
e.stopPropagation();
|
10
|
-
|
11
|
-
var a = jQuery(e.currentTarget);
|
12
|
-
var p_li = a.parents('li:first');
|
13
|
-
|
14
|
-
var y = p_li.offset().top;
|
15
|
-
var x = p_li.offset().left + p_li.width() + 2;
|
16
|
-
|
17
|
-
var x_offset = [ 'padding-left', 'padding-right', 'margin-left' ]
|
18
|
-
for (var i = 0; i < x_offset.length; i++) {
|
19
|
-
x += parseInt(p_li.css(x_offset[i]));
|
20
|
-
}
|
21
|
-
|
22
|
-
|
23
|
-
var url = new RequestUrl( a.attr('href') ).add({ajax: 1}).getUrl();
|
24
|
-
var new_object_menu_anchor = jQuery('#new_object_menu_anchor')
|
25
|
-
if (new_object_menu_anchor.length === 0) {
|
26
|
-
new_object_menu_anchor = jQuery('<div id="new_object_menu_anchor"><div id="new_object_menu" style="display:none;"></div></div>');
|
27
|
-
controller_body.append(new_object_menu_anchor);
|
28
|
-
}
|
29
|
-
|
30
|
-
new_object_menu = new_object_menu_anchor.find('#new_object_menu').css({top: y, left: x});
|
31
|
-
new_object_menu.html(null).addClass('loading')
|
32
|
-
new_object_menu.show();
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
jQuery.ajax({
|
37
|
-
type: 'GET',
|
38
|
-
dataType: 'html',
|
39
|
-
url: url,
|
40
|
-
timeout: 3000,
|
41
|
-
success: function (data, textStatus) {
|
42
|
-
new_object_menu.html(data).removeClass('loading');
|
43
|
-
},
|
44
|
-
error: function (xhr, textStatus, errorThrown) {
|
45
|
-
new_object_menu.text('Error').removeClass('loading');
|
46
|
-
}
|
47
|
-
});
|
48
|
-
|
49
|
-
return e.preventDefault();
|
50
|
-
});
|
51
|
-
|
52
|
-
|
53
|
-
$(document).click(function (e) {
|
54
|
-
var container = jQuery('#new_object_menu');
|
55
|
-
if ( container.has(e.target) ) {
|
56
|
-
container.hide();
|
57
|
-
}
|
58
|
-
});
|
59
|
-
|
60
|
-
var name_input = jQuery('#releaf_node_name');
|
61
|
-
if (name_input.length) {
|
62
|
-
var slug_input = jQuery('#releaf_node_slug');
|
63
|
-
var generate_slug_button = jQuery('button.generate_slug');
|
64
|
-
|
65
|
-
var generate_slug = function () {
|
66
|
-
var url = new RequestUrl( generate_slug_button.attr('data-new_slug_url') ).add({name: name_input.attr('value')}).getUrl();
|
67
|
-
|
68
|
-
jQuery.ajax({
|
69
|
-
type: 'GET',
|
70
|
-
dataType: 'text',
|
71
|
-
url: url,
|
72
|
-
timeout: 3000,
|
73
|
-
success: function (data, textStatus) {
|
74
|
-
slug_input.attr('value', data);
|
75
|
-
},
|
76
|
-
error: function (xhr, textStatus, errorThrown) {
|
77
|
-
// FIXME
|
78
|
-
alert("Failed to generate slug");
|
79
|
-
}
|
80
|
-
});
|
81
|
-
}
|
82
|
-
generate_slug_button.on('click', generate_slug)
|
83
|
-
|
84
|
-
if (name_input.attr('value').length === 0) {
|
85
|
-
name_input.one('change', generate_slug);
|
86
|
-
}
|
87
|
-
}
|
88
|
-
|
89
|
-
}
|
90
|
-
});
|
@@ -1,31 +0,0 @@
|
|
1
|
-
jQuery(function()
|
2
|
-
{
|
3
|
-
var controller = jQuery( '.controller-releaf-translations' );
|
4
|
-
|
5
|
-
// adjust translations table head cell width
|
6
|
-
|
7
|
-
var headCells = controller.find( '.translations_table_head .th' );
|
8
|
-
//console.log( headCells );
|
9
|
-
var adjustHeadCellWidth = function()
|
10
|
-
{
|
11
|
-
var row = jQuery( '.module-translations .translations_table thead tr:first th' );
|
12
|
-
|
13
|
-
for( var i = 0; i < headCells.length; i++ )
|
14
|
-
{
|
15
|
-
jQuery( headCells[i] ).width( jQuery( row[i] ).outerWidth() - 2 );
|
16
|
-
}
|
17
|
-
};
|
18
|
-
adjustHeadCellWidth();
|
19
|
-
jQuery( window ).resize( adjustHeadCellWidth );
|
20
|
-
|
21
|
-
// highlight selected entry
|
22
|
-
|
23
|
-
if( location.hash )
|
24
|
-
{
|
25
|
-
jQuery( location.hash ).addClass( 'highlighted' );
|
26
|
-
}
|
27
|
-
|
28
|
-
controller.on('itemadd', function() {
|
29
|
-
controller.find('table.translations tbody tr:last td.translation_name input[type="text"]').focus();
|
30
|
-
});
|
31
|
-
});
|
@@ -1,321 +0,0 @@
|
|
1
|
-
jQuery(function()
|
2
|
-
{
|
3
|
-
// continuous scrolling //
|
4
|
-
|
5
|
-
jQuery( document ).on( 'scrollinit', '.releaf_table[data-continuous="1"]', function()
|
6
|
-
{
|
7
|
-
var table = jQuery( this );
|
8
|
-
var container = table.parent();
|
9
|
-
var thead = table.find( '.thead' );
|
10
|
-
var tbody = table.find( '.tbody' );
|
11
|
-
var search_form = table.parents( '.primary_panel' ).find( '.search_form' );
|
12
|
-
|
13
|
-
var noOfCols = thead.children().children().length;
|
14
|
-
var rowHeight = tbody.children().first().height();
|
15
|
-
|
16
|
-
var rowLoadTolerance = 15; // how many rows outside viewport to pre-load
|
17
|
-
var rowRenderTolerance = 40; // how many rows outside viewport to render (could be loaded)
|
18
|
-
|
19
|
-
var cachedRowLimit = 400 * 40;
|
20
|
-
|
21
|
-
var viewportHeight;
|
22
|
-
var noOfVisibleRows;
|
23
|
-
|
24
|
-
var setupViewport = function()
|
25
|
-
{
|
26
|
-
viewportHeight = container.height();
|
27
|
-
noOfVisibleRows = Math.ceil( viewportHeight / rowHeight );
|
28
|
-
}
|
29
|
-
setupViewport();
|
30
|
-
jQuery( window ).resize(function()
|
31
|
-
{
|
32
|
-
setupViewport();
|
33
|
-
container.scroll();
|
34
|
-
});
|
35
|
-
|
36
|
-
var total, itemsPerPage, noOfPages;
|
37
|
-
var setupTotals = function()
|
38
|
-
{
|
39
|
-
total = table.attr( 'data-total' );
|
40
|
-
itemsPerPage = table.attr( 'data-items_per_page' );
|
41
|
-
noOfPages = Math.floor( total / itemsPerPage ) + 1;
|
42
|
-
}
|
43
|
-
setupTotals();
|
44
|
-
|
45
|
-
var timeout;
|
46
|
-
var requests = {};
|
47
|
-
|
48
|
-
var abortRequests = function()
|
49
|
-
{
|
50
|
-
for( var i in requests )
|
51
|
-
{
|
52
|
-
requests[i].abort();
|
53
|
-
}
|
54
|
-
requests = {};
|
55
|
-
}
|
56
|
-
|
57
|
-
var currentTopPageNo = 1;
|
58
|
-
var currentBottomPageNo = 1;
|
59
|
-
|
60
|
-
var pages = {};
|
61
|
-
|
62
|
-
// store current results as page 1
|
63
|
-
pages[ currentTopPageNo ] = tbody.html();
|
64
|
-
|
65
|
-
var clone;
|
66
|
-
|
67
|
-
var emptyRowCells = '';
|
68
|
-
var loadingRowCells = '';
|
69
|
-
var thCellWidths = {};
|
70
|
-
|
71
|
-
// freeze column widths
|
72
|
-
var freeze = function()
|
73
|
-
{
|
74
|
-
// reset header width
|
75
|
-
if( clone )
|
76
|
-
{
|
77
|
-
clone.remove();
|
78
|
-
}
|
79
|
-
thead.children().first().children().each(function()
|
80
|
-
{
|
81
|
-
var cell = jQuery( this );
|
82
|
-
var width = cell.width() + 'px';
|
83
|
-
cell.css( 'width', '' );
|
84
|
-
cell.css( 'min-width', '' );
|
85
|
-
cell.css( 'max-width', '' );
|
86
|
-
});
|
87
|
-
// freeze it
|
88
|
-
thead.children().first().children().each(function()
|
89
|
-
{
|
90
|
-
var cell = jQuery( this );
|
91
|
-
var width = cell.width() + 'px';
|
92
|
-
cell.css( 'width', width );
|
93
|
-
cell.css( 'min-width', width );
|
94
|
-
cell.css( 'max-width', width );
|
95
|
-
});
|
96
|
-
|
97
|
-
// add fixed header
|
98
|
-
clone = thead.clone().insertAfter( thead ).css({ position: 'fixed', zIndex: 100}).addClass('fixed');
|
99
|
-
clone.css( 'margin-top', '-' + clone.height() + 'px' )
|
100
|
-
|
101
|
-
emptyRowCells = '';
|
102
|
-
loadingRowCells = '';
|
103
|
-
thCellWidths = {};
|
104
|
-
thead.children().children().each(function( i )
|
105
|
-
{
|
106
|
-
thCellWidths[ i ] = jQuery( this ).width();
|
107
|
-
});
|
108
|
-
for( var i = 0; i < noOfCols; i++ )
|
109
|
-
{
|
110
|
-
emptyRowCells += '<span> </span>';
|
111
|
-
if( thCellWidths[i] >= 100 )
|
112
|
-
{
|
113
|
-
loadingRowCells += '<span>' + table.attr( 'data-loading' ) + '</span>';
|
114
|
-
}
|
115
|
-
else
|
116
|
-
{
|
117
|
-
loadingRowCells += '<span> </span>';
|
118
|
-
}
|
119
|
-
}
|
120
|
-
emptyRow = '<div class="unselectable">' + emptyRowCells + '</div>';
|
121
|
-
loadingRow = '<div class="unselectable" style="height:' + rowHeight + 'px;">' + loadingRowCells + '</div>';
|
122
|
-
}
|
123
|
-
|
124
|
-
freeze();
|
125
|
-
|
126
|
-
var getEmptyRows = function( no )
|
127
|
-
{
|
128
|
-
var rows = [];
|
129
|
-
for( var i = 0; i < no; i++ )
|
130
|
-
{
|
131
|
-
rows.push( loadingRow );
|
132
|
-
}
|
133
|
-
return rows.join( '' );
|
134
|
-
}
|
135
|
-
|
136
|
-
// initial setup
|
137
|
-
var postHeight = total * rowHeight - tbody.children().length * rowHeight;
|
138
|
-
if( postHeight > 0 )
|
139
|
-
{
|
140
|
-
var post = jQuery( emptyRow ).addClass( 'post' ).appendTo( tbody );
|
141
|
-
post.height( postHeight );
|
142
|
-
}
|
143
|
-
|
144
|
-
container.scroll(function()
|
145
|
-
{
|
146
|
-
clearTimeout( timeout );
|
147
|
-
timeout = setTimeout(function()
|
148
|
-
{
|
149
|
-
var offsets =
|
150
|
-
{
|
151
|
-
visible:
|
152
|
-
{
|
153
|
-
top: 0,
|
154
|
-
bottom: 0
|
155
|
-
},
|
156
|
-
load:
|
157
|
-
{
|
158
|
-
top: 0,
|
159
|
-
bottom: 0
|
160
|
-
},
|
161
|
-
render:
|
162
|
-
{
|
163
|
-
top: 0,
|
164
|
-
bottom: 0
|
165
|
-
}
|
166
|
-
};
|
167
|
-
|
168
|
-
var pageNumbers =
|
169
|
-
{
|
170
|
-
load:
|
171
|
-
{
|
172
|
-
top: 0,
|
173
|
-
bottom: 0
|
174
|
-
},
|
175
|
-
render:
|
176
|
-
{
|
177
|
-
top: 0,
|
178
|
-
bottom: 0
|
179
|
-
}
|
180
|
-
}
|
181
|
-
|
182
|
-
offsets.visible.top = Math.floor( Math.max( 0, container.prop( 'scrollTop' ) - thead.height() ) / rowHeight );
|
183
|
-
offsets.visible.bottom = offsets.visible.top + noOfVisibleRows;
|
184
|
-
|
185
|
-
// adjust for loading tolerance
|
186
|
-
offsets.load.top = Math.max( 0, offsets.visible.top - rowLoadTolerance );
|
187
|
-
offsets.load.bottom = Math.min( offsets.visible.bottom + rowLoadTolerance, total );
|
188
|
-
|
189
|
-
// adjust for rendering tolerance
|
190
|
-
offsets.render.top = Math.max( 0, offsets.visible.top - rowRenderTolerance );
|
191
|
-
offsets.render.bottom = Math.min( offsets.visible.bottom + rowRenderTolerance, total );
|
192
|
-
|
193
|
-
pageNumbers.load.top = Math.floor( offsets.load.top / itemsPerPage ) + 1;
|
194
|
-
pageNumbers.load.bottom = Math.floor( offsets.load.bottom / itemsPerPage ) + 1;
|
195
|
-
|
196
|
-
pageNumbers.render.top = Math.floor( offsets.render.top / itemsPerPage ) + 1;
|
197
|
-
pageNumbers.render.bottom = Math.floor( offsets.render.bottom / itemsPerPage ) + 1;
|
198
|
-
|
199
|
-
var preOffset = ( pageNumbers.render.top - 1 ) * itemsPerPage;
|
200
|
-
var postOffset = Math.max( 0, total - pageNumbers.render.bottom * itemsPerPage );
|
201
|
-
|
202
|
-
if( pageNumbers.load.top != currentTopPageNo || pageNumbers.load.bottom != currentBottomPageNo )
|
203
|
-
{
|
204
|
-
abortRequests();
|
205
|
-
|
206
|
-
var no = 0;
|
207
|
-
for( var i in pages )
|
208
|
-
{
|
209
|
-
if( pages[i] )
|
210
|
-
{
|
211
|
-
no++;
|
212
|
-
}
|
213
|
-
}
|
214
|
-
|
215
|
-
// clear memory
|
216
|
-
if( no * itemsPerPage > cachedRowLimit )
|
217
|
-
{
|
218
|
-
pages = {};
|
219
|
-
}
|
220
|
-
|
221
|
-
var pagesToLoad = {};
|
222
|
-
for( var i = 0; i <= pageNumbers.load.bottom - pageNumbers.load.top; i++ )
|
223
|
-
{
|
224
|
-
pagesToLoad[ pageNumbers.load.top + i ] = true;
|
225
|
-
}
|
226
|
-
|
227
|
-
var pagesToRender = {};
|
228
|
-
for( var i = 0; i <= pageNumbers.render.bottom - pageNumbers.render.top; i++ )
|
229
|
-
{
|
230
|
-
pagesToRender[ pageNumbers.render.top + i ] = true;
|
231
|
-
}
|
232
|
-
|
233
|
-
var inject = function()
|
234
|
-
{
|
235
|
-
var rows = '';
|
236
|
-
for( var i in pagesToRender )
|
237
|
-
{
|
238
|
-
if( pages[ i ] === undefined )
|
239
|
-
{
|
240
|
-
if( i == noOfPages ) // last page is likely to be smaller
|
241
|
-
{
|
242
|
-
rows += getEmptyRows( total - ( noOfPages - 1 ) * itemsPerPage );
|
243
|
-
}
|
244
|
-
else
|
245
|
-
{
|
246
|
-
rows += getEmptyRows( itemsPerPage );
|
247
|
-
}
|
248
|
-
}
|
249
|
-
else
|
250
|
-
{
|
251
|
-
rows += pages[ i ];
|
252
|
-
}
|
253
|
-
}
|
254
|
-
currentTopPageNo = pageNumbers.load.top;
|
255
|
-
currentBottomPageNo = pageNumbers.load.bottom;
|
256
|
-
|
257
|
-
var pre = '';
|
258
|
-
if( preOffset > 0 )
|
259
|
-
{
|
260
|
-
var pre = '<div class="unselectable pre" style="height:' + ( preOffset * rowHeight ) + 'px">' + emptyRowCells + '</div>';
|
261
|
-
}
|
262
|
-
var post = '';
|
263
|
-
if( postOffset > 0 )
|
264
|
-
{
|
265
|
-
var post = '<div class="unselectable post" style="height:' + ( postOffset * rowHeight ) + 'px">' + emptyRowCells + '</div>';
|
266
|
-
}
|
267
|
-
tbody.html( pre + rows + post );
|
268
|
-
|
269
|
-
// check if row width need to be recalculated
|
270
|
-
if
|
271
|
-
(
|
272
|
-
container.prop( 'clientWidth' ) > 0
|
273
|
-
&&
|
274
|
-
container.prop( 'clientWidth' ) < container.prop( 'scrollWidth' )
|
275
|
-
)
|
276
|
-
{
|
277
|
-
freeze();
|
278
|
-
}
|
279
|
-
|
280
|
-
return true;
|
281
|
-
}
|
282
|
-
|
283
|
-
for( var i in pagesToLoad )
|
284
|
-
{
|
285
|
-
if( pages[ i ] === undefined )
|
286
|
-
{
|
287
|
-
(function(){
|
288
|
-
var pageNo = i;
|
289
|
-
var key = Math.random() + '';
|
290
|
-
|
291
|
-
var searchUrl = new RequestUrl();
|
292
|
-
searchUrl.add( search_form.serializeArray() );
|
293
|
-
searchUrl.add({ ajax: 1, page: pageNo });
|
294
|
-
requests[key] = jQuery.ajax
|
295
|
-
({
|
296
|
-
url: searchUrl.getUrl(),
|
297
|
-
success: function( html, status )
|
298
|
-
{
|
299
|
-
delete requests[key];
|
300
|
-
pages[ pageNo ] = jQuery( html ).find( '.releaf_table .tbody' ).html();
|
301
|
-
inject();
|
302
|
-
}
|
303
|
-
});
|
304
|
-
})();
|
305
|
-
}
|
306
|
-
}
|
307
|
-
inject();
|
308
|
-
}
|
309
|
-
},20);
|
310
|
-
});
|
311
|
-
container.scroll();
|
312
|
-
|
313
|
-
table.bind( 'flushcache', function()
|
314
|
-
{
|
315
|
-
pages = {};
|
316
|
-
setupTotals();
|
317
|
-
});
|
318
|
-
});
|
319
|
-
|
320
|
-
jQuery( '.releaf_table[data-continuous="1"]' ).trigger( 'scrollinit' );
|
321
|
-
});
|
@@ -1,58 +0,0 @@
|
|
1
|
-
//= require yui
|
2
|
-
//= require ../lib/request_url
|
3
|
-
|
4
|
-
YUI().use('node', 'event', 'autocomplete', 'autocomplete-highlighters', function (Y) {
|
5
|
-
var init_autocomplete = function(scope) {
|
6
|
-
Y.all(scope).each(function(element) {
|
7
|
-
element.all('.field.type_autocomplete:not(.initialized)').each(function(field_wrap) {
|
8
|
-
field_wrap.addClass('initialized');
|
9
|
-
var field = field_wrap.one('input[type="text"]');
|
10
|
-
var hidden = field_wrap.one('input[type="hidden"]');
|
11
|
-
var expand_icon = field_wrap.one('.autocomplete_expand_icon');
|
12
|
-
|
13
|
-
field.plug(Y.Plugin.AutoComplete, {
|
14
|
-
resultHighlighter: 'subWordMatch',
|
15
|
-
resultListLocator: 'results',
|
16
|
-
resultTextLocator: 'text',
|
17
|
-
minQueryLength: 1,
|
18
|
-
source: new RequestUrl(field.getData('autocomplete-url')).add({'q': '{query}'}).getUrl(),
|
19
|
-
on: {
|
20
|
-
select: function (itemNode, object) {
|
21
|
-
hidden.set('value', itemNode.result.raw.id);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
/*
|
25
|
-
* after: {
|
26
|
-
* resultsChange: function (e) {
|
27
|
-
* console.debug(e);
|
28
|
-
* }
|
29
|
-
* }
|
30
|
-
*/
|
31
|
-
});
|
32
|
-
|
33
|
-
field.on('change', function() {
|
34
|
-
hidden.set('value', null);
|
35
|
-
});
|
36
|
-
|
37
|
-
var autocomplete_click = function() {
|
38
|
-
if (field.ac.get('visible')) {
|
39
|
-
field.ac.hide();
|
40
|
-
}
|
41
|
-
else {
|
42
|
-
field.ac.sendRequest(field.value);
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
expand_icon.on('click', autocomplete_click);
|
47
|
-
field.on('focus', autocomplete_click);
|
48
|
-
});
|
49
|
-
});
|
50
|
-
}
|
51
|
-
|
52
|
-
Y.on('click', function(e) {
|
53
|
-
init_autocomplete(e.target);
|
54
|
-
}, 'body');
|
55
|
-
|
56
|
-
init_autocomplete('body');
|
57
|
-
|
58
|
-
});
|