coalla-cms 0.4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +81 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +168 -0
- data/Rakefile +29 -0
- data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/images/ajax-loader.gif +0 -0
- data/app/assets/images/blank.gif +0 -0
- data/app/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/bootstrap/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/admin/admin.js +295 -0
- data/app/assets/javascripts/admin/custom_admin.js +0 -0
- data/app/assets/javascripts/admin/jquery-migrate.min.js +2 -0
- data/app/assets/javascripts/admin/photo_uploader.js +67 -0
- data/app/assets/javascripts/admin/vendor/bootstrap.min.js +7 -0
- data/app/assets/javascripts/admin/vendor/jquery-ui-timepicker-addon-ru.js +40 -0
- data/app/assets/javascripts/admin/vendor/jquery.tagsinput.js +365 -0
- data/app/assets/javascripts/admin/vendor/jquery.tokeninput.patched.js +875 -0
- data/app/assets/javascripts/admin/vendor/underscore-min.js +5 -0
- data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +209 -0
- data/app/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +64 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/LICENSE.txt +303 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad-gallery-css-diff.htm +831 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_next.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_prev.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_back.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_forward.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.css +185 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.js +984 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min - ref.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/loader.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/opa75.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/trans.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/blank.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading@2x.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_overlay.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite@2x.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/fancybox_buttons.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.css +97 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.js +122 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-media.js +199 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.css +55 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.js +162 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.css +274 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.js +2020 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.pack.js +46 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/README.md +66 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/dialogs/slideshow.js +1396 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/dialogs/slideshow.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/icons/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/icons/slideshow.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/Serbian_translation.txt +9 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/el.js +37 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/en.js +35 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/fr.js +35 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/ru.js +35 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/sr-latn.js +35 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/sr.js +35 -0
- data/app/assets/javascripts/ckeditor/plugins/slideshow/plugin.js +217 -0
- data/app/assets/stylesheets/admin/admin.scss +302 -0
- data/app/assets/stylesheets/admin/custom_admin.scss +1 -0
- data/app/assets/stylesheets/admin/vendor/bootstrap.min.css +14 -0
- data/app/assets/stylesheets/admin/vendor/jquery.tagsinput.css +99 -0
- data/app/assets/stylesheets/admin/vendor/token-input-facebook.patched.css +126 -0
- data/app/assets/stylesheets/admin/vendor/token-input.patched.css +116 -0
- data/app/controllers/admin/autocomplete_controller.rb +14 -0
- data/app/controllers/admin/image_upload_controller.rb +27 -0
- data/app/controllers/admin/lookups_controller.rb +47 -0
- data/app/controllers/admin/sortable_controller.rb +26 -0
- data/app/controllers/concerns/admin/path_history.rb +39 -0
- data/app/helpers/admin/search_helper.rb +59 -0
- data/app/helpers/admin_helper.rb +29 -0
- data/app/helpers/common_helper.rb +16 -0
- data/app/helpers/lookup_helper.rb +45 -0
- data/app/helpers/nested_fields_helper.rb +12 -0
- data/app/helpers/static_text_formatter.rb +25 -0
- data/app/helpers/twitter_builder_helper.rb +253 -0
- data/app/helpers/twitter_form_builder.rb +196 -0
- data/app/models/file_upload.rb +19 -0
- data/app/models/lookup.rb +6 -0
- data/app/uploaders/file_uploader.rb +10 -0
- data/app/uploaders/generic_image_uploader.rb +74 -0
- data/app/utils/admin_structure.rb +67 -0
- data/app/utils/bootstrap_link_renderer.rb +40 -0
- data/app/utils/table_helpers.rb +196 -0
- data/app/views/admin/base/_sort.haml +34 -0
- data/app/views/admin/common/_file_upload_template.haml +14 -0
- data/app/views/admin/common/_header.html.haml +27 -0
- data/app/views/admin/common/_image_upload_template.html.haml +40 -0
- data/app/views/admin/common/_menu.html.haml +2 -0
- data/app/views/admin/common/_menu_section.haml +10 -0
- data/app/views/admin/common/_menu_separator.haml +1 -0
- data/app/views/admin/common/_nested_fields_for.html.haml +5 -0
- data/app/views/admin/common/_nested_fields_for_element.html.haml +5 -0
- data/app/views/admin/common/_slide.haml +41 -0
- data/app/views/admin/common/_slides.html.haml +17 -0
- data/app/views/admin/common/_table_template.html.haml +14 -0
- data/app/views/admin/common/_upload_form.html.haml +5 -0
- data/app/views/admin/common/image_uploaded.js.haml +7 -0
- data/app/views/admin/common/upload_failed.js.erb +11 -0
- data/app/views/admin/common/upload_image.js.erb +6 -0
- data/app/views/admin/home/dashboard.html.haml +5 -0
- data/app/views/admin/lookups/_form.html.haml +16 -0
- data/app/views/admin/lookups/edit.html.haml +5 -0
- data/app/views/admin/lookups/index.html.haml +6 -0
- data/app/views/layouts/admin.html.haml +38 -0
- data/app/views/structure/_section.haml +16 -0
- data/coalla-cms.gemspec +39 -0
- data/config/locales/devise.ru.yml +59 -0
- data/config/locales/will_paginate.ru.yml +6 -0
- data/lib/coalla/cms/engine.rb +16 -0
- data/lib/coalla/cms/version.rb +5 -0
- data/lib/coalla/ext/mapper.rb +14 -0
- data/lib/coalla/orm/page_slider.rb +53 -0
- data/lib/coalla/orm/relation.rb +32 -0
- data/lib/coalla/orm/sanitized.rb +16 -0
- data/lib/coalla/sanitize/config/default.rb +526 -0
- data/lib/coalla-cms.rb +16 -0
- data/lib/generators/coalla/cms/create_admin_generator.rb +50 -0
- data/lib/generators/coalla/cms/create_admin_login_view_generator.rb +23 -0
- data/lib/generators/coalla/cms/file_uploads/install_generator.rb +35 -0
- data/lib/generators/coalla/cms/file_uploads/mount_generator.rb +34 -0
- data/lib/generators/coalla/cms/file_uploads/templates/add_column_migration.rb.erb +5 -0
- data/lib/generators/coalla/cms/file_uploads/templates/migration.rb +17 -0
- data/lib/generators/coalla/cms/image/install_generator.rb +39 -0
- data/lib/generators/coalla/cms/image/mount_generator.rb +50 -0
- data/lib/generators/coalla/cms/image/templates/migration.rb.erb +9 -0
- data/lib/generators/coalla/cms/image/templates/model.rb.erb +5 -0
- data/lib/generators/coalla/cms/image/templates/mount/migration.rb.erb +6 -0
- data/lib/generators/coalla/cms/image/templates/mount/uploader.rb.erb +3 -0
- data/lib/generators/coalla/cms/image/templates/uploader.rb.erb +3 -0
- data/lib/generators/coalla/cms/init_generator.rb +113 -0
- data/lib/generators/coalla/cms/lookups/install_generator.rb +43 -0
- data/lib/generators/coalla/cms/lookups/templates/migration.rb +13 -0
- data/lib/generators/coalla/cms/market/install_generator.rb +71 -0
- data/lib/generators/coalla/cms/market/templates/controllers/categories_controller.rb +47 -0
- data/lib/generators/coalla/cms/market/templates/controllers/products_controller.rb +50 -0
- data/lib/generators/coalla/cms/market/templates/controllers/properties_controller.rb +59 -0
- data/lib/generators/coalla/cms/market/templates/market.rb +5 -0
- data/lib/generators/coalla/cms/market/templates/market.ru.yml +53 -0
- data/lib/generators/coalla/cms/market/templates/migrations/create_categories.rb +15 -0
- data/lib/generators/coalla/cms/market/templates/migrations/create_product_properties.rb +18 -0
- data/lib/generators/coalla/cms/market/templates/migrations/create_products.rb +18 -0
- data/lib/generators/coalla/cms/market/templates/migrations/create_properties.rb +11 -0
- data/lib/generators/coalla/cms/market/templates/models/category.rb +36 -0
- data/lib/generators/coalla/cms/market/templates/models/product.rb +16 -0
- data/lib/generators/coalla/cms/market/templates/models/product_property.rb +14 -0
- data/lib/generators/coalla/cms/market/templates/models/property.rb +7 -0
- data/lib/generators/coalla/cms/market/templates/views/categories/_form.html.haml +10 -0
- data/lib/generators/coalla/cms/market/templates/views/categories/edit.html.haml +5 -0
- data/lib/generators/coalla/cms/market/templates/views/categories/index.html.haml +17 -0
- data/lib/generators/coalla/cms/market/templates/views/categories/new.html.haml +4 -0
- data/lib/generators/coalla/cms/market/templates/views/products/_form.html.haml +17 -0
- data/lib/generators/coalla/cms/market/templates/views/products/_product_property_fields.html.haml +13 -0
- data/lib/generators/coalla/cms/market/templates/views/products/edit.html.haml +5 -0
- data/lib/generators/coalla/cms/market/templates/views/products/index.html.haml +17 -0
- data/lib/generators/coalla/cms/market/templates/views/products/new.html.haml +4 -0
- data/lib/generators/coalla/cms/market/templates/views/properties/_form.html.haml +9 -0
- data/lib/generators/coalla/cms/market/templates/views/properties/edit.html.haml +5 -0
- data/lib/generators/coalla/cms/market/templates/views/properties/index.html.haml +15 -0
- data/lib/generators/coalla/cms/market/templates/views/properties/new.html.haml +4 -0
- data/lib/generators/coalla/cms/news/scaffold_generator.rb +50 -0
- data/lib/generators/coalla/cms/news/templates/entity.rb.erb +10 -0
- data/lib/generators/coalla/cms/news/templates/entity_controller_template.rb.erb +47 -0
- data/lib/generators/coalla/cms/news/templates/entity_image_uploader.rb.erb +7 -0
- data/lib/generators/coalla/cms/news/templates/migration.rb.erb +15 -0
- data/lib/generators/coalla/cms/news/templates/views/_form.haml.erb +16 -0
- data/lib/generators/coalla/cms/news/templates/views/edit.haml.erb +5 -0
- data/lib/generators/coalla/cms/news/templates/views/index.haml.erb +18 -0
- data/lib/generators/coalla/cms/news/templates/views/new.haml.erb +5 -0
- data/lib/generators/coalla/cms/orm_helpers.rb +31 -0
- data/lib/generators/coalla/cms/scaffold_generator.rb +53 -0
- data/lib/generators/coalla/cms/scaffold_helper.rb +11 -0
- data/lib/generators/coalla/cms/setup_admin_generator.rb +60 -0
- data/lib/generators/coalla/cms/setup_routes_generator.rb +28 -0
- data/lib/generators/coalla/cms/slider/init_generator.rb +41 -0
- data/lib/generators/coalla/cms/slider/templates/migration.rb.erb +25 -0
- data/lib/generators/coalla/cms/slider/templates/slider_image.rb.erb +10 -0
- data/lib/generators/coalla/cms/slider/templates/slider_image_uploader.rb.erb +7 -0
- data/lib/generators/coalla/cms/slider/templates/slider_upload_controller.rb.erb +19 -0
- data/lib/generators/coalla/cms/templates/.gitattributes +4 -0
- data/lib/generators/coalla/cms/templates/.gitignore +86 -0
- data/lib/generators/coalla/cms/templates/activerecord.ru.yml +13 -0
- data/lib/generators/coalla/cms/templates/assets.rb +13 -0
- data/lib/generators/coalla/cms/templates/controllers/admin/base_controller.rb.erb +35 -0
- data/lib/generators/coalla/cms/templates/controllers/admin/home_controller.rb.erb +6 -0
- data/lib/generators/coalla/cms/templates/controllers/admin/scaffold_controller_template.rb.erb +45 -0
- data/lib/generators/coalla/cms/templates/controllers/home_controller.rb.erb +6 -0
- data/lib/generators/coalla/cms/templates/database.yml.erb +35 -0
- data/lib/generators/coalla/cms/templates/devise.ru.yml +59 -0
- data/lib/generators/coalla/cms/templates/initializers/carrierwave.rb +51 -0
- data/lib/generators/coalla/cms/templates/migration.rb +11 -0
- data/lib/generators/coalla/cms/templates/migration_existing.rb +15 -0
- data/lib/generators/coalla/cms/templates/schedule.rb +3 -0
- data/lib/generators/coalla/cms/templates/structure.rb +0 -0
- data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/_form.html.haml.erb +14 -0
- data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/edit.html.haml.erb +5 -0
- data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/index.html.haml.erb +15 -0
- data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/new.html.haml.erb +4 -0
- data/lib/generators/coalla/cms/templates/views/administrators/sessions/new.html.haml +19 -0
- data/lib/generators/coalla/cms/templates/views/home/index.html.haml.erb +1 -0
- data/lib/generators/coalla/cms/wysiwyg/ckeditor_generator.rb +17 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/mediaembed/plugin.js +64 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/LICENSE.txt +303 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad-gallery-css-diff.htm +831 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_next.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_prev.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_back.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_forward.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.css +185 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.js +984 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min - ref.js +10 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min.js +1 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/loader.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/opa75.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/placeholder.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/trans.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/blank.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading@2x.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_overlay.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite@2x.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/fancybox_buttons.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.css +97 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.js +122 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-media.js +199 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.css +55 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.js +162 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.css +274 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.js +2020 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.pack.js +46 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/README.md +66 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/dialogs/slideshow.js +1396 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/dialogs/slideshow.min.js +1 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/icons/placeholder.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/icons/slideshow.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/Serbian_translation.txt +9 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/el.js +37 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/en.js +35 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/fr.js +35 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/ru.js +35 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/sr-latn.js +35 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/sr.js +35 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/plugin.js +217 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-blockquote.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h1.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h2.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h3.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h4.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h5.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h6.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-p.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-pre.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/wymiframe.css +276 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/wymiframe.html +26 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/jquery.wymeditor.js +4819 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/lang/en.js +45 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/lang/ru.js +55 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/imageupload/icons.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/imageupload/jquery.wymeditor.imageupload.js +150 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/resizable/readme.txt +124 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/icons.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/skin.css +134 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/skin.js +35 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/icons.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/skin.css +341 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/skin.js +40 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.header.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/skin.css +131 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/skin.js +30 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/COPYING +674 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/README +27 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.header.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/icons.silver.gif +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.css +297 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.js +61 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/icons.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/skin.css +134 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/skin.js +39 -0
- data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/wymeditor_icon.png +0 -0
- data/lib/generators/coalla/cms/wysiwyg/wymeditor_generator.rb +17 -0
- metadata +581 -0
Binary file
|
Binary file
|
@@ -0,0 +1,295 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require admin/jquery-migrate.min
|
15
|
+
//= require jquery.ui.all
|
16
|
+
//= require jquery.ui.datepicker-ru
|
17
|
+
//= require jquery-ui-timepicker-addon
|
18
|
+
//= require admin/vendor/jquery-ui-timepicker-addon-ru
|
19
|
+
//= require jquery_ujs
|
20
|
+
//= require admin/vendor/bootstrap.min
|
21
|
+
//= require jquery.remotipart
|
22
|
+
//= require admin/vendor/jquery.tokeninput.patched
|
23
|
+
//= require admin/vendor/jquery.tagsinput
|
24
|
+
//= require admin/vendor/underscore-min
|
25
|
+
//= require js-routes
|
26
|
+
//= require ckeditor/init
|
27
|
+
//= require admin/photo_uploader
|
28
|
+
//= require_self
|
29
|
+
//= require admin/custom_admin
|
30
|
+
|
31
|
+
function setupWymEditor(wrappedSet) {
|
32
|
+
var upload = wrappedSet.data('upload');
|
33
|
+
var table = wrappedSet.data('table');
|
34
|
+
var hStyles = wrappedSet.data('h');
|
35
|
+
var hideBlockquote = (wrappedSet.data('hide-blockquote') === true);
|
36
|
+
var html = wrappedSet.data('html');
|
37
|
+
var preview = wrappedSet.data('preview');
|
38
|
+
|
39
|
+
var toolsItems = [
|
40
|
+
{'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'},
|
41
|
+
{'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'},
|
42
|
+
{'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'},
|
43
|
+
{'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'},
|
44
|
+
{'name': 'CreateLink', 'title': 'Link', 'css': 'wym_tools_link'},
|
45
|
+
{'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'},
|
46
|
+
{'name': 'Undo', 'title': 'Undo', 'css': 'wym_tools_undo'},
|
47
|
+
{'name': 'Redo', 'title': 'Redo', 'css': 'wym_tools_redo'}
|
48
|
+
];
|
49
|
+
|
50
|
+
if (table) {
|
51
|
+
toolsItems.push({'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'});
|
52
|
+
}
|
53
|
+
|
54
|
+
if (html) {
|
55
|
+
toolsItems.push({'name': 'ToggleHtml', 'title': 'HTML', 'css': 'wym_tools_html'});
|
56
|
+
}
|
57
|
+
|
58
|
+
if (preview) {
|
59
|
+
toolsItems.push({'name': 'Preview', 'title': 'Preview', 'css': 'wym_tools_preview'});
|
60
|
+
}
|
61
|
+
|
62
|
+
var wym_options = {
|
63
|
+
lang: 'ru', rmUnwantedBr: true,
|
64
|
+
jQueryPath: '/assets/jquery.js',
|
65
|
+
toolsItems: toolsItems,
|
66
|
+
logoHtml: "", classesHtml: "", statusHtml: "", containersHtml: "",
|
67
|
+
postInit: function (wym) {
|
68
|
+
if (!hideBlockquote) {
|
69
|
+
var bqClass = 'wym_tools_blockquote';
|
70
|
+
var bqHtml = buttonHtml("Цитата ", bqClass, '/wysiwyg/skins/default/icons.png');
|
71
|
+
$(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(bqHtml);
|
72
|
+
$(wym._box).find('li.' + bqClass + ' a').click(function () {
|
73
|
+
wym.container('BLOCKQUOTE');
|
74
|
+
return(false);
|
75
|
+
});
|
76
|
+
}
|
77
|
+
|
78
|
+
// CURRENTLY DOESNT WORK
|
79
|
+
// if (table) {
|
80
|
+
// var bqClass = 'wym_tools_th';
|
81
|
+
// var bqHtml = buttonHtml("Заголовок таблицы ", bqClass, '/wysiwyg/skins/default/icons.png');
|
82
|
+
// $(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(bqHtml);
|
83
|
+
// $(wym._box).find('li.' + bqClass + ' a').click(function () {
|
84
|
+
// wym.container('TH');
|
85
|
+
// return(false);
|
86
|
+
// });
|
87
|
+
// }
|
88
|
+
|
89
|
+
if (!hStyles) {
|
90
|
+
hStyles = [1, 2, 3, 4, 5, 6];
|
91
|
+
}
|
92
|
+
for (var j = hStyles.length - 1; j >= 0; j--) {
|
93
|
+
(function (c) {
|
94
|
+
var cls = 'wym_tools_heading' + c;
|
95
|
+
var html = buttonHtml("Заголовок " + c, cls, '/wysiwyg/skins/default/icons.png');
|
96
|
+
$(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(html);
|
97
|
+
$(wym._box).find('li.' + cls + ' a').click(function () {
|
98
|
+
wym.container('H' + c);
|
99
|
+
return(false);
|
100
|
+
});
|
101
|
+
})(hStyles[j]);
|
102
|
+
}
|
103
|
+
|
104
|
+
var cls = 'wym_tools_paragraph';
|
105
|
+
var html = buttonHtml("Абзац", cls, '/wysiwyg/skins/default/icons.png');
|
106
|
+
$(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(html);
|
107
|
+
$(wym._box).find('li.' + cls + ' a').click(function () {
|
108
|
+
wym.container('P');
|
109
|
+
return(false);
|
110
|
+
});
|
111
|
+
|
112
|
+
if (upload) {
|
113
|
+
wym.imageupload_init('/article_images', 'image')
|
114
|
+
}
|
115
|
+
$('.wym_buttons').addClass('btn-toolbar').find('li').addClass('btn-group').find('a').addClass('btn');
|
116
|
+
}
|
117
|
+
|
118
|
+
};
|
119
|
+
wrappedSet.wymeditor(wym_options);
|
120
|
+
|
121
|
+
function buttonHtml(title, cls, path_to_icon) {
|
122
|
+
var html = "<li class='" + cls + "'>"
|
123
|
+
+ "<a href='#' title='" + title + "' "
|
124
|
+
+ " style='background-image:"
|
125
|
+
+ " url(" + path_to_icon + ")'>"
|
126
|
+
+ title
|
127
|
+
+ "</a></li>";
|
128
|
+
|
129
|
+
|
130
|
+
return html;
|
131
|
+
}
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
function injectNewSliderId(s, id) {
|
136
|
+
return s.replace(/NEW_RECORD/g, id);
|
137
|
+
}
|
138
|
+
|
139
|
+
(function ($) {
|
140
|
+
$.fn.stickyBar = function () {
|
141
|
+
if (this.length){
|
142
|
+
var $bar = this,
|
143
|
+
barOffsetTop = $bar.offset().top,
|
144
|
+
barOuterHeight = $bar.outerHeight(),
|
145
|
+
windowScrollTop = $(window).scrollTop(),
|
146
|
+
windowHeight = $(window).height();
|
147
|
+
|
148
|
+
if (barOffsetTop + barOuterHeight > windowScrollTop + windowHeight) {
|
149
|
+
$bar.addClass('__sticky');
|
150
|
+
}
|
151
|
+
|
152
|
+
$(window).scroll(function () {
|
153
|
+
windowScrollTop = $(window).scrollTop();
|
154
|
+
windowHeight = $(window).height();
|
155
|
+
|
156
|
+
if (barOffsetTop + barOuterHeight > windowScrollTop + windowHeight) {
|
157
|
+
$bar.addClass('__sticky');
|
158
|
+
} else {
|
159
|
+
$bar.removeClass('__sticky');
|
160
|
+
}
|
161
|
+
});
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
})(jQuery);
|
166
|
+
|
167
|
+
$(function () {
|
168
|
+
$(document).on('click', '.pictograms__button_remove', function () {
|
169
|
+
var
|
170
|
+
$this = $(this),
|
171
|
+
container = '.' + $this.data('container');
|
172
|
+
var input = $this.prev(':hidden');
|
173
|
+
if (input.size() > 0) {
|
174
|
+
$(input[0]).attr("value", "1");
|
175
|
+
$this.closest(container).hide();
|
176
|
+
} else {
|
177
|
+
$(this).closest(container).remove();
|
178
|
+
}
|
179
|
+
return false;
|
180
|
+
});
|
181
|
+
|
182
|
+
$(document).on('click', '[data-image-remove-btn]', function () {
|
183
|
+
var container = $(this).closest('.upload-img-container');
|
184
|
+
container.find('[data-image-preview]').hide();
|
185
|
+
container.find('[data-image-placeholder]').show();
|
186
|
+
container.find('[data-image-remove-flag]').val(1);
|
187
|
+
return false;
|
188
|
+
});
|
189
|
+
|
190
|
+
$('.sortable').sortable();
|
191
|
+
|
192
|
+
$('.wymeditor').each(function () {
|
193
|
+
setupWymEditor($(this));
|
194
|
+
});
|
195
|
+
|
196
|
+
function merge_datepicker_options($element) {
|
197
|
+
var options = {
|
198
|
+
dateFormat: 'yy-mm-dd',
|
199
|
+
changeMonth: true,
|
200
|
+
changeYear: true
|
201
|
+
};
|
202
|
+
var customOptions = $element.data('calendar-options');
|
203
|
+
if (customOptions) {
|
204
|
+
options = $.extend(options, customOptions);
|
205
|
+
}
|
206
|
+
return options;
|
207
|
+
}
|
208
|
+
|
209
|
+
function addDatePickers() {
|
210
|
+
$('input[data-calendar-date]').each(function () {
|
211
|
+
$this = $(this);
|
212
|
+
$this.datepicker(merge_datepicker_options($this));
|
213
|
+
});
|
214
|
+
}
|
215
|
+
|
216
|
+
addDatePickers();
|
217
|
+
|
218
|
+
function addDateTimePickers() {
|
219
|
+
$('input[data-calendar-datetime]').each(function () {
|
220
|
+
$this = $(this);
|
221
|
+
$this.datetimepicker(merge_datepicker_options($this));
|
222
|
+
});
|
223
|
+
}
|
224
|
+
|
225
|
+
addDateTimePickers();
|
226
|
+
|
227
|
+
$(document).on('click', '.close-popover-form', function () {
|
228
|
+
$('.pictograms__button_edit').popover('hide');
|
229
|
+
$('.popover').css('display', 'none');
|
230
|
+
});
|
231
|
+
|
232
|
+
$(document).on('click', '.submit-popover-form', function () {
|
233
|
+
var
|
234
|
+
$title = $(this).closest('.slide-form-group').find('input[type="text"]');
|
235
|
+
$('#' + $title.attr('id')).val($title.val());
|
236
|
+
$('.pictograms__button_edit').popover('hide');
|
237
|
+
$('.popover').css('display', 'none');
|
238
|
+
});
|
239
|
+
|
240
|
+
var $form = $('form');
|
241
|
+
$form.on('click', '.remove_field', function () {
|
242
|
+
$(this).prev('input[type=hidden]').val('1');
|
243
|
+
$(this).closest('.fields_container').hide();
|
244
|
+
return false;
|
245
|
+
});
|
246
|
+
|
247
|
+
$form.on('click', '.add_fields', function () {
|
248
|
+
var time = new Date().getTime();
|
249
|
+
var regexp = new RegExp($(this).data('id'), 'g');
|
250
|
+
$(this).before($(this).data('fields').replace(regexp, time));
|
251
|
+
window.NestedFormCallbacks = window.NestedFormCallbacks || [];
|
252
|
+
_.each(window.NestedFormCallbacks, function (callback) {
|
253
|
+
callback();
|
254
|
+
});
|
255
|
+
addDatePickers();
|
256
|
+
addDateTimePickers();
|
257
|
+
return false
|
258
|
+
});
|
259
|
+
|
260
|
+
$('[data-multi-field]').each(function () {
|
261
|
+
var options = { crossDomain: false,
|
262
|
+
preventDuplicates: true,
|
263
|
+
hintText: 'Введите строку для поиска',
|
264
|
+
noResultsText: 'Ничего не найдено',
|
265
|
+
searchingText: 'Поиск...',
|
266
|
+
theme: 'facebook',
|
267
|
+
showAllOnFocus: $(this).data('show-all-on-focus'),
|
268
|
+
useCache: $(this).data('use-cache')
|
269
|
+
};
|
270
|
+
|
271
|
+
var objectUrlName = $(this).data('object-url-name');
|
272
|
+
if (objectUrlName) {
|
273
|
+
var formatter_options = {tokenFormatter: function (item) {
|
274
|
+
return "<li><p><a href='" + "/admin/" + objectUrlName + "/" + item['id'] + "/edit'>" + item[this.propertyToSearch] + "</a></p></li>"
|
275
|
+
}
|
276
|
+
};
|
277
|
+
options = $.extend(options, formatter_options);
|
278
|
+
}
|
279
|
+
|
280
|
+
$(this).tokenInput($(this).data('source'), options);
|
281
|
+
});
|
282
|
+
|
283
|
+
$('.action-bar').stickyBar();
|
284
|
+
|
285
|
+
$(document).on('change', '[data-file-upload]', function () {
|
286
|
+
var filename = $(this).val().replace(/.*(\/|\\)/, '');
|
287
|
+
$(this).closest('[data-file-upload-container]').find('[data-file-upload-title]').text(filename);
|
288
|
+
});
|
289
|
+
|
290
|
+
});
|
291
|
+
|
292
|
+
CKEDITOR.config.extraPlugins = 'slideshow,mediaembed,autogrow';
|
293
|
+
CKEDITOR.config.removeButtons = 'About,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,BidiLtr,BidiRtl,Language,Scayt,Smiley,SpellChecker,Templates,Indent,CreateDiv,HorizontalRule,Flash,NewPage,PageBreak,Iframe,Styles,FontSize,Font,TextColor,BGColor,JustifyLeft,JustifyCenter,JustifyRight,JustifyBlock';
|
294
|
+
CKEDITOR.config.removePlugins = 'scayt,smiley';
|
295
|
+
CKEDITOR.config.language = 'ru';
|
File without changes
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
|
2
|
+
jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
|
@@ -0,0 +1,67 @@
|
|
1
|
+
function PhotoUploader(formTemplate) {
|
2
|
+
var selector = ('input[data-file="true"]');
|
3
|
+
|
4
|
+
this.addUploadListener = function () {
|
5
|
+
var fileInputSelector = $(selector);
|
6
|
+
fileInputSelector.each(function () {
|
7
|
+
var $fileInput = $(this);
|
8
|
+
var form = $(formTemplate.replace('###URL###', $fileInput.data("path"))
|
9
|
+
.replace('###CONTAINER###', $fileInput.data('container'))
|
10
|
+
.replace('###FREE_SIZE###', $fileInput.data('free_size'))
|
11
|
+
.replace('###VERSION###', $fileInput.data('version')));
|
12
|
+
$('body').append(form);
|
13
|
+
|
14
|
+
(function addChangeListener(fileInput) {
|
15
|
+
fileInput.change(function () {
|
16
|
+
var $c = $('#' + fileInput.data('container'));
|
17
|
+
$c.find("[data-image-loader]").addClass('visible');
|
18
|
+
$c.find('[data-image-preview]').hide();
|
19
|
+
$c.find('[data-image-placeholder]').hide();
|
20
|
+
$c.find('[data-image-remove-flag]').val(0);
|
21
|
+
|
22
|
+
// DO NOT REFACTOR!!! A bit of black magic
|
23
|
+
var clonedCopy = $(this).clone().appendTo($(this).parent());
|
24
|
+
clonedCopy.val('');
|
25
|
+
addChangeListener(clonedCopy);
|
26
|
+
form.find('input[type="file"]').remove();
|
27
|
+
$(this).detach().appendTo(form);
|
28
|
+
form.submit();
|
29
|
+
});
|
30
|
+
})($(this));
|
31
|
+
});
|
32
|
+
|
33
|
+
$('.upload-img-container').find('[data-image-tag]').load(function () {
|
34
|
+
var
|
35
|
+
$this = $(this),
|
36
|
+
$cnt = $this.closest('.img-polaroid'),
|
37
|
+
updateSizes = $this.closest('.upload-img-container').hasClass('manage-size'),
|
38
|
+
w = $this[0].width,
|
39
|
+
h = $this[0].height;
|
40
|
+
|
41
|
+
if (updateSizes) {
|
42
|
+
$this.css({width: w + "px", height: h + "px"});
|
43
|
+
$cnt.css({width: w + "px", height: h + "px"});
|
44
|
+
$cnt.find("[data-image-placeholder]").css({width: w + "px", height: h + "px", 'line-height': h + 'px'});
|
45
|
+
}
|
46
|
+
|
47
|
+
if (!$cnt.hasClass('init-placeholder')) {
|
48
|
+
$cnt.find('[data-image-loader]').removeClass('visible');
|
49
|
+
$cnt.find('[data-image-preview]').show();
|
50
|
+
} else {
|
51
|
+
if (updateSizes) {
|
52
|
+
$this.removeAttr('width').removeAttr('height');
|
53
|
+
}
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
};
|
58
|
+
}
|
59
|
+
|
60
|
+
$(function () {
|
61
|
+
var addUploadListener = function () {
|
62
|
+
PhotoUploader.addUploadListener();
|
63
|
+
};
|
64
|
+
addUploadListener();
|
65
|
+
window.NestedFormCallbacks = window.NestedFormCallbacks || [];
|
66
|
+
window.NestedFormCallbacks.push(addUploadListener);
|
67
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap v3.0.3 (http://getbootstrap.com)
|
3
|
+
* Copyright 2013 Twitter, Inc.
|
4
|
+
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
|
7
|
+
if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<h.length-1&&i++,~i||(i=0),h.eq(i).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show(),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;if("top"==b&&j!=f&&(c=!0,a.top=a.top+f-j),/bottom|top/.test(b)){var k=0;a.left<0&&(k=-2*a.left,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach()}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.$element.trigger("hidden.bs."+this.type),this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
|
@@ -0,0 +1,40 @@
|
|
1
|
+
$(function() {
|
2
|
+
$.datepicker.regional['ru'] = {
|
3
|
+
closeText: 'Закрыть',
|
4
|
+
prevText: '<Пред',
|
5
|
+
nextText: 'След>',
|
6
|
+
currentText: 'Сегодня',
|
7
|
+
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
|
8
|
+
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
|
9
|
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
10
|
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
11
|
+
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
|
12
|
+
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
|
13
|
+
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
|
14
|
+
weekHeader: 'Не',
|
15
|
+
dateFormat: 'dd.mm.yy',
|
16
|
+
firstDay: 1,
|
17
|
+
isRTL: false,
|
18
|
+
showMonthAfterYear: false,
|
19
|
+
yearSuffix: ''
|
20
|
+
};
|
21
|
+
$.datepicker.setDefaults($.datepicker.regional['ru']);
|
22
|
+
|
23
|
+
|
24
|
+
$.timepicker.regional['ru'] = {
|
25
|
+
timeOnlyTitle: 'Выберите время',
|
26
|
+
timeText: 'Время',
|
27
|
+
hourText: 'Часы',
|
28
|
+
minuteText: 'Минуты',
|
29
|
+
secondText: 'Секунды',
|
30
|
+
millisecText: 'Миллисекунды',
|
31
|
+
timezoneText: 'Часовой пояс',
|
32
|
+
currentText: 'Сейчас',
|
33
|
+
closeText: 'Закрыть',
|
34
|
+
timeFormat: 'HH:mm',
|
35
|
+
amNames: ['AM', 'A'],
|
36
|
+
pmNames: ['PM', 'P'],
|
37
|
+
isRTL: false
|
38
|
+
};
|
39
|
+
$.timepicker.setDefaults($.timepicker.regional['ru']);
|
40
|
+
});
|