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,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('releaf/3rd_party/lightbox/loading.gif') %>';
|
54
|
-
this.fileCloseImage = '<%= asset_path('releaf/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,14 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
-
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
-
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
-
// the compiled file.
|
6
|
-
//
|
7
|
-
//= require jquery
|
8
|
-
//= require jquery_ujs
|
9
|
-
//= require jquery-ui
|
10
|
-
//= require tinymce-jquery
|
11
|
-
//= require_tree ./include
|
12
|
-
//= require ./3rd_party/jquery-ui-timepicker-addon
|
13
|
-
//= require ./controllers/base
|
14
|
-
//= require ./3rd_party/lightbox
|
@@ -1,130 +0,0 @@
|
|
1
|
-
//= require ../3rd_party/jquery-cookie/jquery.cookie.js
|
2
|
-
//= require ../lib/request_url.js
|
3
|
-
|
4
|
-
jQuery(function()
|
5
|
-
{
|
6
|
-
// list action switcher
|
7
|
-
|
8
|
-
jQuery( '.action-index' ).on( 'click', '.list_action_switch button', function( event )
|
9
|
-
{
|
10
|
-
var button = jQuery( this );
|
11
|
-
var action = button.attr( 'data-action' );
|
12
|
-
button.siblings( '.active' ).removeClass( 'active' );
|
13
|
-
button.addClass( 'active' );
|
14
|
-
// store cookie
|
15
|
-
jQuery.cookie( 'base_module:list_action', action, { path: '/', expires: 365 * 5 } );
|
16
|
-
// modify current links
|
17
|
-
var table = button.parents( '.panel_layout' ).find( '.body .releaf_table' );
|
18
|
-
// collect ids
|
19
|
-
var ids = [];
|
20
|
-
var rows = table.find( '.tbody > .row' );
|
21
|
-
rows.each(function()
|
22
|
-
{
|
23
|
-
ids.push( jQuery( this ).attr( 'data-id' ) );
|
24
|
-
});
|
25
|
-
var url = new RequestUrl();
|
26
|
-
url.path += '/urls.json';
|
27
|
-
jQuery.ajax
|
28
|
-
({
|
29
|
-
url: url.getUrl(),
|
30
|
-
type: 'post',
|
31
|
-
data: { ids: ids, to_action: action },
|
32
|
-
success: function( json )
|
33
|
-
{
|
34
|
-
rows.each(function()
|
35
|
-
{
|
36
|
-
var row = jQuery( this );
|
37
|
-
if( json[ row.attr( 'data-id' ) ] )
|
38
|
-
{
|
39
|
-
row.children( '.main' ).attr( 'href', json[ row.attr( 'data-id' ) ] );
|
40
|
-
if( row.is( 'a' ) )
|
41
|
-
{
|
42
|
-
row.attr( 'href', json[ row.attr( 'data-id' ) ] );
|
43
|
-
}
|
44
|
-
}
|
45
|
-
});
|
46
|
-
}
|
47
|
-
});
|
48
|
-
// clear cache on continuous scroll tables
|
49
|
-
table.trigger( 'flushcache' );
|
50
|
-
});
|
51
|
-
|
52
|
-
// ajax search
|
53
|
-
|
54
|
-
jQuery( '.view-index' ).on( 'searchinit', function( event )
|
55
|
-
{
|
56
|
-
var form = jQuery( event.target );
|
57
|
-
|
58
|
-
var input = form.find( '.search' );
|
59
|
-
var timeout;
|
60
|
-
var request;
|
61
|
-
var last_search_query = input.val();
|
62
|
-
|
63
|
-
var panel = form.parents( '.primary_panel:first' )
|
64
|
-
var body = panel.children( '.body' );
|
65
|
-
var footer = panel.children( '.footer' );
|
66
|
-
|
67
|
-
// custom "lookup" event allows to issue extra reloads from the outside
|
68
|
-
|
69
|
-
form.bind( 'lookup', function()
|
70
|
-
{
|
71
|
-
// cancel previous timeout
|
72
|
-
clearTimeout( timeout );
|
73
|
-
// cancel previous unfinished request
|
74
|
-
if( request !== undefined )
|
75
|
-
{
|
76
|
-
request.abort();
|
77
|
-
}
|
78
|
-
timeout = setTimeout(function()
|
79
|
-
{
|
80
|
-
// set loading icon
|
81
|
-
form.addClass( 'loading' );
|
82
|
-
// construct url
|
83
|
-
var url = new RequestUrl( form.attr( 'action' ) );
|
84
|
-
url.add( form.serializeArray() );
|
85
|
-
url.add({ ajax: 1 });
|
86
|
-
// send request
|
87
|
-
request = jQuery.ajax
|
88
|
-
({
|
89
|
-
url: url.getUrl(),
|
90
|
-
success: function( response )
|
91
|
-
{
|
92
|
-
// remove loading icon
|
93
|
-
form.removeClass( 'loading' );
|
94
|
-
// create html holder
|
95
|
-
var html = jQuery( response );
|
96
|
-
body.html( html.filter( '.body' ).html() );
|
97
|
-
footer.html( html.filter( '.footer' ).html() );
|
98
|
-
// init continuous scroll
|
99
|
-
body.find( '.releaf_table' ).trigger( 'scrollinit' );
|
100
|
-
}
|
101
|
-
});
|
102
|
-
}, 200 );
|
103
|
-
});
|
104
|
-
|
105
|
-
// attach keypress event
|
106
|
-
input.keyup( function()
|
107
|
-
{
|
108
|
-
if( input.val() == last_search_query )
|
109
|
-
{
|
110
|
-
return;
|
111
|
-
}
|
112
|
-
last_search_query = input.val();
|
113
|
-
form.trigger( 'lookup' );
|
114
|
-
});
|
115
|
-
});
|
116
|
-
|
117
|
-
// init default form
|
118
|
-
|
119
|
-
jQuery( '.view-index .search_form' ).trigger( 'searchinit' );
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
jQuery('form').on('keyup, change', '.sync_field', function(e) {
|
124
|
-
var input = jQuery(e.target);
|
125
|
-
var value_div = input.parents('.value:first');
|
126
|
-
var hidden_field = value_div.find('input[type="hidden"].sync_field');
|
127
|
-
hidden_field.attr('value', input.val());
|
128
|
-
});
|
129
|
-
|
130
|
-
});
|