alchemy_cms 2.5.3.1 → 2.6.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/.travis.yml +5 -13
- data/Gemfile +6 -3
- data/README.md +3 -2
- data/alchemy_cms.gemspec +22 -22
- data/app/assets/fonts/alchemy-icons.eot +0 -0
- data/app/assets/fonts/alchemy-icons.svg +54 -0
- data/app/assets/fonts/alchemy-icons.ttf +0 -0
- data/app/assets/fonts/alchemy-icons.woff +0 -0
- data/app/assets/images/alchemy/icons.png +0 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +151 -0
- data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +3 -2
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +31 -0
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +1 -1
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +98 -0
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +23 -24
- data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +27 -0
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +11 -8
- data/app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee +32 -0
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js.coffee +46 -0
- data/app/assets/javascripts/alchemy/alchemy.js +8 -2
- data/app/assets/javascripts/alchemy/alchemy.link_overlay.js.coffee +5 -4
- data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +49 -0
- data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +3 -0
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +71 -0
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +61 -0
- data/app/assets/javascripts/alchemy/alchemy.spinner.js.coffee +35 -0
- data/app/assets/javascripts/alchemy/alchemy.string_extension.js.coffee +11 -0
- data/app/assets/javascripts/alchemy/alchemy.windows.js.coffee +278 -0
- data/app/assets/stylesheets/alchemy/admin.css.scss +2 -0
- data/app/assets/stylesheets/alchemy/archive.scss +109 -65
- data/app/assets/stylesheets/alchemy/base.scss +16 -188
- data/app/assets/stylesheets/alchemy/dashboard.scss +2 -2
- data/app/assets/stylesheets/alchemy/defaults.scss +2 -1
- data/app/assets/stylesheets/alchemy/elements.scss +58 -94
- data/app/assets/stylesheets/alchemy/errors.scss +2 -2
- data/app/assets/stylesheets/alchemy/{mixins.scss → extends.scss} +104 -80
- data/app/assets/stylesheets/alchemy/flash.scss +4 -6
- data/app/assets/stylesheets/alchemy/fonts.scss +46 -0
- data/app/assets/stylesheets/alchemy/form_elements.scss +46 -45
- data/app/assets/stylesheets/alchemy/frame.scss +20 -15
- data/app/assets/stylesheets/alchemy/icons.scss +22 -9
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +476 -399
- data/app/assets/stylesheets/alchemy/login.scss +1 -1
- data/app/assets/stylesheets/alchemy/menubar.css.scss +1 -1
- data/app/assets/stylesheets/alchemy/notices.scss +5 -5
- data/app/assets/stylesheets/alchemy/pagination.scss +25 -13
- data/app/assets/stylesheets/alchemy/search.scss +29 -17
- data/app/assets/stylesheets/alchemy/sitemap.scss +41 -36
- data/app/assets/stylesheets/alchemy/tables.scss +102 -50
- data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +18 -16
- data/app/assets/stylesheets/alchemy/toolbar.scss +84 -24
- data/app/assets/stylesheets/alchemy/upload.scss +14 -9
- data/app/assets/stylesheets/alchemy/variables.scss +1 -0
- data/app/assets/stylesheets/tiny_mce/plugins/inlinepopups/skins/alchemy/window.css.scss +18 -21
- data/app/controllers/alchemy/admin/attachments_controller.rb +29 -39
- data/app/controllers/alchemy/admin/base_controller.rb +3 -9
- data/app/controllers/alchemy/admin/clipboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/contents_controller.rb +1 -1
- data/app/controllers/alchemy/admin/dashboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +3 -3
- data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +5 -5
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +18 -16
- data/app/controllers/alchemy/admin/pictures_controller.rb +11 -10
- data/app/controllers/alchemy/admin/resources_controller.rb +87 -14
- data/app/controllers/alchemy/admin/tags_controller.rb +3 -3
- data/app/controllers/alchemy/admin/trash_controller.rb +3 -3
- data/app/controllers/alchemy/admin/users_controller.rb +6 -11
- data/app/controllers/alchemy/attachments_controller.rb +8 -9
- data/app/controllers/alchemy/base_controller.rb +17 -10
- data/app/controllers/alchemy/pages_controller.rb +7 -19
- data/app/controllers/alchemy/passwords_controller.rb +15 -3
- data/app/controllers/alchemy/user_sessions_controller.rb +5 -4
- data/app/controllers/alchemy/users_controller.rb +1 -1
- data/app/helpers/alchemy/admin/attachments_helper.rb +2 -2
- data/app/helpers/alchemy/admin/base_helper.rb +62 -90
- data/app/helpers/alchemy/admin/elements_helper.rb +13 -5
- data/app/helpers/alchemy/admin/essences_helper.rb +3 -5
- data/app/helpers/alchemy/admin/pages_helper.rb +6 -3
- data/app/helpers/alchemy/admin/tags_helper.rb +60 -0
- data/app/helpers/alchemy/base_helper.rb +16 -20
- data/app/helpers/alchemy/elements_helper.rb +7 -11
- data/app/helpers/alchemy/essences_helper.rb +2 -2
- data/app/helpers/alchemy/pages_helper.rb +31 -69
- data/app/helpers/alchemy/url_helper.rb +11 -3
- data/app/models/alchemy/attachment.rb +73 -45
- data/app/models/alchemy/cell.rb +1 -1
- data/app/models/alchemy/content.rb +20 -9
- data/app/models/alchemy/element.rb +9 -7
- data/app/models/alchemy/page.rb +15 -248
- data/app/models/alchemy/page/cells.rb +71 -0
- data/app/models/alchemy/page/elements.rb +147 -0
- data/app/models/alchemy/page/naming.rb +90 -0
- data/app/models/alchemy/picture.rb +18 -13
- data/app/models/alchemy/tag.rb +1 -1
- data/app/models/alchemy/user.rb +38 -6
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -7
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +17 -12
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +3 -8
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +20 -12
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +11 -0
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +31 -0
- data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +4 -0
- data/app/views/alchemy/admin/attachments/edit.html.erb +8 -7
- data/app/views/alchemy/admin/attachments/index.html.erb +19 -12
- data/app/views/alchemy/admin/attachments/new.html.erb +2 -2
- data/app/views/alchemy/admin/attachments/show.html.erb +3 -0
- data/app/views/alchemy/admin/contents/_missing.html.erb +4 -4
- data/app/views/alchemy/admin/contents/create.js.erb +1 -1
- data/app/views/alchemy/admin/contents/new.html.erb +6 -3
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_users.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/index.html.erb +3 -3
- data/app/views/alchemy/admin/dashboard/info.html.erb +16 -13
- data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element_foot.html.erb +4 -4
- data/app/views/alchemy/admin/elements/_element_head.html.erb +1 -7
- data/app/views/alchemy/admin/elements/_elements_select.html.erb +2 -2
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +4 -4
- data/app/views/alchemy/admin/elements/_picture_gallery_editor.html.erb +1 -1
- data/app/views/alchemy/admin/elements/create.js.erb +2 -2
- data/app/views/alchemy/admin/elements/fold.js.erb +3 -6
- data/app/views/alchemy/admin/elements/new.html.erb +1 -1
- data/app/views/alchemy/admin/elements/order.js.erb +1 -1
- data/app/views/alchemy/admin/elements/trash.js.erb +1 -1
- data/app/views/alchemy/admin/elements/update.js.erb +2 -2
- data/app/views/alchemy/admin/essence_files/edit.html.erb +4 -4
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +17 -18
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +2 -2
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +1 -0
- data/app/views/alchemy/admin/languages/_form.html.erb +12 -10
- data/app/views/alchemy/admin/languages/_language.html.erb +2 -1
- data/app/views/alchemy/admin/languages/_table.html.erb +3 -3
- data/app/views/alchemy/admin/languages/index.html.erb +15 -15
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +6 -6
- data/app/views/alchemy/admin/layoutpages/index.html.erb +41 -40
- data/app/views/alchemy/admin/pages/_contactform_links.html.erb +4 -4
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +6 -6
- data/app/views/alchemy/admin/pages/_external_link.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_file_link.html.erb +3 -3
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +13 -13
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +2 -4
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +5 -0
- data/app/views/alchemy/admin/pages/configure.html.erb +7 -7
- data/app/views/alchemy/admin/pages/configure_external.html.erb +4 -4
- data/app/views/alchemy/admin/pages/edit.html.erb +23 -30
- data/app/views/alchemy/admin/pages/index.html.erb +34 -23
- data/app/views/alchemy/admin/pages/new.html.erb +1 -1
- data/app/views/alchemy/admin/pages/sort.js.erb +1 -1
- data/app/views/alchemy/admin/partials/_flash_upload.html.erb +2 -3
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
- data/app/views/alchemy/admin/partials/_search_form.html.erb +3 -3
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/_archive.html.erb +7 -7
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +6 -6
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +4 -4
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +3 -8
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +9 -14
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +27 -25
- data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +3 -1
- data/app/views/alchemy/admin/pictures/index.html.erb +49 -42
- data/app/views/alchemy/admin/pictures/new.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/show.html.erb +11 -0
- data/app/views/alchemy/admin/resources/_boolean.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_datetime.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_form.html.erb +9 -8
- data/app/views/alchemy/admin/resources/_resource.html.erb +15 -21
- data/app/views/alchemy/admin/resources/_string.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_table.html.erb +11 -13
- data/app/views/alchemy/admin/resources/_text.html.erb +2 -2
- data/app/views/alchemy/admin/resources/index.csv.erb +13 -0
- data/app/views/alchemy/admin/resources/index.html.erb +24 -15
- data/app/views/alchemy/admin/sites/index.html.erb +23 -0
- data/app/views/alchemy/admin/tags/_radio_tag.html.erb +1 -1
- data/app/views/alchemy/admin/tags/_tag.html.erb +2 -1
- data/app/views/alchemy/admin/tags/edit.html.erb +1 -1
- data/app/views/alchemy/admin/tags/index.html.erb +16 -11
- data/app/views/alchemy/admin/tags/new.html.erb +3 -3
- data/app/views/alchemy/admin/trash/clear.js.coffee +1 -1
- data/app/views/alchemy/admin/users/_table.html.erb +12 -5
- data/app/views/alchemy/admin/users/_user.html.erb +16 -16
- data/app/views/alchemy/admin/users/index.html.erb +28 -16
- data/app/views/alchemy/breadcrumb/_page.html.erb +15 -0
- data/app/views/alchemy/breadcrumb/_spacer.html.erb +1 -0
- data/app/views/alchemy/elements/_editor_not_found.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +16 -16
- data/app/views/alchemy/essences/_essence_file_view.html.erb +8 -9
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +3 -6
- data/app/views/alchemy/essences/_essence_picture_tools.html.erb +9 -8
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +0 -5
- data/app/views/alchemy/essences/_linkable_essence_tools.html.erb +2 -2
- data/app/views/alchemy/navigation/_link.html.erb +7 -7
- data/app/views/alchemy/navigation/_renderer.html.erb +29 -36
- data/app/views/alchemy/notifications/admin_user_created.de.text.erb +5 -1
- data/app/views/alchemy/notifications/admin_user_created.en.text.erb +5 -1
- data/app/views/alchemy/notifications/registered_user_created.de.text.erb +13 -0
- data/app/views/alchemy/notifications/registered_user_created.en.text.erb +13 -0
- data/app/views/alchemy/search/_result.html.erb +4 -6
- data/app/views/alchemy/search/_results.html.erb +4 -5
- data/app/views/alchemy/user_sessions/leave.html.erb +1 -1
- data/app/views/alchemy/user_sessions/new.html.erb +2 -2
- data/app/views/kaminari/_first_page.html.erb +11 -0
- data/app/views/kaminari/_gap.html.erb +1 -1
- data/app/views/kaminari/_last_page.html.erb +11 -0
- data/app/views/kaminari/_next_page.html.erb +2 -2
- data/app/views/kaminari/_page.html.erb +1 -1
- data/app/views/kaminari/_paginator.html.erb +2 -0
- data/app/views/kaminari/_prev_page.html.erb +2 -2
- data/app/views/layouts/alchemy/admin.html.erb +4 -5
- data/config/alchemy/config.yml +8 -12
- data/config/authorization_rules.rb +4 -3
- data/config/initializers/dragonfly.rb +20 -12
- data/config/locales/alchemy.de.yml +20 -15
- data/config/locales/alchemy.en.yml +15 -10
- data/config/locales/devise.de.yml +1 -0
- data/config/routes.rb +3 -3
- data/{spec/dummy/db/migrate/20121118000000_alchemy_two_point_four.rb → db/migrate/20130214233001_alchemy_two_point_five.rb} +50 -36
- data/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +21 -0
- data/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +11 -0
- data/lib/alchemy/capistrano.rb +10 -8
- data/lib/alchemy/errors.rb +7 -0
- data/lib/alchemy/filetypes.rb +33 -0
- data/lib/alchemy/i18n.rb +9 -1
- data/lib/alchemy/name_conversions.rb +28 -0
- data/lib/alchemy/page_layout.rb +5 -3
- data/lib/alchemy/resource.rb +132 -29
- data/lib/alchemy/resources_helper.rb +81 -12
- data/lib/alchemy/upgrader.rb +14 -276
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +17 -2
- data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +1 -1
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +1 -1
- data/lib/tasks/alchemy/convert.rake +39 -0
- data/lib/tasks/alchemy/install.rake +4 -6
- data/lib/tasks/alchemy/upgrade.rake +18 -1
- data/spec/controllers/admin/clipboard_controller_spec.rb +4 -4
- data/spec/controllers/admin/elements_controller_spec.rb +23 -23
- data/spec/controllers/admin/pages_controller_spec.rb +15 -0
- data/spec/controllers/admin/resources_controller_spec.rb +1 -11
- data/spec/controllers/admin/trash_controller_spec.rb +9 -9
- data/spec/controllers/attachments_controller_spec.rb +3 -3
- data/spec/controllers/elements_controller_spec.rb +2 -2
- data/spec/controllers/pages_controller_spec.rb +160 -129
- data/spec/controllers/pictures_controller_spec.rb +2 -2
- data/spec/controllers/user_sessions_controller_spec.rb +3 -3
- data/spec/controllers/users_controller_spec.rb +2 -2
- data/spec/dummy/app/models/event.rb +2 -2
- data/spec/dummy/app/models/location.rb +4 -0
- data/spec/dummy/app/views/layouts/application.html.erb +6 -42
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/migrate/20121026104128_create_events.rb +0 -1
- data/{db/migrate/20121118000000_alchemy_two_point_four.rb → spec/dummy/db/migrate/20130214233001_alchemy_two_point_five.rb} +50 -36
- data/spec/dummy/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +21 -0
- data/spec/dummy/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +11 -0
- data/spec/dummy/db/migrate/20130328101418_create_locations.rb +9 -0
- data/spec/dummy/db/schema.rb +15 -6
- data/spec/factories.rb +4 -4
- data/spec/{integration → features}/admin/link_overlay_spec.rb +0 -0
- data/spec/{integration → features}/admin/modules_integration_spec.rb +1 -1
- data/spec/{integration → features}/admin/pages_controller_spec.rb +9 -4
- data/spec/{integration → features}/admin/picture_library_integration_spec.rb +5 -5
- data/spec/{integration → features}/admin/resources_integration_spec.rb +1 -1
- data/spec/{integration → features}/navigation_spec.rb +0 -0
- data/spec/{integration → features}/pages_controller_spec.rb +42 -112
- data/spec/{integration → features}/picture_security_spec.rb +2 -2
- data/spec/{integration → features}/security_spec.rb +7 -7
- data/spec/{integration → features}/translation_integration_spec.rb +0 -0
- data/spec/helpers/admin/base_helper_spec.rb +0 -50
- data/spec/helpers/admin/tags_helper_spec.rb +53 -0
- data/spec/helpers/base_helper_spec.rb +19 -3
- data/spec/helpers/pages_helper_spec.rb +92 -44
- data/spec/{url_helpers_spec.rb → helpers/picture_url_helpers_spec.rb} +7 -7
- data/spec/helpers/url_helper_spec.rb +92 -72
- data/spec/{config_spec.rb → libraries/config_spec.rb} +0 -0
- data/spec/libraries/resource_spec.rb +215 -76
- data/spec/libraries/resources_helper_spec.rb +70 -28
- data/spec/models/attachment_spec.rb +75 -9
- data/spec/models/clipboard_spec.rb +1 -1
- data/spec/models/element_spec.rb +7 -0
- data/spec/models/page_spec.rb +144 -25
- data/spec/models/picture_spec.rb +5 -5
- data/spec/models/resource_spec.rb +47 -10
- data/spec/models/user_spec.rb +115 -3
- data/spec/{routing_spec.rb → routing/routing_spec.rb} +8 -20
- data/spec/spec_helper.rb +5 -6
- data/spec/support/alchemy/specs_helpers.rb +1 -1
- data/spec/support/ci/install_phantomjs +1 -1
- data/spec/support/image with spaces.png +0 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +18 -18
- data/vendor/assets/javascripts/jquery_plugins/{jquery.dialogextend.1_0_1.js → jquery.dialogextend.js} +25 -17
- data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +7 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +7 -7
- data/vendor/assets/javascripts/keymage.min.js +6 -0
- data/vendor/assets/javascripts/spin.min.js +1 -0
- metadata +122 -124
- data/app/assets/images/alchemy/ajax_loader.gif +0 -0
- data/app/assets/images/alchemy/gui/toggle.png +0 -0
- data/app/assets/images/alchemy/image_loader.gif +0 -0
- data/app/assets/images/alchemy/shading.png +0 -0
- data/app/assets/images/alchemy/tabs.gif +0 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js +0 -172
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +0 -47
- data/app/assets/javascripts/alchemy/alchemy.element_editor_selector.js +0 -91
- data/app/assets/javascripts/alchemy/alchemy.growler.js +0 -46
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +0 -60
- data/app/assets/javascripts/alchemy/alchemy.js_extensions.js +0 -15
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js +0 -97
- data/app/assets/javascripts/alchemy/alchemy.windows.js +0 -321
- data/app/models/alchemy/clipboard_spec.rb +0 -0
- data/app/views/alchemy/admin/pictures/show_in_window.html.erb +0 -8
- data/app/views/alchemy/notifications/registered_user_created.text.erb +0 -11
- data/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +0 -21
- data/db/migrate/20121205155004_create_alchemy_sites.rb +0 -14
- data/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +0 -6
- data/db/migrate/20121220102223_add_aliases_to_site.rb +0 -6
- data/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +0 -11
- data/db/migrate/20130121092645_migrate_to_devise.rb +0 -24
- data/spec/alchemy_spec.rb +0 -7
- data/spec/dummy/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +0 -21
- data/spec/dummy/db/migrate/20121205155004_create_alchemy_sites.rb +0 -14
- data/spec/dummy/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +0 -6
- data/spec/dummy/db/migrate/20121220102223_add_aliases_to_site.rb +0 -6
- data/spec/dummy/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +0 -11
- data/spec/dummy/db/migrate/20130121092645_migrate_to_devise.rb +0 -24
- data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo-1.4.2-min.js +0 -11
@@ -1,5 +1,18 @@
|
|
1
1
|
window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
|
2
2
|
|
3
|
+
|
4
|
+
# Adds buttons into a toolbar inside of overlay windows
|
5
|
+
Alchemy.ToolbarButton = (options) ->
|
6
|
+
$btn = $('<div class="button_with_label" />')
|
7
|
+
if options.buttonId
|
8
|
+
$btn.attr(id: options.buttonId)
|
9
|
+
$lnk = $("<a title='#{options.buttonTitle}' class='icon_button' href='#' />")
|
10
|
+
$lnk.click options.onClick
|
11
|
+
$lnk.append "<span class='icon #{options.iconClass}' />"
|
12
|
+
$btn.append $lnk
|
13
|
+
$btn.append "<br><label>#{options.buttonLabel}</label>"
|
14
|
+
$btn
|
15
|
+
|
3
16
|
Alchemy.ElementsWindow =
|
4
17
|
|
5
18
|
init: (path, options, callback) ->
|
@@ -9,13 +22,12 @@ Alchemy.ElementsWindow =
|
|
9
22
|
$dialog.dialog "destroy"
|
10
23
|
$("#alchemyElementWindow").remove()
|
11
24
|
Alchemy.ElementsWindow.button.enable()
|
12
|
-
|
13
25
|
self.path = path
|
14
26
|
self.callback = callback
|
15
|
-
$dialog.html Alchemy.getOverlaySpinner(
|
27
|
+
$dialog.html Alchemy.getOverlaySpinner(width: 420, height: 300)
|
16
28
|
self.dialog = $dialog
|
17
29
|
$('#main_content').append($dialog)
|
18
|
-
|
30
|
+
self.currentWindow = $dialog.dialog
|
19
31
|
modal: false
|
20
32
|
minWidth: 420
|
21
33
|
minHeight: 300
|
@@ -26,13 +38,12 @@ Alchemy.ElementsWindow =
|
|
26
38
|
position:
|
27
39
|
my: "right bottom", at: "right-4px bottom-4px"
|
28
40
|
closeOnEscape: false
|
41
|
+
dialogClass: 'alchemy-elements-window'
|
29
42
|
create: ->
|
30
43
|
$dialog.before Alchemy.ElementsWindow.createToolbar(options.toolbarButtons)
|
31
|
-
|
32
44
|
open: (event, ui) ->
|
33
45
|
Alchemy.ElementsWindow.button.disable()
|
34
|
-
Alchemy.ElementsWindow.reload
|
35
|
-
|
46
|
+
Alchemy.ElementsWindow.reload()
|
36
47
|
beforeClose: ->
|
37
48
|
if Alchemy.isPageDirty()
|
38
49
|
Alchemy.openConfirmWindow
|
@@ -41,21 +52,16 @@ Alchemy.ElementsWindow =
|
|
41
52
|
okLabel: options.texts.okLabel
|
42
53
|
cancelLabel: options.texts.cancelLabel
|
43
54
|
okCallback: closeCallback
|
44
|
-
|
45
55
|
false
|
46
56
|
else
|
47
57
|
true
|
48
|
-
|
49
58
|
close: closeCallback
|
50
|
-
)
|
51
59
|
|
52
60
|
button:
|
53
61
|
enable: ->
|
54
62
|
$("div#show_element_window").removeClass("disabled").find("a").removeAttr "tabindex"
|
55
|
-
|
56
63
|
disable: ->
|
57
64
|
$("div#show_element_window").addClass("disabled").find("a").attr "tabindex", "-1"
|
58
|
-
|
59
65
|
toggle: ->
|
60
66
|
if $("div#show_element_window").hasClass("disabled")
|
61
67
|
Alchemy.ElementsWindow.button.enable()
|
@@ -63,19 +69,14 @@ Alchemy.ElementsWindow =
|
|
63
69
|
Alchemy.ElementsWindow.button.disable()
|
64
70
|
|
65
71
|
createToolbar: (buttons) ->
|
66
|
-
$toolbar = $(
|
67
|
-
btn
|
68
|
-
|
69
|
-
while i < buttons.length
|
70
|
-
btn = buttons[i]
|
71
|
-
$toolbar.append Alchemy.ToolbarButton(
|
72
|
+
$toolbar = $('<div id="overlay_toolbar"/>')
|
73
|
+
for btn in buttons
|
74
|
+
$toolbar.append Alchemy.ToolbarButton
|
72
75
|
buttonTitle: btn.title
|
73
76
|
buttonLabel: btn.label
|
74
77
|
iconClass: btn.iconClass
|
75
78
|
onClick: btn.onClick
|
76
79
|
buttonId: btn.buttonId
|
77
|
-
)
|
78
|
-
i++
|
79
80
|
$toolbar
|
80
81
|
|
81
82
|
reload: ->
|
@@ -84,10 +85,8 @@ Alchemy.ElementsWindow =
|
|
84
85
|
url: self.path
|
85
86
|
success: (data, textStatus, XMLHttpRequest) ->
|
86
87
|
self.dialog.html data
|
87
|
-
Alchemy.
|
88
|
-
|
89
|
-
|
90
|
-
self.callback.call() if self.callback
|
91
|
-
|
88
|
+
Alchemy.GUI.init "#alchemyElementWindow"
|
89
|
+
if self.callback
|
90
|
+
self.callback.call()
|
92
91
|
error: (XMLHttpRequest, textStatus, errorThrown) ->
|
93
92
|
Alchemy.AjaxErrorHandler $dialog, XMLHttpRequest.status, textStatus, errorThrown
|
@@ -0,0 +1,27 @@
|
|
1
|
+
window.Alchemy = {} if typeof (window.Alchemy) is "undefined"
|
2
|
+
|
3
|
+
Alchemy.Growler =
|
4
|
+
|
5
|
+
build: (message, flash_type) ->
|
6
|
+
$flash_container = $("<div class=\"flash #{flash_type}\" />")
|
7
|
+
icon_class = (if flash_type is "notice" then "tick" else flash_type)
|
8
|
+
$flash_container.append "<span class=\"icon #{icon_class}\" />"
|
9
|
+
$flash_container.append message
|
10
|
+
$("#flash_notices").append $flash_container
|
11
|
+
$("#flash_notices").show()
|
12
|
+
Alchemy.Growler.fade()
|
13
|
+
|
14
|
+
fade: ->
|
15
|
+
$(".flash.notice, .flash.warn, .flash.alert", "#flash_notices").delay(5000).hide "drop",
|
16
|
+
direction: "up"
|
17
|
+
, 400, ->
|
18
|
+
$(this).remove()
|
19
|
+
|
20
|
+
$(".flash.error", "#flash_notices").click ->
|
21
|
+
$(this).hide "drop",
|
22
|
+
direction: "up"
|
23
|
+
, 400, ->
|
24
|
+
$(this).remove()
|
25
|
+
|
26
|
+
Alchemy.growl = (message, style = "notice") ->
|
27
|
+
Alchemy.Growler.build message, style
|
@@ -1,15 +1,18 @@
|
|
1
1
|
window.Alchemy = {} if window.Alchemy == undefined
|
2
2
|
|
3
|
+
# Alchemy GUI initializers
|
3
4
|
Alchemy.GUI =
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
Alchemy.
|
8
|
-
Alchemy.
|
6
|
+
# Initializes all Alchemy GUI elements in given scope
|
7
|
+
init: (scope) ->
|
8
|
+
Alchemy.SelectBox(scope)
|
9
|
+
Alchemy.Datepicker(scope)
|
10
|
+
Alchemy.Buttons.observe(scope)
|
11
|
+
Alchemy.overlayObserver(scope)
|
12
|
+
Alchemy.Hotkeys(scope)
|
13
|
+
Alchemy.ListFilter(scope)
|
9
14
|
|
10
15
|
initElement: ($el) ->
|
11
16
|
Alchemy.ElementDirtyObserver($el)
|
12
|
-
Alchemy.
|
13
|
-
Alchemy.
|
14
|
-
Alchemy.Datepicker('input[type="date"]', $el)
|
15
|
-
Alchemy.overlayObserver($el)
|
17
|
+
Alchemy.GUI.init($el)
|
18
|
+
Alchemy.ImageLoader($el);
|
@@ -0,0 +1,32 @@
|
|
1
|
+
window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
|
2
|
+
|
3
|
+
# Handles Alchemy hotkeys
|
4
|
+
#
|
5
|
+
Alchemy.Hotkeys = (scope) ->
|
6
|
+
$search_fields = $('#search_field, #search_input_field', scope)
|
7
|
+
$search_fields_clear = $('.search_field_clear, .js_filter_field_clear', scope)
|
8
|
+
|
9
|
+
# Binds keyboard shortcuts to searchfields
|
10
|
+
keymage 'alt-f',
|
11
|
+
->
|
12
|
+
$search_fields.focus()
|
13
|
+
keymage.setScope('search')
|
14
|
+
,
|
15
|
+
preventDefault: true
|
16
|
+
keymage 'search', 'esc', ->
|
17
|
+
$search_fields_clear.click()
|
18
|
+
$search_fields.blur()
|
19
|
+
|
20
|
+
# Binds click events to hotkeys
|
21
|
+
#
|
22
|
+
# Simply add a data-alchemy-hotkey attribute to your link.
|
23
|
+
# If a hotkey is triggered by user, the click event of the element gets triggerd.
|
24
|
+
#
|
25
|
+
$('[data-alchemy-hotkey]').each ->
|
26
|
+
$this = $(this)
|
27
|
+
key = $this.data('alchemy-hotkey')
|
28
|
+
keymage key, ->
|
29
|
+
$this.click()
|
30
|
+
|
31
|
+
keymage 'alt-w', ->
|
32
|
+
Alchemy.CurrentWindow.dialog('close')
|
@@ -0,0 +1,46 @@
|
|
1
|
+
window.Alchemy = {} if typeof (window.Alchemy) is "undefined"
|
2
|
+
|
3
|
+
Alchemy.ImageCropper =
|
4
|
+
|
5
|
+
initialized: false
|
6
|
+
|
7
|
+
init: (box, size_x, size_y, default_box, ratio, true_size) ->
|
8
|
+
crop_from_field = $("#essence_picture_crop_from")
|
9
|
+
crop_size_field = $("#essence_picture_crop_size")
|
10
|
+
options =
|
11
|
+
onSelect: (coords) ->
|
12
|
+
crop_from_field.val coords.x + "x" + coords.y
|
13
|
+
crop_size_field.val coords.w + "x" + coords.h
|
14
|
+
return
|
15
|
+
setSelect: box
|
16
|
+
aspectRatio: (if ratio then ratio else `undefined`)
|
17
|
+
minSize: [size_x, size_y]
|
18
|
+
boxWidth: 800
|
19
|
+
boxHeight: 600
|
20
|
+
trueSize: true_size
|
21
|
+
Alchemy.ImageCropper.box = box
|
22
|
+
Alchemy.ImageCropper.default_box = default_box
|
23
|
+
Alchemy.ImageCropper.crop_from_field = crop_from_field
|
24
|
+
Alchemy.ImageCropper.crop_size_field = crop_size_field
|
25
|
+
unless Alchemy.ImageCropper.initialized
|
26
|
+
Alchemy.ImageCropper.api = $.Jcrop("#imageToCrop", options)
|
27
|
+
Alchemy.ImageCropper.initialized = true
|
28
|
+
$(".alchemy_overlay").on 'dialogclose', Alchemy.ImageCropper.destroy
|
29
|
+
return
|
30
|
+
|
31
|
+
undo: ->
|
32
|
+
Alchemy.ImageCropper.api.setSelect Alchemy.ImageCropper.box
|
33
|
+
return
|
34
|
+
|
35
|
+
reset: ->
|
36
|
+
Alchemy.ImageCropper.api.setSelect Alchemy.ImageCropper.default_box
|
37
|
+
Alchemy.ImageCropper.crop_from_field.val ""
|
38
|
+
Alchemy.ImageCropper.crop_size_field.val ""
|
39
|
+
return
|
40
|
+
|
41
|
+
destroy: ->
|
42
|
+
try
|
43
|
+
Alchemy.ImageCropper.api.destroy()
|
44
|
+
finally
|
45
|
+
Alchemy.ImageCropper.initialized = false
|
46
|
+
return
|
@@ -14,6 +14,8 @@
|
|
14
14
|
//= require tiny_mce/tiny_mce
|
15
15
|
//= require_tree ../../../../vendor/assets/javascripts/jquery_plugins/
|
16
16
|
//= require_tree ../../../../vendor/assets/javascripts/swfupload/
|
17
|
+
//= require spin.min
|
18
|
+
//= require keymage.min
|
17
19
|
//= require alchemy/alchemy.routes
|
18
20
|
//= require alchemy/alchemy.base
|
19
21
|
//= require alchemy/alchemy.browser
|
@@ -21,16 +23,20 @@
|
|
21
23
|
//= require alchemy/alchemy.datepicker
|
22
24
|
//= require alchemy/alchemy.dirty
|
23
25
|
//= require alchemy/alchemy.dragndrop
|
24
|
-
//= require alchemy/alchemy.
|
26
|
+
//= require alchemy/alchemy.element_editors
|
25
27
|
//= require alchemy/alchemy.growler
|
26
28
|
//= require alchemy/alchemy.gui
|
29
|
+
//= require alchemy/alchemy.hotkeys
|
27
30
|
//= require alchemy/alchemy.image_cropper
|
28
|
-
//= require alchemy/alchemy.
|
31
|
+
//= require alchemy/alchemy.string_extension
|
29
32
|
//= require alchemy/alchemy.link_overlay
|
33
|
+
//= require alchemy/alchemy.list_filter
|
30
34
|
//= require alchemy/alchemy.onload
|
31
35
|
//= require alchemy/alchemy.page_sorter
|
32
36
|
//= require alchemy/alchemy.uploader
|
33
37
|
//= require alchemy/alchemy.file_progress
|
38
|
+
//= require alchemy/alchemy.sitemap
|
39
|
+
//= require alchemy/alchemy.spinner
|
34
40
|
//= require alchemy/alchemy.swf_upload
|
35
41
|
//= require alchemy/alchemy.windows
|
36
42
|
//= require alchemy/alchemy.preview_window
|
@@ -12,7 +12,7 @@
|
|
12
12
|
self = Alchemy.LinkOverlay
|
13
13
|
$dialog = $('<div style="display:none" id="alchemyLinkOverlay"></div>')
|
14
14
|
|
15
|
-
$dialog.html(Alchemy.getOverlaySpinner({
|
15
|
+
$dialog.html(Alchemy.getOverlaySpinner({width: width}))
|
16
16
|
|
17
17
|
self.current = $dialog.dialog({
|
18
18
|
modal: true,
|
@@ -47,6 +47,8 @@
|
|
47
47
|
page_id = $this.data('page-id')
|
48
48
|
url = $this.data('url')
|
49
49
|
self.selectPage(page_id, url)
|
50
|
+
if $this.is('.show_elements_to_link')
|
51
|
+
Alchemy.Spinner.small().spin($this.next()[0])
|
50
52
|
self.showElementsSelect(page_id) if $this.hasClass('show_elements_to_link')
|
51
53
|
|
52
54
|
close : ->
|
@@ -54,9 +56,9 @@
|
|
54
56
|
return true
|
55
57
|
|
56
58
|
selectPage : (selected_element, urlname) ->
|
57
|
-
$('#page_anchor').removeAttr('value')
|
58
59
|
# We have to remove the Attribute. If not the value does not get updated.
|
59
|
-
$('
|
60
|
+
$('#page_anchor').removeAttr('value')
|
61
|
+
$('.elements_for_page').hide().html('')
|
60
62
|
$('#internal_urlname').val('/' + urlname)
|
61
63
|
$('#alchemyLinkOverlay #sitemap .selected_page').removeClass('selected_page')
|
62
64
|
$('#sitemap_sitename_' + selected_element).addClass('selected_page').attr('name', urlname)
|
@@ -153,7 +155,6 @@
|
|
153
155
|
|
154
156
|
hideElementsSelect: (id) ->
|
155
157
|
$('#elements_for_page_' + id).hide()
|
156
|
-
$('#elements_for_page_' + id).html('<img src="/assets/alchemy/ajax_loader.gif" alt="">')
|
157
158
|
$('#page_anchor').removeAttr('value')
|
158
159
|
$('#page_selector_container').scrollTo('#sitemap_sitename_'+id, {duration: 400, offset: -10})
|
159
160
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
|
2
|
+
|
3
|
+
# The Alchemy list filter
|
4
|
+
#
|
5
|
+
# The list items must have a name attribute.
|
6
|
+
#
|
7
|
+
# It hides all list items that don't match the term from filter input field.
|
8
|
+
#
|
9
|
+
class Alchemy.ListFilterHandler
|
10
|
+
|
11
|
+
# Pass a input field with a data-alchemy-list-filter attribute to this constructor
|
12
|
+
constructor: (filter) ->
|
13
|
+
@filter_field = $(filter)
|
14
|
+
@items = $(@filter_field.data('alchemy-list-filter'))
|
15
|
+
@clear = @filter_field.siblings('.js_filter_field_clear')
|
16
|
+
@_observe()
|
17
|
+
|
18
|
+
_observe: ->
|
19
|
+
@filter_field.on 'keyup', (e) =>
|
20
|
+
@clear.show()
|
21
|
+
@_filter @filter_field.val()
|
22
|
+
@clear.click (e) =>
|
23
|
+
e.preventDefault()
|
24
|
+
@_clear()
|
25
|
+
@filter_field.focus ->
|
26
|
+
keymage.setScope('list_filter')
|
27
|
+
keymage 'list_filter', 'esc', =>
|
28
|
+
@_clear()
|
29
|
+
@filter_field.blur()
|
30
|
+
|
31
|
+
_filter: (term) ->
|
32
|
+
@clear.hide() if term == ''
|
33
|
+
@items.map ->
|
34
|
+
item = $(this)
|
35
|
+
# indexOf is much faster then match()
|
36
|
+
if item.attr('name').toLowerCase().indexOf(term.toLowerCase()) != -1
|
37
|
+
item.show()
|
38
|
+
else
|
39
|
+
item.hide()
|
40
|
+
|
41
|
+
_clear: ->
|
42
|
+
@filter_field.val ''
|
43
|
+
@_filter ''
|
44
|
+
|
45
|
+
# Initializes an Alchemy.ListFilterHandler on all input fields with a data-alchemy-list-filter attribute.
|
46
|
+
#
|
47
|
+
Alchemy.ListFilter = (scope) ->
|
48
|
+
$('[data-alchemy-list-filter]', scope).map ->
|
49
|
+
new Alchemy.ListFilterHandler(this)
|
@@ -0,0 +1,71 @@
|
|
1
|
+
window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
|
2
|
+
|
3
|
+
Alchemy.PreviewWindow =
|
4
|
+
|
5
|
+
init: (url, title) ->
|
6
|
+
$iframe = $("#alchemyPreviewWindow")
|
7
|
+
if $iframe.length is 0
|
8
|
+
$iframe = $("<iframe src=\"#{url}\" id=\"alchemyPreviewWindow\" frameborder=\"0\"/>")
|
9
|
+
$iframe.load ->
|
10
|
+
$(".preview-refresh-spinner").hide()
|
11
|
+
$iframe.css "background-color": "#ffffff"
|
12
|
+
Alchemy.PreviewWindow.currentWindow = $iframe.dialog(
|
13
|
+
modal: false
|
14
|
+
title: title
|
15
|
+
width: $(window).width() - 502
|
16
|
+
height: $(window).height() - 76
|
17
|
+
minWidth: 600
|
18
|
+
minHeight: 300
|
19
|
+
show: "fade"
|
20
|
+
hide: "fade"
|
21
|
+
position: [70, 84]
|
22
|
+
autoResize: true
|
23
|
+
closeOnEscape: false
|
24
|
+
dialogClass: 'alchemy-preview-window'
|
25
|
+
create: ->
|
26
|
+
spinner = Alchemy.Spinner.small(className: "preview-refresh-spinner")
|
27
|
+
$reload = $("<button class=\"ui-dialog-titlebar-refresh ui-corner-all ui-state-default\" role=\"button\"></button>")
|
28
|
+
$titlebar = $("#alchemyPreviewWindow").prev()
|
29
|
+
$reload.append "<span class=\"ui-icon ui-icon-refresh\">reload</span>"
|
30
|
+
$titlebar.append $reload
|
31
|
+
$titlebar.append spinner.spin().el
|
32
|
+
$reload.click Alchemy.reloadPreview
|
33
|
+
$reload.hover ->
|
34
|
+
$(this).toggleClass "ui-state-hover ui-state-default"
|
35
|
+
close: (event, ui) ->
|
36
|
+
Alchemy.PreviewWindow.button.enable()
|
37
|
+
open: (event, ui) ->
|
38
|
+
$(this).css width: "100%"
|
39
|
+
Alchemy.PreviewWindow.button.disable()
|
40
|
+
).dialogExtend
|
41
|
+
maximize: true
|
42
|
+
dblclick: "maximize"
|
43
|
+
icons:
|
44
|
+
maximize: "ui-icon-fullscreen"
|
45
|
+
restore: "ui-icon-exit-fullscreen"
|
46
|
+
else
|
47
|
+
$("#alchemyPreviewWindow").dialog "open"
|
48
|
+
|
49
|
+
refresh: ->
|
50
|
+
$iframe = $("#alchemyPreviewWindow")
|
51
|
+
$(".preview-refresh-spinner").show()
|
52
|
+
$iframe.load ->
|
53
|
+
$(".preview-refresh-spinner").hide()
|
54
|
+
$iframe.attr("src", $iframe.attr("src"))
|
55
|
+
true
|
56
|
+
|
57
|
+
button:
|
58
|
+
enable: ->
|
59
|
+
$("div#show_preview_window").removeClass("disabled").find("a").removeAttr "tabindex"
|
60
|
+
|
61
|
+
disable: ->
|
62
|
+
$("div#show_preview_window").addClass("disabled").find("a").attr "tabindex", "-1"
|
63
|
+
|
64
|
+
toggle: ->
|
65
|
+
if $("div#show_preview_window").hasClass("disabled")
|
66
|
+
Alchemy.PreviewWindow.button.enable()
|
67
|
+
else
|
68
|
+
Alchemy.PreviewWindow.button.disable()
|
69
|
+
|
70
|
+
Alchemy.reloadPreview = ->
|
71
|
+
Alchemy.PreviewWindow.refresh()
|
@@ -0,0 +1,61 @@
|
|
1
|
+
window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
|
2
|
+
|
3
|
+
# The admin sitemap Alchemy module
|
4
|
+
Alchemy.Sitemap =
|
5
|
+
|
6
|
+
# Storing some objects.
|
7
|
+
init: ->
|
8
|
+
@search_field = $("#search_field")
|
9
|
+
@filter_field_clear = $('.js_filter_field_clear')
|
10
|
+
@display = $('#page_filter_result')
|
11
|
+
@items = $(".sitemap_page", '#sitemap')
|
12
|
+
@_observe()
|
13
|
+
|
14
|
+
# Filters the sitemap
|
15
|
+
filter: (term) ->
|
16
|
+
results = []
|
17
|
+
self = Alchemy.Sitemap
|
18
|
+
self.items.map ->
|
19
|
+
item = $(this)
|
20
|
+
if term != '' && item.attr('name').toLowerCase().indexOf(term) != -1
|
21
|
+
item.addClass('highlight')
|
22
|
+
item.removeClass('no-match')
|
23
|
+
results.push item
|
24
|
+
else
|
25
|
+
item.addClass('no-match')
|
26
|
+
item.removeClass('highlight')
|
27
|
+
self.filter_field_clear.show()
|
28
|
+
length = results.length
|
29
|
+
if length == 1
|
30
|
+
self.display.show().text("1 #{self._t('page_found')}")
|
31
|
+
$.scrollTo(results[0], {duration: 400, offset: -80})
|
32
|
+
else if length > 1
|
33
|
+
self.display.show().text("#{length} #{self._t('pages_found')}")
|
34
|
+
else
|
35
|
+
self.items.removeClass('no-match highlight')
|
36
|
+
self.display.hide()
|
37
|
+
$.scrollTo('0', 400)
|
38
|
+
self.filter_field_clear.hide()
|
39
|
+
|
40
|
+
# Adds onkey up observer to search field
|
41
|
+
_observe: ->
|
42
|
+
filter = @filter
|
43
|
+
@search_field.on 'keyup', ->
|
44
|
+
term = $(this).val()
|
45
|
+
filter(term.toLowerCase())
|
46
|
+
@search_field.on 'focus', ->
|
47
|
+
keymage.setScope('search')
|
48
|
+
@filter_field_clear.click =>
|
49
|
+
@search_field.val('')
|
50
|
+
filter('')
|
51
|
+
|
52
|
+
# Translations
|
53
|
+
_t: (id) ->
|
54
|
+
i18n =
|
55
|
+
page_found:
|
56
|
+
de: 'Seite gefunden'
|
57
|
+
en: 'Page found'
|
58
|
+
pages_found:
|
59
|
+
de: 'Seiten gefunden'
|
60
|
+
en: 'Pages found'
|
61
|
+
i18n[id][Alchemy.locale]
|