camaleon_cms 1.1.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of camaleon_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +27 -60
- data/app/apps/plugins/attack/admin_controller.rb +1 -1
- data/app/apps/plugins/attack/attack_helper.rb +4 -4
- data/app/apps/plugins/attack/config/config.json +1 -1
- data/app/apps/plugins/attack/config/custom_models.rb +1 -1
- data/app/apps/plugins/attack/views/admin/settings.html.erb +2 -2
- data/app/apps/plugins/contact_form/admin_forms_controller.rb +8 -7
- data/app/apps/plugins/contact_form/config/custom_models.rb +1 -1
- data/app/apps/plugins/contact_form/contact_form_helper.rb +4 -5
- data/app/apps/plugins/contact_form/contact_form_html_helper.rb +2 -2
- data/app/apps/plugins/contact_form/front_controller.rb +1 -1
- data/app/apps/plugins/contact_form/views/admin_forms/_form.html.erb +5 -5
- data/app/apps/plugins/contact_form/views/admin_forms/edit.html.erb +19 -35
- data/app/apps/plugins/contact_form/views/admin_forms/index.html.erb +3 -3
- data/app/apps/plugins/contact_form/views/admin_forms/responses.html.erb +6 -13
- data/app/apps/plugins/contact_form/views/forms_shorcode.html.erb +1 -1
- data/app/apps/plugins/contact_form/views/front/index.html.erb +1 -1
- data/app/apps/plugins/front_cache/admin_controller.rb +1 -1
- data/app/apps/plugins/front_cache/config/initializer.rb +1 -1
- data/app/apps/plugins/front_cache/front_cache_helper.rb +37 -42
- data/app/apps/plugins/front_cache/views/admin/settings.html.erb +3 -3
- data/app/apps/plugins/visibility_post/config/config.json +1 -1
- data/app/apps/plugins/visibility_post/visibility_post_helper.rb +21 -23
- data/app/apps/themes/camaleon_first/assets/css/main.css +1 -1
- data/app/apps/themes/camaleon_first/assets/js/main.js +1 -1
- data/app/apps/themes/camaleon_first/views/admin/settings.html.erb +1 -1
- data/app/apps/themes/default/views/admin/settings.html.erb +1 -1
- data/app/apps/themes/default/views/category.html.erb +1 -1
- data/app/apps/themes/default/views/layouts/index.html.erb +7 -7
- data/app/apps/themes/default/views/partials/_comments.html.erb +1 -1
- data/app/apps/themes/default/views/partials/_forms.html.erb +2 -2
- data/app/apps/themes/default/views/partials/_search_form.html.erb +4 -4
- data/app/apps/themes/default/views/post_tag.html.erb +1 -1
- data/app/apps/themes/default/views/post_type.html.erb +1 -1
- data/app/apps/themes/default/views/search.html.erb +1 -1
- data/app/apps/themes/new/assets/js/main.js +0 -1
- data/app/apps/themes/new/views/admin/settings.html.erb +1 -1
- data/app/apps/themes/new/views/category.html.erb +1 -1
- data/app/apps/themes/new/views/layouts/_footer.html.erb +0 -1
- data/app/apps/themes/new/views/layouts/_header.html.erb +7 -7
- data/app/apps/themes/new/views/layouts/index.html.erb +0 -1
- data/app/apps/themes/new/views/partials/_comments.html.erb +1 -1
- data/app/apps/themes/new/views/partials/_forms.html.erb +2 -2
- data/app/apps/themes/new/views/partials/_search_form.html.erb +2 -3
- data/app/apps/themes/new/views/post_tag.html.erb +1 -1
- data/app/apps/themes/new/views/post_type.html.erb +1 -1
- data/app/apps/themes/new/views/search.html.erb +1 -1
- data/app/assets/fonts/{glyphicons-halflings-regular.eot → camaleon_cms/glyphicons-halflings-regular.eot} +0 -0
- data/app/assets/fonts/{glyphicons-halflings-regular.svg → camaleon_cms/glyphicons-halflings-regular.svg} +0 -0
- data/app/assets/fonts/{glyphicons-halflings-regular.ttf → camaleon_cms/glyphicons-halflings-regular.ttf} +0 -0
- data/app/assets/fonts/{glyphicons-halflings-regular.woff → camaleon_cms/glyphicons-halflings-regular.woff} +0 -0
- data/app/assets/images/camaleon_cms/admin/admin_spinner.gif +0 -0
- data/app/assets/images/{admin → camaleon_cms/admin}/glyphicons-halflings.png +0 -0
- data/app/assets/images/{admin → camaleon_cms/admin}/intro/menus.png +0 -0
- data/app/assets/images/{admin → camaleon_cms/admin}/no_image.jpg +0 -0
- data/app/assets/images/{bg-tree.jpeg → camaleon_cms/bg-tree.jpeg} +0 -0
- data/app/assets/images/{camaleon-dark.png → camaleon_cms/camaleon-dark.png} +0 -0
- data/app/assets/images/camaleon_cms/camaleon.png +0 -0
- data/app/assets/images/{category-icon.png → camaleon_cms/category-icon.png} +0 -0
- data/app/assets/images/camaleon_cms/favicon.ico +0 -0
- data/app/assets/images/{image-not-found.png → camaleon_cms/image-not-found.png} +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/de.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/en.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/es.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/fr.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/it.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/pt.png +0 -0
- data/app/assets/images/camaleon_cms/language/pt_br.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/zh.png +0 -0
- data/app/assets/images/{loader.gif → camaleon_cms/loader.gif} +0 -0
- data/app/assets/images/{users → camaleon_cms/users}/no-image.jpg +0 -0
- data/app/assets/javascripts/{admin/actions.js → camaleon_cms/admin/_actions.js} +3 -5
- data/app/assets/javascripts/camaleon_cms/admin/_custom_fields.js +178 -0
- data/app/assets/javascripts/{admin/data.js → camaleon_cms/admin/_data.js} +4 -9
- data/app/assets/javascripts/{admin/i18n.js → camaleon_cms/admin/_i18n.js} +10 -4
- data/app/assets/javascripts/{admin/jquery-ui.min.js → camaleon_cms/admin/_jquery-ui.min.js} +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/_jquery.slugify.js +67 -0
- data/app/assets/javascripts/{admin/jquery.tagsinput.min.js → camaleon_cms/admin/_jquery.tagsinput.min.js} +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/_libraries.js +339 -0
- data/app/assets/javascripts/{admin/modal.js → camaleon_cms/admin/_modal.js} +42 -25
- data/app/assets/javascripts/camaleon_cms/admin/_post.js +303 -0
- data/app/assets/javascripts/{admin/translator.js → camaleon_cms/admin/_translator.js} +4 -3
- data/app/assets/javascripts/{admin/underscore.js → camaleon_cms/admin/_underscore.js} +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/admin-basic-manifest.js +3 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/admin-manifest.js +23 -18
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-colorpicker.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-datepicker.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-datetimepicker.min.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-select.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/custom_fields_form.js +69 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form-builder/formbuilder.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form-builder/vendor.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form/cropper.min.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form/jquery.form.js +0 -0
- data/app/assets/javascripts/{admin/introjs/intro.min.js → camaleon_cms/admin/introjs/_intro.min.js} +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/jquery-sieve.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/jquery.nestable.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/jquery.validate.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin/jquery_validate}/es.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin/jquery_validate}/it.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/pt_br.js +74 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/login.js.coffee +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/login_manifest.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/lte/app.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/nav-menu.js +5 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/plugins.js +0 -0
- data/app/assets/javascripts/{admin/tageditor/jquery.caret.min.js → camaleon_cms/admin/tageditor/_jquery.caret.min.js} +0 -0
- data/app/assets/javascripts/{admin/tageditor/jquery.tag-editor.js → camaleon_cms/admin/tageditor/_jquery.tag-editor.js} +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/en.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/es.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/it.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/pt_br.js +219 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/readme.md +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/filemanager/plugin.min.js +3 -4
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/visualblocks/css/visualblocks.css +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/content.min.css.scss +2 -2
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.svg +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/object.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/themes/modern/theme.min.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/tinymce.min.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/uploader/_jquery.uploadfile.min.js +8 -0
- data/app/assets/javascripts/camaleon_cms/admin/uploader/_media_manager.js.coffee +161 -0
- data/app/assets/javascripts/camaleon_cms/admin/uploader/uploader_manifest.js +2 -0
- data/app/assets/javascripts/camaleon_cms/admin/user_profile.js +70 -0
- data/app/assets/javascripts/{bootstrap.min.js → camaleon_cms/bootstrap.min.js} +0 -0
- data/app/assets/javascripts/{gibberish-aes.js → camaleon_cms/gibberish-aes.js} +0 -0
- data/app/assets/stylesheets/camaleon_cms/admin/_custom_admin.css.scss +267 -0
- data/app/assets/stylesheets/{admin/jquery.tagsinput.css → camaleon_cms/admin/_jquery.tagsinput.css} +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/admin-basic-manifest.css +3 -3
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/admin-manifest.css +16 -8
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/bootstrap-datepicker.css.scss +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/bootstrap-datetimepicker.css.scss +1 -1
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/colorpicker.css.scss +4 -4
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/cropper/cropper.min.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/form-builder/formbuilder.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/bg.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/colorpicker/alpha.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/colorpicker/hue.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/colorpicker/saturation.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/girls-1.jpg +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/jquery/resize-icon.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/loading.gif +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/logo-small.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/logo.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/no_image.jpg +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/rormeleon-white.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/thumb_no_found.jpg +0 -0
- data/app/assets/stylesheets/{admin/introjs/introjs.min.css → camaleon_cms/admin/introjs/_introjs.min.css} +0 -0
- data/app/assets/stylesheets/{admin/jquery/jquery-ui.scss → camaleon_cms/admin/jquery/_jquery-ui.scss} +16 -16
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_888888_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/stylesheets/{admin/lte/admin.css.scss → camaleon_cms/admin/lte/_admin.css.scss} +4 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-black-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-black.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-blue-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-blue.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-green-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-green.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-purple-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-purple.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-red-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-red.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-yellow-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-yellow.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/nav-menu.css.scss +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/nestable/jquery.nestable.css +0 -0
- data/app/assets/stylesheets/{admin/tageditor/jquery.tag-editor.css.scss → camaleon_cms/admin/tageditor/_jquery.tag-editor.css.scss} +0 -0
- data/app/assets/stylesheets/camaleon_cms/admin/uploader/_uploadfile.css.scss +253 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/widgets.css.scss +0 -0
- data/app/assets/stylesheets/camaleon_cms/bootstrap.min.css.scss +5 -0
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/nav_menus_controller.rb +14 -11
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/themes_controller.rb +4 -2
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/widgets/assign_controller.rb +5 -5
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/widgets/main_controller.rb +8 -6
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/widgets/sidebar_controller.rb +9 -9
- data/app/controllers/{admin → camaleon_cms/admin}/categories_controller.rb +18 -10
- data/app/controllers/camaleon_cms/admin/comments_controller.rb +97 -0
- data/app/controllers/{admin → camaleon_cms/admin}/installers_controller.rb +10 -10
- data/app/controllers/camaleon_cms/admin/media_controller.rb +84 -0
- data/app/controllers/{admin → camaleon_cms/admin}/plugins_controller.rb +7 -6
- data/app/controllers/{admin → camaleon_cms/admin}/post_tags_controller.rb +18 -10
- data/app/controllers/{admin → camaleon_cms/admin}/posts/drafts_controller.rb +5 -5
- data/app/controllers/{admin → camaleon_cms/admin}/posts_controller.rb +40 -23
- data/app/controllers/{admin → camaleon_cms/admin}/sessions_controller.rb +45 -35
- data/app/controllers/{admin → camaleon_cms/admin}/settings/custom_fields_controller.rb +13 -12
- data/app/controllers/{admin → camaleon_cms/admin}/settings/post_types_controller.rb +14 -13
- data/app/controllers/{admin → camaleon_cms/admin}/settings/sites_controller.rb +17 -15
- data/app/controllers/{admin → camaleon_cms/admin}/settings_controller.rb +8 -5
- data/app/controllers/{admin → camaleon_cms/admin}/user_roles_controller.rb +12 -11
- data/app/controllers/{admin → camaleon_cms/admin}/users_controller.rb +42 -48
- data/app/controllers/{admin_controller.rb → camaleon_cms/admin_controller.rb} +28 -9
- data/app/controllers/{apps → camaleon_cms/apps}/plugins_admin_controller.rb +7 -3
- data/app/controllers/camaleon_cms/apps/plugins_front_controller.rb +38 -0
- data/app/controllers/{apps → camaleon_cms/apps}/themes_admin_controller.rb +1 -1
- data/app/controllers/{apps → camaleon_cms/apps}/themes_front_controller.rb +1 -1
- data/app/controllers/camaleon_cms/camaleon_controller.rb +99 -0
- data/app/controllers/{frontend_controller.rb → camaleon_cms/frontend_controller.rb} +56 -45
- data/app/controllers/concerns/{frontend_concern.rb → camaleon_cms/frontend_concern.rb} +8 -8
- data/app/decorators/{application_decorator.rb → camaleon_cms/application_decorator.rb} +5 -17
- data/app/decorators/{category_decorator.rb → camaleon_cms/category_decorator.rb} +8 -3
- data/app/decorators/{custom_field_decorator.rb → camaleon_cms/custom_field_decorator.rb} +1 -1
- data/app/decorators/{custom_fields_concern.rb → camaleon_cms/custom_fields_concern.rb} +4 -3
- data/app/decorators/{metas_decorator_methods.rb → camaleon_cms/metas_decorator_methods.rb} +1 -1
- data/app/decorators/{nav_menu_item_decorator.rb → camaleon_cms/nav_menu_item_decorator.rb} +2 -2
- data/app/decorators/{post_comment_decorator.rb → camaleon_cms/post_comment_decorator.rb} +3 -2
- data/app/decorators/{post_decorator.rb → camaleon_cms/post_decorator.rb} +61 -14
- data/app/decorators/{post_tag_decorator.rb → camaleon_cms/post_tag_decorator.rb} +8 -3
- data/app/decorators/{post_type_decorator.rb → camaleon_cms/post_type_decorator.rb} +29 -6
- data/app/decorators/{site_decorator.rb → camaleon_cms/site_decorator.rb} +24 -22
- data/app/decorators/{term_taxonomy_decorator.rb → camaleon_cms/term_taxonomy_decorator.rb} +15 -15
- data/app/decorators/{theme_decorator.rb → camaleon_cms/theme_decorator.rb} +1 -1
- data/app/decorators/{user_decorator.rb → camaleon_cms/user_decorator.rb} +23 -11
- data/app/decorators/{widget_decorator.rb → camaleon_cms/widget_decorator.rb} +2 -2
- data/app/helpers/{admin → camaleon_cms/admin}/application_helper.rb +17 -9
- data/app/helpers/{admin → camaleon_cms/admin}/breadcrumb_helper.rb +6 -20
- data/app/helpers/{admin → camaleon_cms/admin}/category_helper.rb +6 -3
- data/app/helpers/{admin → camaleon_cms/admin}/custom_fields_helper.rb +21 -20
- data/app/helpers/{admin → camaleon_cms/admin}/menus_helper.rb +26 -36
- data/app/helpers/{admin → camaleon_cms/admin}/post_type_helper.rb +4 -4
- data/app/helpers/{camaleon_helper.rb → camaleon_cms/camaleon_helper.rb} +23 -19
- data/app/helpers/{captcha_helper.rb → camaleon_cms/captcha_helper.rb} +21 -17
- data/app/helpers/camaleon_cms/comment_helper.rb +48 -0
- data/app/helpers/{content_helper.rb → camaleon_cms/content_helper.rb} +12 -10
- data/app/helpers/{frontend → camaleon_cms/frontend}/application_helper.rb +7 -7
- data/app/helpers/{frontend → camaleon_cms/frontend}/nav_menu_helper.rb +21 -34
- data/app/helpers/{frontend → camaleon_cms/frontend}/seo_helper.rb +5 -5
- data/app/helpers/{frontend → camaleon_cms/frontend}/site_helper.rb +17 -10
- data/app/helpers/{hooks_helper.rb → camaleon_cms/hooks_helper.rb} +1 -1
- data/app/helpers/camaleon_cms/html_helper.rb +106 -0
- data/app/helpers/{plugins_helper.rb → camaleon_cms/plugins_helper.rb} +49 -64
- data/app/helpers/{session_helper.rb → camaleon_cms/session_helper.rb} +29 -26
- data/app/helpers/{short_code_helper.rb → camaleon_cms/short_code_helper.rb} +50 -16
- data/app/helpers/{site_helper.rb → camaleon_cms/site_helper.rb} +14 -19
- data/app/helpers/{theme_helper.rb → camaleon_cms/theme_helper.rb} +37 -43
- data/app/helpers/camaleon_cms/uploader_helper.rb +366 -0
- data/app/helpers/{user_roles_helper.rb → camaleon_cms/user_roles_helper.rb} +3 -3
- data/app/mailers/{html_mailer.rb → camaleon_cms/html_mailer.rb} +7 -7
- data/app/models/{ability.rb → camaleon_cms/ability.rb} +3 -3
- data/app/models/{category.rb → camaleon_cms/category.rb} +15 -12
- data/app/models/{custom_field.rb → camaleon_cms/custom_field.rb} +8 -10
- data/app/models/{custom_field_group.rb → camaleon_cms/custom_field_group.rb} +12 -11
- data/app/models/{custom_fields_relationship.rb → camaleon_cms/custom_fields_relationship.rb} +4 -4
- data/app/models/{meta.rb → camaleon_cms/meta.rb} +2 -5
- data/app/models/{nav_menu.rb → camaleon_cms/nav_menu.rb} +14 -13
- data/app/models/{nav_menu_item.rb → camaleon_cms/nav_menu_item.rb} +18 -7
- data/app/models/{plugin.rb → camaleon_cms/plugin.rb} +3 -3
- data/app/models/{post.rb → camaleon_cms/post.rb} +57 -32
- data/app/models/{post_comment.rb → camaleon_cms/post_comment.rb} +10 -9
- data/app/models/{post_default.rb → camaleon_cms/post_default.rb} +24 -19
- data/app/models/{post_relationship.rb → camaleon_cms/post_relationship.rb} +5 -5
- data/app/models/{post_tag.rb → camaleon_cms/post_tag.rb} +4 -4
- data/app/models/{post_type.rb → camaleon_cms/post_type.rb} +49 -17
- data/app/models/{site.rb → camaleon_cms/site.rb} +38 -80
- data/app/models/{term_relationship.rb → camaleon_cms/term_relationship.rb} +6 -4
- data/app/models/camaleon_cms/term_taxonomy.rb +81 -0
- data/app/models/{theme.rb → camaleon_cms/theme.rb} +3 -3
- data/app/models/{user.rb → camaleon_cms/user.rb} +23 -37
- data/app/models/{user_relationship.rb → camaleon_cms/user_relationship.rb} +4 -4
- data/app/models/camaleon_cms/user_role.rb +140 -0
- data/app/models/{widget.rb → camaleon_cms/widget.rb} +1 -1
- data/app/models/{widget → camaleon_cms/widget}/assigned.rb +4 -4
- data/app/models/{widget → camaleon_cms/widget}/main.rb +5 -5
- data/app/models/{widget → camaleon_cms/widget}/sidebar.rb +3 -3
- data/app/models/concerns/{categories_tags_for_posts.rb → camaleon_cms/categories_tags_for_posts.rb} +3 -3
- data/app/models/concerns/{custom_fields_read.rb → camaleon_cms/custom_fields_read.rb} +10 -11
- data/app/models/concerns/camaleon_cms/metas.rb +135 -0
- data/app/views/camaleon_cms/404.html.erb +4 -0
- data/app/views/camaleon_cms/500.html.erb +4 -0
- data/app/views/{_flash_messages.html.erb → camaleon_cms/_flash_messages.html.erb} +0 -0
- data/app/views/camaleon_cms/admin/appearances/nav_menus/_custom_fields.html.erb +6 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/_custom_menus.html.erb +2 -2
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/_external_menu.html.erb +3 -3
- data/app/views/camaleon_cms/admin/appearances/nav_menus/_menu_form.html.erb +36 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/_menu_list.html.erb +5 -5
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/index.html.erb +8 -8
- data/app/views/{admin → camaleon_cms/admin}/appearances/themes/index.html.erb +7 -6
- data/app/views/{admin → camaleon_cms/admin}/appearances/themes/preview.html.erb +0 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/themes/theme_load_data.html.erb +1 -1
- data/app/views/{admin → camaleon_cms/admin}/appearances/widgets/assign/_form.html.erb +5 -5
- data/app/views/{admin → camaleon_cms/admin}/appearances/widgets/main/_sidebar.html.erb +4 -4
- data/app/views/camaleon_cms/admin/appearances/widgets/main/form.html.erb +27 -0
- data/app/views/camaleon_cms/admin/appearances/widgets/main/index.html.erb +41 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/widgets/sidebar/form.html.erb +5 -5
- data/app/views/camaleon_cms/admin/categories/_form.html.erb +42 -0
- data/app/views/{admin/settings/post_types → camaleon_cms/admin/categories}/edit.html.erb +1 -1
- data/app/views/{admin → camaleon_cms/admin}/categories/index.html.erb +16 -26
- data/app/views/camaleon_cms/admin/comments/form.html.erb +12 -0
- data/app/views/camaleon_cms/admin/comments/form_answer.html.erb +12 -0
- data/app/views/camaleon_cms/admin/comments/index.html.erb +21 -0
- data/app/views/camaleon_cms/admin/comments/list.html.erb +36 -0
- data/app/views/{admin/dashboard/index.html.erb → camaleon_cms/admin/dashboard.html.erb} +2 -2
- data/app/views/{admin → camaleon_cms/admin}/installers/form.html.erb +6 -6
- data/app/views/camaleon_cms/admin/installers/welcome.html.erb +8 -0
- data/app/views/camaleon_cms/admin/media/_files_list.html.erb +7 -0
- data/app/views/camaleon_cms/admin/media/_render_file_item.html.erb +27 -0
- data/app/views/camaleon_cms/admin/media/_render_folder_item.html.erb +13 -0
- data/app/views/camaleon_cms/admin/media/index.html.erb +25 -0
- data/app/views/{admin → camaleon_cms/admin}/plugins/_plugins_list.html.erb +10 -10
- data/app/views/{admin → camaleon_cms/admin}/plugins/index.html.erb +10 -6
- data/app/views/{admin → camaleon_cms/admin}/post_tags/_form.html.erb +8 -14
- data/app/views/{admin → camaleon_cms/admin}/post_tags/edit.html.erb +2 -2
- data/app/views/camaleon_cms/admin/post_tags/index.html.erb +58 -0
- data/app/views/camaleon_cms/admin/posts/_filter_posts.html.erb +5 -0
- data/app/views/{admin → camaleon_cms/admin}/posts/_sidebar.html.erb +34 -36
- data/app/views/camaleon_cms/admin/posts/form.html.erb +97 -0
- data/app/views/{admin → camaleon_cms/admin}/posts/index.html.erb +34 -31
- data/app/views/{admin → camaleon_cms/admin}/posts/show.html.erb +1 -1
- data/app/views/camaleon_cms/admin/search.html.erb +68 -0
- data/app/views/camaleon_cms/admin/sessions/forgot.html.erb +44 -0
- data/app/views/camaleon_cms/admin/sessions/login.html.erb +49 -0
- data/app/views/camaleon_cms/admin/sessions/register.html.erb +63 -0
- data/app/views/camaleon_cms/admin/settings/_configuration_settings.html.erb +35 -0
- data/app/views/camaleon_cms/admin/settings/_email_settings.html.erb +33 -0
- data/app/views/camaleon_cms/admin/settings/_file_system_settings.html.erb +23 -0
- data/app/views/camaleon_cms/admin/settings/_seo_settings.html.erb +22 -0
- data/app/views/{admin/settings/custom_fields/get_items.html.erb → camaleon_cms/admin/settings/custom_fields/_get_items.html.erb} +19 -39
- data/app/views/{admin → camaleon_cms/admin}/settings/custom_fields/_meta_data.html.erb +2 -2
- data/app/views/{admin → camaleon_cms/admin}/settings/custom_fields/_render.html.erb +25 -31
- data/app/views/{admin/settings/custom_fields/fields/audio.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_audio.html.erb} +1 -1
- data/app/views/{admin/settings/custom_fields/fields/checkbox.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_checkbox.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/checkboxes.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_checkboxes.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/colorpicker.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_colorpicker.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/date.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_date.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/editor.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_editor.html.erb} +0 -1
- data/app/views/{admin/settings/custom_fields/fields/email.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_email.html.erb} +0 -0
- data/app/views/camaleon_cms/admin/settings/custom_fields/fields/_field_attrs.html.erb +8 -0
- data/app/views/{admin/settings/custom_fields/fields/file.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_file.html.erb} +1 -1
- data/app/views/{admin/settings/custom_fields/fields/image.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_image.html.erb} +1 -1
- data/app/views/{admin/settings/custom_fields/fields/numeric.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_numeric.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/phone.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_phone.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/posts.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/radio.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_radio.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/select.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_select.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/select_eval.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_select_eval.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/text_area.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_text_area.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/text_box.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_text_box.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/url.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_url.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/users.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_users.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/video.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_video.html.erb} +1 -1
- data/app/views/camaleon_cms/admin/settings/custom_fields/form.html.erb +137 -0
- data/app/views/{admin → camaleon_cms/admin}/settings/custom_fields/index.html.erb +18 -14
- data/app/views/{admin → camaleon_cms/admin}/settings/languages.html.erb +7 -7
- data/app/views/camaleon_cms/admin/settings/post_types/_form.html.erb +134 -0
- data/app/views/{admin/categories → camaleon_cms/admin/settings/post_types}/edit.html.erb +2 -2
- data/app/views/camaleon_cms/admin/settings/post_types/index.html.erb +54 -0
- data/app/views/camaleon_cms/admin/settings/shortcodes.html.erb +37 -0
- data/app/views/camaleon_cms/admin/settings/site.html.erb +112 -0
- data/app/views/{admin → camaleon_cms/admin}/settings/sites/form.html.erb +9 -9
- data/app/views/camaleon_cms/admin/settings/sites/index.html.erb +58 -0
- data/app/views/camaleon_cms/admin/user_roles/form.html.erb +160 -0
- data/app/views/camaleon_cms/admin/user_roles/index.html.erb +51 -0
- data/app/views/camaleon_cms/admin/users/form.html.erb +233 -0
- data/app/views/camaleon_cms/admin/users/index.html.erb +55 -0
- data/app/views/camaleon_cms/admin/users/profile.html.erb +1 -0
- data/app/views/{admin → camaleon_cms/admin}/users/profile/_activity.html.erb +0 -0
- data/app/views/{admin → camaleon_cms/admin}/users/profile/_settings.html.erb +0 -0
- data/app/views/camaleon_cms/default_theme/admin/settings.html.erb +1 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/category.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/category.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/audio.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/checkbox.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/checkboxes.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/colorpicker.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/date.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/editor.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/email.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/field_attrs.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/file.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/image.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/numeric.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/phone.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/posts.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/radio.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/select.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/select_eval.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/text_area.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/text_box.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/url.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/users.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/video.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/index.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/layouts/_footer.html.erb +0 -1
- data/app/views/{default_theme → camaleon_cms/default_theme}/layouts/_header.html.erb +7 -7
- data/app/views/{default_theme → camaleon_cms/default_theme}/layouts/index.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_breadcrumb.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_categories_list.html.erb +0 -0
- data/app/views/camaleon_cms/default_theme/partials/_comments.html.erb +33 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_comments_list.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_flash_messages.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_forms.html.erb +2 -2
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_post_list_item.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_render_custom_field.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_search_form.html.erb +2 -4
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_sidebar.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_tag.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_tag.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_type.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_type.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/profile.html.erb +0 -0
- data/app/views/camaleon_cms/default_theme/robots.text.erb +1 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/rss.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/search.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/single.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/single.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/sitemap.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/sitemap.xml.builder +0 -0
- data/app/views/{html_mailer → camaleon_cms/html_mailer}/mailer.html.erb +0 -0
- data/app/views/{shortcode_templates → camaleon_cms/shortcode_templates}/widget.html.erb +1 -1
- data/app/views/layouts/camaleon_cms/admin.html.erb +49 -0
- data/app/views/layouts/camaleon_cms/admin/_ajax.html.erb +6 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/_flash_messages.html.erb +9 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/_footer.html.erb +0 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/_form_error.html.erb +1 -1
- data/app/views/layouts/{admin → camaleon_cms/admin}/_header.html.erb +11 -11
- data/app/views/layouts/camaleon_cms/admin/_sidebar.html.erb +19 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/installer.html.erb +5 -5
- data/app/views/layouts/{application.html.erb → camaleon_cms/application.html.erb} +0 -0
- data/app/views/layouts/{login.html.erb → camaleon_cms/login.html.erb} +5 -4
- data/app/views/layouts/{mailer.html.erb → camaleon_cms/mailer.html.erb} +0 -0
- data/config/initializers/action_view.rb +31 -0
- data/config/initializers/active_record_extension.rb +52 -2
- data/config/initializers/assets.rb +0 -18
- data/config/initializers/custom_initializers.rb +7 -0
- data/config/locales/camaleon_cms/admin/en.yml +648 -0
- data/config/locales/camaleon_cms/admin/es.yml +597 -0
- data/config/locales/camaleon_cms/admin/it.yml +607 -0
- data/config/locales/camaleon_cms/admin/js.yml +127 -0
- data/config/locales/camaleon_cms/admin/pt_br.yml +610 -0
- data/config/locales/camaleon_cms/common.yml +193 -0
- data/config/locales/{languages.yml → camaleon_cms/languages.yml} +0 -0
- data/config/locales/{routes.yml → camaleon_cms/routes.yml} +8 -0
- data/config/locales/{pt.yml → pt-BR.yml} +1 -1
- data/config/routes.rb +8 -24
- data/config/routes/admin.rb +114 -98
- data/config/routes/frontend.rb +39 -27
- data/config/system.json +5 -3
- data/db/migrate/20150611161134_post_table_into_utf8.rb +15 -15
- data/db/migrate/20150926095310_rename_column_posts.rb +4 -4
- data/lib/camaleon_cms/engine.rb +6 -9
- data/lib/camaleon_cms/version.rb +1 -1
- data/lib/ext/string.rb +10 -45
- data/lib/ext/translator.rb +3 -2
- data/lib/generators/camaleon_cms/gem_plugin_generator.rb +90 -83
- data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb +1 -1
- data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/front_controller.rb +1 -1
- data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/admin/index.html.erb +9 -2
- data/lib/generators/camaleon_cms/gem_theme_generator.rb +97 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/assets/images → camaleon_cms/gem_theme_template/app/assets/images/themes/my_plugin}/image.png +0 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/assets/js → camaleon_cms/gem_theme_template/app/assets/javascripts/themes/my_plugin}/main.js +1 -1
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/assets/css → camaleon_cms/gem_theme_template/app/assets/stylesheets/themes/my_plugin}/main.css +1 -1
- data/lib/generators/camaleon_cms/gem_theme_template/app/helpers/themes/my_plugin/main_helper.rb +26 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/views → camaleon_cms/gem_theme_template/app/views/themes/my_plugin}/admin/settings.html.erb +1 -1
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/views → camaleon_cms/gem_theme_template/app/views/themes/my_plugin}/index.html.erb +0 -0
- data/lib/generators/camaleon_cms/gem_theme_template/app/views/themes/my_plugin/layouts/index.html.erb +71 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/views → camaleon_cms/gem_theme_template/app/views/themes/my_plugin}/partials/readme.txt +0 -0
- data/lib/generators/camaleon_cms/gem_theme_template/config/camaleon_theme.json +14 -0
- data/lib/generators/camaleon_cms/install_template/system.json +4 -2
- data/lib/generators/camaleon_cms/theme_generator.rb +71 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/assets/css/main.css +12 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/assets/images/image.png +0 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/assets/js/main.js +14 -0
- data/lib/generators/{ctheme_template → camaleon_cms/theme_template}/app/apps/themes/my_theme/config/config.json +0 -0
- data/lib/generators/{ctheme_template → camaleon_cms/theme_template}/app/apps/themes/my_theme/main_helper.rb +0 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/views/admin/settings.html.erb +4 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/views/index.html.erb +25 -0
- data/lib/generators/{ctheme_template → camaleon_cms/theme_template}/app/apps/themes/my_theme/views/layouts/index.html.erb +8 -8
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/views/partials/readme.txt +1 -0
- data/lib/plugin_routes.rb +59 -28
- data/lib/tasks/camaleon_cms/rspec_test.rake +16 -0
- metadata +458 -548
- data/app/apps/plugins/contact_form/views/admin_forms/manual.html.erb +0 -59
- data/app/apps/themes/new/assets/js/plugins/modal_elfinder.js +0 -29
- data/app/assets/javascripts/admin/admin-basic-manifest.js +0 -3
- data/app/assets/javascripts/admin/custom_fields.js +0 -167
- data/app/assets/javascripts/admin/elfinder-manifest.js +0 -7
- data/app/assets/javascripts/admin/elfinder/elfinder.full.js +0 -12646
- data/app/assets/javascripts/admin/elfinder/i18n/elfinder.es.js +0 -294
- data/app/assets/javascripts/admin/elfinder/i18n/elfinder.fr.js +0 -298
- data/app/assets/javascripts/admin/elfinder/i18n/elfinder.it.js +0 -366
- data/app/assets/javascripts/admin/elfinder/proxy/elFinderSupportVer1.js +0 -338
- data/app/assets/javascripts/admin/elfinder/upload_elfinder.js +0 -237
- data/app/assets/javascripts/admin/jquery.slugify.js +0 -65
- data/app/assets/javascripts/admin/libraries.js +0 -266
- data/app/assets/javascripts/admin/post.js +0 -273
- data/app/assets/javascripts/admin/widgets.js +0 -54
- data/app/assets/javascripts/elfinder_front.js +0 -85
- data/app/assets/stylesheets/admin/custom_admin.css.scss +0 -193
- data/app/assets/stylesheets/admin/elfinder-manifest.css +0 -6
- data/app/assets/stylesheets/admin/elfinder/elfinder-theme.scss +0 -191
- data/app/assets/stylesheets/admin/elfinder/elfinder.css +0 -1922
- data/app/assets/stylesheets/admin/elfinder/images/arrows-active.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/arrows-normal.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/crop.gif +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/dialogs.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/icons-big.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/icons-small.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/logo.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/progress.gif +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/quicklook-bg.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/quicklook-icons.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/resize.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/spinner-mini.gif +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/toolbar.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/bootstrap.min.css.scss +0 -5
- data/app/controllers/admin/appearances_controller.rb +0 -13
- data/app/controllers/admin/comments_controller.rb +0 -113
- data/app/controllers/admin/media_controller.rb +0 -53
- data/app/controllers/api/api_controller.rb +0 -31
- data/app/controllers/api/v1/category_controller.rb +0 -15
- data/app/controllers/api/v1/contact_form_controller.rb +0 -55
- data/app/controllers/api/v1/page_controller.rb +0 -8
- data/app/controllers/api/v1/post_controller.rb +0 -8
- data/app/controllers/apps/plugins_front_controller.rb +0 -20
- data/app/controllers/camaleon_controller.rb +0 -116
- data/app/helpers/html_helper.rb +0 -118
- data/app/helpers/uploader_helper.rb +0 -214
- data/app/models/concerns/metas.rb +0 -136
- data/app/models/grid_template.rb +0 -15
- data/app/models/term_taxonomy.rb +0 -157
- data/app/models/user_role.rb +0 -139
- data/app/serializers/api/base_serializer.rb +0 -9
- data/app/serializers/api/v1/category_serializer.rb +0 -8
- data/app/views/admin/appearances/nav_menus/_custom_fields.html.erb +0 -6
- data/app/views/admin/appearances/nav_menus/_menu_form.html.erb +0 -32
- data/app/views/admin/appearances/widgets/main/form.html.erb +0 -27
- data/app/views/admin/appearances/widgets/main/index.html.erb +0 -69
- data/app/views/admin/categories/_form.html.erb +0 -42
- data/app/views/admin/comments/form.html.erb +0 -52
- data/app/views/admin/comments/index.html.erb +0 -41
- data/app/views/admin/comments/reply.html.erb +0 -196
- data/app/views/admin/installers/welcome.html.erb +0 -8
- data/app/views/admin/media/iframe.html.erb +0 -33
- data/app/views/admin/media/index.html.erb +0 -19
- data/app/views/admin/post_tags/index.html.erb +0 -74
- data/app/views/admin/posts/_filter_posts.html.erb +0 -6
- data/app/views/admin/posts/form.html.erb +0 -103
- data/app/views/admin/sessions/forgot.html.erb +0 -45
- data/app/views/admin/sessions/login.html.erb +0 -49
- data/app/views/admin/sessions/register.html.erb +0 -62
- data/app/views/admin/settings/custom_fields/fields/field_attrs.html.erb +0 -8
- data/app/views/admin/settings/custom_fields/form.html.erb +0 -248
- data/app/views/admin/settings/post_types/_form.html.erb +0 -93
- data/app/views/admin/settings/post_types/index.html.erb +0 -72
- data/app/views/admin/settings/site.html.erb +0 -188
- data/app/views/admin/settings/sites/index.html.erb +0 -55
- data/app/views/admin/taxonomy/_form.html.erb +0 -62
- data/app/views/admin/taxonomy/edit.html.erb +0 -18
- data/app/views/admin/taxonomy/index.html.erb +0 -79
- data/app/views/admin/user_roles/form.html.erb +0 -167
- data/app/views/admin/user_roles/index.html.erb +0 -48
- data/app/views/admin/users/form.html.erb +0 -306
- data/app/views/admin/users/index.html.erb +0 -53
- data/app/views/admin/users/profile.html.erb +0 -118
- data/app/views/admin/users/profile_edit.html.erb +0 -312
- data/app/views/default_theme/admin/settings.html.erb +0 -1
- data/app/views/default_theme/partials/_comments.html.erb +0 -33
- data/app/views/default_theme/robots.text.erb +0 -1
- data/app/views/layouts/admin.html.erb +0 -56
- data/app/views/layouts/admin/_ajax.html.erb +0 -2
- data/app/views/layouts/admin/_sidebar.html.erb +0 -22
- data/app/views/shortcode_templates/form.html.erb +0 -1
- data/config/initializers/cache_helper.rb +0 -17
- data/config/initializers/doorkeeper.rb +0 -128
- data/config/initializers/elfinder.rb +0 -63
- data/config/initializers/page_caching.rb +0 -42
- data/config/initializers/rufus_cron.rb +0 -33
- data/config/initializers/swagger.rb +0 -18
- data/config/locales/admin/en.yml +0 -618
- data/config/locales/admin/es.yml +0 -584
- data/config/locales/admin/it.yml +0 -605
- data/config/locales/admin/js.yml +0 -118
- data/config/locales/common.yml +0 -189
- data/config/locales/doorkeeper.en.yml +0 -123
- data/db/migrate/20150930115030_doorkeeper_configuration.rb +0 -45
- data/lib/generators/camaleon_cms/install_template/apps/plugins/readme.txt +0 -1
- data/lib/generators/camaleon_cms/install_template/apps/themes/readme.txt +0 -1
- data/lib/generators/cplugin_generator.rb +0 -82
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/admin_controller.rb +0 -8
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/assets/css/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/assets/images/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/assets/js/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/config.json +0 -21
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/locales/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/routes_admin.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/routes_front.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/front_controller.rb +0 -8
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/main_helper.rb +0 -22
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/models/my_plugin.rb +0 -7
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/views/admin/index.html.erb +0 -2
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/views/front/index.html.erb +0 -2
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/views/layouts/readme.txt +0 -2
- data/lib/generators/ctheme_generator.rb +0 -65
- data/lib/tasks/camaleon_cms_tasks.rake +0 -23
- data/lib/tasks/precompile_overrides.rake +0 -6
@@ -25,15 +25,10 @@ function cama_get_tinymce_settings(settings){
|
|
25
25
|
browser_spellcheck : true,
|
26
26
|
language_url: tinymce_global_settings["language_url"],
|
27
27
|
file_browser_callback: function(field_name, url, type, win) {
|
28
|
-
$.fn.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
if(file.mime && (file.mime.indexOf(type) > -1 || type == "file")){
|
33
|
-
$('#'+field_name).val(file.url.to_url());
|
34
|
-
}else{
|
35
|
-
alert("You must upload a valid format: "+type)
|
36
|
-
}
|
28
|
+
$.fn.upload_filemanager({
|
29
|
+
formats: type,
|
30
|
+
selected: function(file, response){
|
31
|
+
$('#' + field_name).val(file.url);
|
37
32
|
}
|
38
33
|
});
|
39
34
|
},
|
@@ -5,15 +5,21 @@
|
|
5
5
|
// return translation of a key
|
6
6
|
// sample: I18n('button.edit') ==> Edit
|
7
7
|
// return String with the translation
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
// default_val: (String) this value is returned if there is no exist translation for key
|
9
|
+
// if default_val is empty, will be returned the last key titleized
|
10
|
+
var I18n = function(key, default_val){
|
11
|
+
try {
|
12
|
+
var res = eval("I18n_data." + key);
|
13
|
+
if (!res) res = default_val ? default_val : ("" + key.split(".").pop()).titleize();
|
14
|
+
}catch(e){
|
15
|
+
var res = (""+key.split(".").pop()).titleize();
|
16
|
+
}
|
11
17
|
return res;
|
12
18
|
}
|
13
19
|
|
14
20
|
// helper to convert not found translations key into titleized string
|
15
21
|
String.prototype.titleize = function() {
|
16
|
-
var words = this.split(' ')
|
22
|
+
var words = this.replace(/_/g, " ").split(' ')
|
17
23
|
var array = []
|
18
24
|
for (var i=0; i<words.length; ++i) {
|
19
25
|
array.push(words[i].charAt(0).toUpperCase() + words[i].toLowerCase().slice(1))
|
File without changes
|
@@ -0,0 +1,67 @@
|
|
1
|
+
function slugFunc(v, sep){
|
2
|
+
if (!v) return '';
|
3
|
+
//var map = {"2d":"-","20":"-","24":"s","26":"and","30":"0","31":"1","32":"2","33":"3","34":"4","35":"5","36":"6","37":"7","38":"8","39":"9","41":"A","42":"B","43":"C","44":"D","45":"E","46":"F","47":"G","48":"H","49":"I","50":"P","51":"Q","52":"R","53":"S","54":"T","55":"U","56":"V","57":"W","58":"X","59":"Y","61":"a","62":"b","63":"c","64":"d","65":"e","66":"f","67":"g","68":"h","69":"i","70":"p","71":"q","72":"r","73":"s","74":"t","75":"u","76":"v","77":"w","78":"x","79":"y","100":"A","101":"a","102":"A","103":"a","104":"A","105":"a","106":"C","107":"c","108":"C","109":"c","110":"D","111":"d","112":"E","113":"e","114":"E","115":"e","116":"E","117":"e","118":"E","119":"e","120":"G","121":"g","122":"G","123":"g","124":"H","125":"h","126":"H","127":"h","128":"I","129":"i","130":"I","131":"i","132":"IJ","133":"ij","134":"J","135":"j","136":"K","137":"k","138":"k","139":"L","140":"l","141":"L","142":"l","143":"N","144":"n","145":"N","146":"n","147":"N","148":"n","149":"n","150":"O","151":"o","152":"OE","153":"oe","154":"R","155":"r","156":"R","157":"r","158":"R","159":"r","160":"S","161":"s","162":"T","163":"t","164":"T","165":"t","166":"T","167":"t","168":"U","169":"u","170":"U","171":"u","172":"U","173":"u","174":"W","175":"w","176":"Y","177":"y","178":"Y","179":"Z","180":"b","181":"B","182":"b","183":"b","184":"b","185":"b","186":"C","187":"C","188":"c","189":"D","190":"E","191":"F","192":"f","193":"G","194":"Y","195":"h","196":"i","197":"I","198":"K","199":"k","200":"A","201":"a","202":"A","203":"a","204":"E","205":"e","206":"E","207":"e","208":"I","209":"i","210":"R","211":"r","212":"R","213":"r","214":"U","215":"u","216":"U","217":"u","218":"S","219":"s","220":"n","221":"d","222":"8","223":"8","224":"Z","225":"z","226":"A","227":"a","228":"E","229":"e","230":"O","231":"o","232":"Y","233":"y","234":"l","235":"n","236":"t","237":"j","238":"db","239":"qp","240":"<","241":"?","242":"?","243":"B","244":"U","245":"A","246":"E","247":"e","248":"J","249":"j","250":"a","251":"a","252":"a","253":"b","254":"c","255":"e","256":"d","257":"d","258":"e","259":"e","260":"g","261":"g","262":"g","263":"Y","264":"x","265":"u","266":"h","267":"h","268":"i","269":"i","270":"w","271":"m","272":"n","273":"n","274":"N","275":"o","276":"oe","277":"m","278":"o","279":"r","280":"R","281":"R","282":"S","283":"f","284":"f","285":"f","286":"f","287":"t","288":"t","289":"u","290":"Z","291":"Z","292":"3","293":"3","294":"?","295":"?","296":"5","297":"C","298":"O","299":"B","363":"a","364":"e","365":"i","366":"o","367":"u","368":"c","369":"d","386":"A","388":"E","389":"H","390":"i","391":"A","392":"B","393":"r","394":"A","395":"E","396":"Z","397":"H","398":"O","399":"I","400":"E","401":"E","402":"T","403":"r","404":"E","405":"S","406":"I","407":"I","408":"J","409":"jb","410":"A","411":"B","412":"B","413":"r","414":"D","415":"E","416":"ZH","417":"Z","418":"I","419":"Y","420":"R","421":"S","422":"T","423":"U","424":"F","425":"H","426":"TS","427":"CH","428":"SH","429":"SCH","430":"a","431":"b","432":"v","433":"g","434":"d","435":"e","436":"zh","437":"z","438":"i","439":"y","440":"r","441":"s","442":"t","443":"u","444":"f","445":"h","446":"ts","447":"ch","448":"sh","449":"sch","450":"e","451":"e","452":"h","453":"r","454":"e","455":"s","456":"i","457":"i","458":"j","459":"jb","460":"W","461":"w","462":"Tb","463":"tb","464":"IC","465":"ic","466":"A","467":"a","468":"IA","469":"ia","470":"Y","471":"y","472":"O","473":"o","474":"V","475":"v","476":"V","477":"v","478":"Oy","479":"oy","480":"C","481":"c","490":"R","491":"r","492":"F","493":"f","494":"H","495":"h","496":"X","497":"x","498":"3","499":"3","500":"d","501":"d","502":"d","503":"d","504":"R","505":"R","506":"R","507":"R","508":"JT","509":"JT","510":"E","511":"e","512":"JT","513":"jt","514":"JX","515":"JX","531":"U","532":"D","533":"Q","534":"N","535":"T","536":"2","537":"F","538":"r","539":"p","540":"z","541":"2","542":"n","543":"x","544":"U","545":"B","546":"j","547":"t","548":"n","549":"C","550":"R","551":"8","552":"R","553":"O","554":"P","555":"O","556":"S","561":"w","562":"f","563":"q","564":"n","565":"t","566":"q","567":"t","568":"n","569":"p","570":"h","571":"a","572":"n","573":"a","574":"u","575":"j","576":"u","577":"2","578":"n","579":"2","580":"n","581":"g","582":"l","583":"uh","584":"p","585":"o","586":"S","587":"u","4a":"J","4b":"K","4c":"L","4d":"M","4e":"N","4f":"O","5a":"Z","6a":"j","6b":"k","6c":"l","6d":"m","6e":"n","6f":"o","7a":"z","a2":"c","a3":"f","a5":"Y","a7":"s","a9":"c","aa":"a","ae":"r","b2":"2","b3":"3","b5":"u","b6":"p","b9":"1","c0":"A","c1":"A","c2":"A","c3":"A","c4":"A","c5":"A","c6":"AE","c7":"C","c8":"E","c9":"E","ca":"E","cb":"E","cc":"I","cd":"I","ce":"I","cf":"I","d0":"D","d1":"N","d2":"O","d3":"O","d4":"O","d5":"O","d6":"O","d7":"X","d8":"O","d9":"U","da":"U","db":"U","dc":"U","dd":"Y","de":"p","df":"b","e0":"a","e1":"a","e2":"a","e3":"a","e4":"a","e5":"a","e6":"ae","e7":"c","e8":"e","e9":"e","ea":"e","eb":"e","ec":"i","ed":"i","ee":"i","ef":"i","f0":"o","f1":"n","f2":"o","f3":"o","f4":"o","f5":"o","f6":"o","f8":"o","f9":"u","fa":"u","fb":"u","fc":"u","fd":"y","ff":"y","10a":"C","10b":"c","10c":"C","10d":"c","10e":"D","10f":"d","11a":"E","11b":"e","11c":"G","11d":"g","11e":"G","11f":"g","12a":"I","12b":"i","12c":"I","12d":"i","12e":"I","12f":"i","13a":"l","13b":"L","13c":"l","13d":"L","13e":"l","13f":"L","14a":"n","14b":"n","14c":"O","14d":"o","14e":"O","14f":"o","15a":"S","15b":"s","15c":"S","15d":"s","15e":"S","15f":"s","16a":"U","16b":"u","16c":"U","16d":"u","16e":"U","16f":"u","17a":"z","17b":"Z","17c":"z","17d":"Z","17e":"z","17f":"f","18a":"D","18b":"d","18c":"d","18d":"q","18e":"E","18f":"e","19a":"l","19b":"h","19c":"w","19d":"N","19e":"n","19f":"O","1a0":"O","1a1":"o","1a2":"P","1a3":"P","1a4":"P","1a5":"p","1a6":"R","1a7":"S","1a8":"s","1a9":"E","1aa":"l","1ab":"t","1ac":"T","1ad":"t","1ae":"T","1af":"U","1b0":"u","1b1":"U","1b2":"U","1b3":"Y","1b4":"y","1b5":"Z","1b6":"z","1b7":"3","1b8":"3","1b9":"3","1ba":"3","1bb":"2","1bc":"5","1bd":"5","1be":"5","1bf":"p","1c4":"DZ","1c5":"Dz","1c6":"dz","1c7":"Lj","1c8":"Lj","1c9":"lj","1ca":"NJ","1cb":"Nj","1cc":"nj","1cd":"A","1ce":"a","1cf":"I","1d0":"i","1d1":"O","1d2":"o","1d3":"U","1d4":"u","1d5":"U","1d6":"u","1d7":"U","1d8":"u","1d9":"U","1da":"u","1db":"U","1dc":"u","1dd":"e","1de":"A","1df":"a","1e0":"A","1e1":"a","1e2":"AE","1e3":"ae","1e4":"G","1e5":"g","1e6":"G","1e7":"g","1e8":"K","1e9":"k","1ea":"Q","1eb":"q","1ec":"Q","1ed":"q","1ee":"3","1ef":"3","1f0":"J","1f1":"dz","1f2":"dZ","1f3":"DZ","1f4":"g","1f5":"G","1f6":"h","1f7":"p","1f8":"N","1f9":"n","1fa":"A","1fb":"a","1fc":"AE","1fd":"ae","1fe":"O","1ff":"o","20a":"I","20b":"i","20c":"O","20d":"o","20e":"O","20f":"o","21a":"T","21b":"t","21c":"3","21d":"3","21e":"H","21f":"h","22a":"O","22b":"o","22c":"O","22d":"o","22e":"O","22f":"o","23a":"A","23b":"C","23c":"c","23d":"L","23e":"T","23f":"s","24a":"Q","24b":"q","24c":"R","24d":"r","24e":"Y","24f":"y","25a":"e","25b":"3","25c":"3","25d":"3","25e":"3","25f":"j","26a":"i","26b":"I","26c":"I","26d":"I","26e":"h","26f":"w","27a":"R","27b":"r","27c":"R","27d":"R","27e":"r","27f":"r","28a":"u","28b":"v","28c":"A","28d":"M","28e":"Y","28f":"Y","29a":"B","29b":"G","29c":"H","29d":"j","29e":"K","29f":"L","2a0":"q","2a1":"?","2a2":"c","2a3":"dz","2a4":"d3","2a5":"dz","2a6":"ts","2a7":"tf","2a8":"tc","2a9":"fn","2aa":"ls","2ab":"lz","2ac":"ww","2ae":"u","2af":"u","2b0":"h","2b1":"h","2b2":"j","2b3":"r","2b4":"r","2b5":"r","2b6":"R","2b7":"W","2b8":"Y","2df":"x","2e0":"Y","2e1":"1","2e2":"s","2e3":"x","2e4":"c","36a":"h","36b":"m","36c":"r","36d":"t","36e":"v","36f":"x","37b":"c","37c":"c","37d":"c","38a":"I","38c":"O","38e":"Y","38f":"O","39a":"K","39b":"A","39c":"M","39d":"N","39e":"E","39f":"O","3a0":"TT","3a1":"P","3a3":"E","3a4":"T","3a5":"Y","3a6":"O","3a7":"X","3a8":"Y","3a9":"O","3aa":"I","3ab":"Y","3ac":"a","3ad":"e","3ae":"n","3af":"i","3b0":"v","3b1":"a","3b2":"b","3b3":"y","3b4":"d","3b5":"e","3b6":"c","3b7":"n","3b8":"0","3b9":"1","3ba":"k","3bb":"j","3bc":"u","3bd":"v","3be":"c","3bf":"o","3c0":"tt","3c1":"p","3c2":"s","3c3":"o","3c4":"t","3c5":"u","3c6":"q","3c7":"X","3c8":"Y","3c9":"w","3ca":"i","3cb":"u","3cc":"o","3cd":"u","3ce":"w","3d0":"b","3d1":"e","3d2":"Y","3d3":"Y","3d4":"Y","3d5":"O","3d6":"w","3d7":"x","3d8":"Q","3d9":"q","3da":"C","3db":"c","3dc":"F","3dd":"f","3de":"N","3df":"N","3e2":"W","3e3":"w","3e4":"q","3e5":"q","3e6":"h","3e7":"e","3e8":"S","3e9":"s","3ea":"X","3eb":"x","3ec":"6","3ed":"6","3ee":"t","3ef":"t","3f0":"x","3f1":"e","3f2":"c","3f3":"j","3f4":"O","3f5":"E","3f6":"E","3f7":"p","3f8":"p","3f9":"C","3fa":"M","3fb":"M","3fc":"p","3fd":"C","3fe":"C","3ff":"C","40a":"Hb","40b":"Th","40c":"K","40d":"N","40e":"Y","40f":"U","41a":"K","41b":"jI","41c":"M","41d":"H","41e":"O","41f":"TT","42a":"b","42b":"bI","42c":"b","42d":"E","42e":"IO","42f":"R","43a":"K","43b":"JI","43c":"M","43d":"H","43e":"O","43f":"N","44a":"b","44b":"bI","44c":"b","44d":"e","44e":"io","44f":"r","45a":"Hb","45b":"h","45c":"k","45d":"n","45e":"y","45f":"u","46a":"mY","46b":"my","46c":"Im","46d":"Im","46e":"3","46f":"3","47a":"O","47b":"o","47c":"W","47d":"w","47e":"W","47f":"W","48a":"H","48b":"H","48c":"B","48d":"b","48e":"P","48f":"p","49a":"K","49b":"k","49c":"K","49d":"k","49e":"K","49f":"k","4a0":"K","4a1":"k","4a2":"H","4a3":"h","4a4":"H","4a5":"h","4a6":"Ih","4a7":"ih","4a8":"O","4a9":"o","4aa":"C","4ab":"c","4ac":"T","4ad":"t","4ae":"Y","4af":"y","4b0":"Y","4b1":"y","4b2":"X","4b3":"x","4b4":"TI","4b5":"ti","4b6":"H","4b7":"h","4b8":"H","4b9":"h","4ba":"H","4bb":"h","4bc":"E","4bd":"e","4be":"E","4bf":"e","4c0":"I","4c1":"X","4c2":"x","4c3":"K","4c4":"k","4c5":"jt","4c6":"jt","4c7":"H","4c8":"h","4c9":"H","4ca":"h","4cb":"H","4cc":"h","4cd":"M","4ce":"m","4cf":"l","4d0":"A","4d1":"a","4d2":"A","4d3":"a","4d4":"AE","4d5":"ae","4d6":"E","4d7":"e","4d8":"e","4d9":"e","4da":"E","4db":"e","4dc":"X","4dd":"X","4de":"3","4df":"3","4e0":"3","4e1":"3","4e2":"N","4e3":"n","4e4":"N","4e5":"n","4e6":"O","4e7":"o","4e8":"O","4e9":"o","4ea":"O","4eb":"o","4ec":"E","4ed":"e","4ee":"Y","4ef":"y","4f0":"Y","4f1":"y","4f2":"Y","4f3":"y","4f4":"H","4f5":"h","4f6":"R","4f7":"r","4f8":"bI","4f9":"bi","4fa":"F","4fb":"f","4fc":"X","4fd":"x","4fe":"X","4ff":"x","50a":"H","50b":"h","50c":"G","50d":"g","50e":"T","50f":"t","51a":"Q","51b":"q","51c":"W","51d":"w","53a":"d","53b":"r","53c":"L","53d":"Iu","53e":"O","53f":"y","54a":"m","54b":"o","54c":"N","54d":"U","54e":"Y","54f":"S","56a":"d","56b":"h","56c":"l","56d":"lu","56e":"d","56f":"y","57a":"w","57b":"2","57c":"n","57d":"u","57e":"y","57f":"un","5f":"_"};
|
4
|
+
var map = {"2d":"-","20":"-","24":"s","26":"and","30":"0","31":"1","32":"2","33":"3","34":"4","35":"5","36":"6","37":"7","38":"8","39":"9","41":"A","42":"B","43":"C","44":"D","45":"E","46":"F","47":"G","48":"H","49":"I","50":"P","51":"Q","52":"R","53":"S","54":"T","55":"U","56":"V","57":"W","58":"X","59":"Y","61":"a","62":"b","63":"c","64":"d","65":"e","66":"f","67":"g","68":"h","69":"i","70":"p","71":"q","72":"r","73":"s","74":"t","75":"u","76":"v","77":"w","78":"x","79":"y","100":"A","101":"a","102":"A","103":"a","104":"A","105":"a","106":"C","107":"c","108":"C","109":"c","110":"D","111":"d","112":"E","113":"e","114":"E","115":"e","116":"E","117":"e","118":"E","119":"e","120":"G","121":"g","122":"G","123":"g","124":"H","125":"h","126":"H","127":"h","128":"I","129":"i","130":"I","131":"i","132":"IJ","133":"ij","134":"J","135":"j","136":"K","137":"k","138":"k","139":"L","140":"l","141":"L","142":"l","143":"N","144":"n","145":"N","146":"n","147":"N","148":"n","149":"n","150":"O","151":"o","152":"OE","153":"oe","154":"R","155":"r","156":"R","157":"r","158":"R","159":"r","160":"S","161":"s","162":"T","163":"t","164":"T","165":"t","166":"T","167":"t","168":"U","169":"u","170":"U","171":"u","172":"U","173":"u","174":"W","175":"w","176":"Y","177":"y","178":"Y","179":"Z","180":"b","181":"B","182":"b","183":"b","184":"b","185":"b","186":"C","187":"C","188":"c","189":"D","190":"E","191":"F","192":"f","193":"G","194":"Y","195":"h","196":"i","197":"I","198":"K","199":"k","200":"A","201":"a","202":"A","203":"a","204":"E","205":"e","206":"E","207":"e","208":"I","209":"i","210":"R","211":"r","212":"R","213":"r","214":"U","215":"u","216":"U","217":"u","218":"S","219":"s","220":"n","221":"d","222":"8","223":"8","224":"Z","225":"z","226":"A","227":"a","228":"E","229":"e","230":"O","231":"o","232":"Y","233":"y","234":"l","235":"n","236":"t","237":"j","238":"db","239":"qp","240":"<","241":"?","242":"?","243":"B","244":"U","245":"A","246":"E","247":"e","248":"J","249":"j","250":"a","251":"a","252":"a","253":"b","254":"c","255":"e","256":"d","257":"d","258":"e","259":"e","260":"g","261":"g","262":"g","263":"Y","264":"x","265":"u","266":"h","267":"h","268":"i","269":"i","270":"w","271":"m","272":"n","273":"n","274":"N","275":"o","276":"oe","277":"m","278":"o","279":"r","280":"R","281":"R","282":"S","283":"f","284":"f","285":"f","286":"f","287":"t","288":"t","289":"u","290":"Z","291":"Z","292":"3","293":"3","294":"?","295":"?","296":"5","297":"C","298":"O","299":"B","363":"a","364":"e","365":"i","366":"o","367":"u","368":"c","369":"d","386":"A","388":"E","389":"H","390":"i","391":"A","392":"B","393":"r","394":"A","395":"E","396":"Z","397":"H","398":"O","399":"I","400":"E","401":"E","402":"T","403":"r","404":"E","405":"S","406":"I","407":"I","408":"J","409":"jb","410":"A","411":"B","412":"V","413":"G","414":"D","415":"E","416":"ZH","417":"Z","418":"I","419":"Y","420":"R","421":"S","422":"T","423":"U","424":"F","425":"H","426":"TS","427":"CH","428":"SH","429":"SCH","430":"a","431":"b","432":"v","433":"g","434":"d","435":"e","436":"zh","437":"z","438":"i","439":"y","440":"r","441":"s","442":"t","443":"u","444":"f","445":"h","446":"ts","447":"ch","448":"sh","449":"sch","450":"e","451":"e","452":"h","453":"r","454":"e","455":"s","456":"i","457":"i","458":"j","459":"jb","460":"W","461":"w","462":"Tb","463":"tb","464":"IC","465":"ic","466":"A","467":"a","468":"IA","469":"ia","470":"Y","471":"y","472":"O","473":"o","474":"V","475":"v","476":"V","477":"v","478":"Oy","479":"oy","480":"C","481":"c","490":"R","491":"r","492":"F","493":"f","494":"H","495":"h","496":"X","497":"x","498":"3","499":"3","500":"d","501":"d","502":"d","503":"d","504":"R","505":"R","506":"R","507":"R","508":"JT","509":"JT","510":"E","511":"e","512":"JT","513":"jt","514":"JX","515":"JX","531":"U","532":"D","533":"Q","534":"N","535":"T","536":"2","537":"F","538":"r","539":"p","540":"z","541":"2","542":"n","543":"x","544":"U","545":"B","546":"j","547":"t","548":"n","549":"C","550":"R","551":"8","552":"R","553":"O","554":"P","555":"O","556":"S","561":"w","562":"f","563":"q","564":"n","565":"t","566":"q","567":"t","568":"n","569":"p","570":"h","571":"a","572":"n","573":"a","574":"u","575":"j","576":"u","577":"2","578":"n","579":"2","580":"n","581":"g","582":"l","583":"uh","584":"p","585":"o","586":"S","587":"u","4a":"J","4b":"K","4c":"L","4d":"M","4e":"N","4f":"O","5a":"Z","6a":"j","6b":"k","6c":"l","6d":"m","6e":"n","6f":"o","7a":"z","a2":"c","a3":"f","a5":"Y","a7":"s","a9":"c","aa":"a","ae":"r","b2":"2","b3":"3","b5":"u","b6":"p","b9":"1","c0":"A","c1":"A","c2":"A","c3":"A","c4":"A","c5":"A","c6":"AE","c7":"C","c8":"E","c9":"E","ca":"E","cb":"E","cc":"I","cd":"I","ce":"I","cf":"I","d0":"D","d1":"N","d2":"O","d3":"O","d4":"O","d5":"O","d6":"O","d7":"X","d8":"O","d9":"U","da":"U","db":"U","dc":"U","dd":"Y","de":"p","df":"b","e0":"a","e1":"a","e2":"a","e3":"a","e4":"a","e5":"a","e6":"ae","e7":"c","e8":"e","e9":"e","ea":"e","eb":"e","ec":"i","ed":"i","ee":"i","ef":"i","f0":"o","f1":"n","f2":"o","f3":"o","f4":"o","f5":"o","f6":"o","f8":"o","f9":"u","fa":"u","fb":"u","fc":"u","fd":"y","ff":"y","10a":"C","10b":"c","10c":"C","10d":"c","10e":"D","10f":"d","11a":"E","11b":"e","11c":"G","11d":"g","11e":"G","11f":"g","12a":"I","12b":"i","12c":"I","12d":"i","12e":"I","12f":"i","13a":"l","13b":"L","13c":"l","13d":"L","13e":"l","13f":"L","14a":"n","14b":"n","14c":"O","14d":"o","14e":"O","14f":"o","15a":"S","15b":"s","15c":"S","15d":"s","15e":"S","15f":"s","16a":"U","16b":"u","16c":"U","16d":"u","16e":"U","16f":"u","17a":"z","17b":"Z","17c":"z","17d":"Z","17e":"z","17f":"f","18a":"D","18b":"d","18c":"d","18d":"q","18e":"E","18f":"e","19a":"l","19b":"h","19c":"w","19d":"N","19e":"n","19f":"O","1a0":"O","1a1":"o","1a2":"P","1a3":"P","1a4":"P","1a5":"p","1a6":"R","1a7":"S","1a8":"s","1a9":"E","1aa":"l","1ab":"t","1ac":"T","1ad":"t","1ae":"T","1af":"U","1b0":"u","1b1":"U","1b2":"U","1b3":"Y","1b4":"y","1b5":"Z","1b6":"z","1b7":"3","1b8":"3","1b9":"3","1ba":"3","1bb":"2","1bc":"5","1bd":"5","1be":"5","1bf":"p","1c4":"DZ","1c5":"Dz","1c6":"dz","1c7":"Lj","1c8":"Lj","1c9":"lj","1ca":"NJ","1cb":"Nj","1cc":"nj","1cd":"A","1ce":"a","1cf":"I","1d0":"i","1d1":"O","1d2":"o","1d3":"U","1d4":"u","1d5":"U","1d6":"u","1d7":"U","1d8":"u","1d9":"U","1da":"u","1db":"U","1dc":"u","1dd":"e","1de":"A","1df":"a","1e0":"A","1e1":"a","1e2":"AE","1e3":"ae","1e4":"G","1e5":"g","1e6":"G","1e7":"g","1e8":"K","1e9":"k","1ea":"Q","1eb":"q","1ec":"Q","1ed":"q","1ee":"3","1ef":"3","1f0":"J","1f1":"dz","1f2":"dZ","1f3":"DZ","1f4":"g","1f5":"G","1f6":"h","1f7":"p","1f8":"N","1f9":"n","1fa":"A","1fb":"a","1fc":"AE","1fd":"ae","1fe":"O","1ff":"o","20a":"I","20b":"i","20c":"O","20d":"o","20e":"O","20f":"o","21a":"T","21b":"t","21c":"3","21d":"3","21e":"H","21f":"h","22a":"O","22b":"o","22c":"O","22d":"o","22e":"O","22f":"o","23a":"A","23b":"C","23c":"c","23d":"L","23e":"T","23f":"s","24a":"Q","24b":"q","24c":"R","24d":"r","24e":"Y","24f":"y","25a":"e","25b":"3","25c":"3","25d":"3","25e":"3","25f":"j","26a":"i","26b":"I","26c":"I","26d":"I","26e":"h","26f":"w","27a":"R","27b":"r","27c":"R","27d":"R","27e":"r","27f":"r","28a":"u","28b":"v","28c":"A","28d":"M","28e":"Y","28f":"Y","29a":"B","29b":"G","29c":"H","29d":"j","29e":"K","29f":"L","2a0":"q","2a1":"?","2a2":"c","2a3":"dz","2a4":"d3","2a5":"dz","2a6":"ts","2a7":"tf","2a8":"tc","2a9":"fn","2aa":"ls","2ab":"lz","2ac":"ww","2ae":"u","2af":"u","2b0":"h","2b1":"h","2b2":"j","2b3":"r","2b4":"r","2b5":"r","2b6":"R","2b7":"W","2b8":"Y","2df":"x","2e0":"Y","2e1":"1","2e2":"s","2e3":"x","2e4":"c","36a":"h","36b":"m","36c":"r","36d":"t","36e":"v","36f":"x","37b":"c","37c":"c","37d":"c","38a":"I","38c":"O","38e":"Y","38f":"O","39a":"K","39b":"A","39c":"M","39d":"N","39e":"E","39f":"O","3a0":"TT","3a1":"P","3a3":"E","3a4":"T","3a5":"Y","3a6":"O","3a7":"X","3a8":"Y","3a9":"O","3aa":"I","3ab":"Y","3ac":"a","3ad":"e","3ae":"n","3af":"i","3b0":"v","3b1":"a","3b2":"b","3b3":"y","3b4":"d","3b5":"e","3b6":"c","3b7":"n","3b8":"0","3b9":"1","3ba":"k","3bb":"j","3bc":"u","3bd":"v","3be":"c","3bf":"o","3c0":"tt","3c1":"p","3c2":"s","3c3":"o","3c4":"t","3c5":"u","3c6":"q","3c7":"X","3c8":"Y","3c9":"w","3ca":"i","3cb":"u","3cc":"o","3cd":"u","3ce":"w","3d0":"b","3d1":"e","3d2":"Y","3d3":"Y","3d4":"Y","3d5":"O","3d6":"w","3d7":"x","3d8":"Q","3d9":"q","3da":"C","3db":"c","3dc":"F","3dd":"f","3de":"N","3df":"N","3e2":"W","3e3":"w","3e4":"q","3e5":"q","3e6":"h","3e7":"e","3e8":"S","3e9":"s","3ea":"X","3eb":"x","3ec":"6","3ed":"6","3ee":"t","3ef":"t","3f0":"x","3f1":"e","3f2":"c","3f3":"j","3f4":"O","3f5":"E","3f6":"E","3f7":"p","3f8":"p","3f9":"C","3fa":"M","3fb":"M","3fc":"p","3fd":"C","3fe":"C","3ff":"C","40a":"Hb","40b":"Th","40c":"K","40d":"N","40e":"Y","40f":"U","41a":"K","41b":"L","41c":"M","41d":"N","41e":"O","41f":"P","42a":"","42b":"Y","42c":"","42d":"E","42e":"U","42f":"YA","43a":"k","43b":"l","43c":"m","43d":"n","43e":"o","43f":"p","44a":"","44b":"y","44c":"","44d":"e","44e":"u","44f":"ya","45a":"Hb","45b":"h","45c":"k","45d":"n","45e":"y","45f":"u","46a":"mY","46b":"my","46c":"Im","46d":"Im","46e":"3","46f":"3","47a":"O","47b":"o","47c":"W","47d":"w","47e":"W","47f":"W","48a":"H","48b":"H","48c":"B","48d":"b","48e":"P","48f":"p","49a":"K","49b":"k","49c":"K","49d":"k","49e":"K","49f":"k","4a0":"K","4a1":"k","4a2":"H","4a3":"h","4a4":"H","4a5":"h","4a6":"Ih","4a7":"ih","4a8":"O","4a9":"o","4aa":"C","4ab":"c","4ac":"T","4ad":"t","4ae":"Y","4af":"y","4b0":"Y","4b1":"y","4b2":"X","4b3":"x","4b4":"TI","4b5":"ti","4b6":"H","4b7":"h","4b8":"H","4b9":"h","4ba":"H","4bb":"h","4bc":"E","4bd":"e","4be":"E","4bf":"e","4c0":"I","4c1":"X","4c2":"x","4c3":"K","4c4":"k","4c5":"jt","4c6":"jt","4c7":"H","4c8":"h","4c9":"H","4ca":"h","4cb":"H","4cc":"h","4cd":"M","4ce":"m","4cf":"l","4d0":"A","4d1":"a","4d2":"A","4d3":"a","4d4":"AE","4d5":"ae","4d6":"E","4d7":"e","4d8":"e","4d9":"e","4da":"E","4db":"e","4dc":"X","4dd":"X","4de":"3","4df":"3","4e0":"3","4e1":"3","4e2":"N","4e3":"n","4e4":"N","4e5":"n","4e6":"O","4e7":"o","4e8":"O","4e9":"o","4ea":"O","4eb":"o","4ec":"E","4ed":"e","4ee":"Y","4ef":"y","4f0":"Y","4f1":"y","4f2":"Y","4f3":"y","4f4":"H","4f5":"h","4f6":"R","4f7":"r","4f8":"bI","4f9":"bi","4fa":"F","4fb":"f","4fc":"X","4fd":"x","4fe":"X","4ff":"x","50a":"H","50b":"h","50c":"G","50d":"g","50e":"T","50f":"t","51a":"Q","51b":"q","51c":"W","51d":"w","53a":"d","53b":"r","53c":"L","53d":"Iu","53e":"O","53f":"y","54a":"m","54b":"o","54c":"N","54d":"U","54e":"Y","54f":"S","56a":"d","56b":"h","56c":"l","56d":"lu","56e":"d","56f":"y","57a":"w","57b":"2","57c":"n","57d":"u","57e":"y","57f":"un","5f":"_"};
|
5
|
+
|
6
|
+
var str = "";
|
7
|
+
for(var i = 0; i<v.length; i++){
|
8
|
+
str += map[ v.charCodeAt(i).toString(16) ] || "";
|
9
|
+
}
|
10
|
+
if(!sep) sep = '-'
|
11
|
+
return str.toLowerCase().replace(/_-+/g, sep).replace(/^-|-$/g, '');
|
12
|
+
}
|
13
|
+
|
14
|
+
(function ($) {
|
15
|
+
|
16
|
+
$.fn.slugify = function (source, options) {
|
17
|
+
var $target = this;
|
18
|
+
var $source = $(source);
|
19
|
+
var targetIsInput = $target.is('input') || $target.is('textarea');
|
20
|
+
|
21
|
+
var settings = $.extend({
|
22
|
+
slugFunc: (function (val, originalFunc) { return originalFunc(val); }),
|
23
|
+
change: function(){}
|
24
|
+
}, options);
|
25
|
+
|
26
|
+
|
27
|
+
var convertToSlug = function(val) {
|
28
|
+
return settings.slugFunc(val, (slugFunc)
|
29
|
+
);
|
30
|
+
};
|
31
|
+
|
32
|
+
var setLock = function () {
|
33
|
+
if($target.val() !== null && $target.val() !== '') {
|
34
|
+
$target.addClass('slugify-locked');
|
35
|
+
} else {
|
36
|
+
$target.removeClass('slugify-locked');
|
37
|
+
}
|
38
|
+
};
|
39
|
+
|
40
|
+
var updateSlug = function () {
|
41
|
+
var slug = convertToSlug($(this).val());
|
42
|
+
if (targetIsInput) {
|
43
|
+
$target.filter(':not(.slugify-locked)').val(slug);
|
44
|
+
} else {
|
45
|
+
$target.filter(':not(.slugify-locked)').text(slug);
|
46
|
+
}
|
47
|
+
if(settings.change && $target.filter(':not(.slugify-locked)').size() > 0){
|
48
|
+
settings.change(slug);
|
49
|
+
}
|
50
|
+
};
|
51
|
+
|
52
|
+
|
53
|
+
$source.keyup( updateSlug ).change( updateSlug );
|
54
|
+
|
55
|
+
$target.change(function () {
|
56
|
+
var slug = convertToSlug($(this).val());
|
57
|
+
// var slug = $(this).val();
|
58
|
+
$target.val(slug).text(slug);
|
59
|
+
setLock();
|
60
|
+
});
|
61
|
+
|
62
|
+
setLock();
|
63
|
+
|
64
|
+
return this;
|
65
|
+
};
|
66
|
+
|
67
|
+
})(jQuery);
|
File without changes
|
@@ -0,0 +1,339 @@
|
|
1
|
+
function log(d) {
|
2
|
+
if (console.log)console.log(d);
|
3
|
+
}
|
4
|
+
|
5
|
+
// prepend flash message into current element
|
6
|
+
// message: text message
|
7
|
+
// kind: string kind of message, default danger (success, danger, info, warning)
|
8
|
+
// sample: $("my_ele").flash_message("updated", "success");
|
9
|
+
jQuery(function(){
|
10
|
+
$.fn.flash_message = function(message, kind){
|
11
|
+
if(!kind) kind = !message ? "success" : "danger";
|
12
|
+
if(!message) message = I18n("msg.success_action", "Action completed successfully.");
|
13
|
+
var msg = '<div class="alert alert-'+kind+'"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> '+message+' </div>';
|
14
|
+
$(this).prepend(msg);
|
15
|
+
return this;
|
16
|
+
}
|
17
|
+
});
|
18
|
+
|
19
|
+
/****************** form validations ************/
|
20
|
+
// panel can be a object: $("#my_form")
|
21
|
+
// if panel is null, then this will be replaced by body
|
22
|
+
var init_form_validations = function (form) {
|
23
|
+
// slug management
|
24
|
+
// you need to add class no_translate to avoid translations in slugs
|
25
|
+
(form ? form : $('#admin_content')).find('input.slug').each(function () {
|
26
|
+
var sl_id = $(this).attr("data-parent");
|
27
|
+
if (!sl_id) return;
|
28
|
+
var $parent = $('#' + sl_id);
|
29
|
+
if ($parent.hasClass('translated-item')) {
|
30
|
+
var $panel_parent = $parent.siblings('.trans_panel:first');
|
31
|
+
if ($(this).hasClass("no_translate")) {
|
32
|
+
$(this).slugify('#' + $panel_parent.find('.tab-content .tab-pane:first input:first').attr('id'));
|
33
|
+
} else {
|
34
|
+
$(this).addClass('translatable').Translatable(ADMIN_TRANSLATIONS);
|
35
|
+
var $panel_slug = $(this).siblings('.trans_panel:first');
|
36
|
+
$panel_parent.find('.tab-content .tab-pane').each(function (index, tab_pane) {
|
37
|
+
var p_id = $(tab_pane).children('input').attr('id');
|
38
|
+
$panel_slug.find('.tab-content .tab-pane:eq(' + index + ') input:first').slugify('#' + p_id);
|
39
|
+
})
|
40
|
+
$panel_parent.find('.nav > li a').each(function (index, a_tab) {
|
41
|
+
$(a_tab).click(function () {
|
42
|
+
$panel_slug.find('.nav > li:eq(' + index + ') a').click()
|
43
|
+
})
|
44
|
+
})
|
45
|
+
}
|
46
|
+
} else {
|
47
|
+
$(this).slugify('#' + sl_id);
|
48
|
+
}
|
49
|
+
});
|
50
|
+
|
51
|
+
(form ? form : $('#admin_content form')).each(function () {
|
52
|
+
var $form = $(this)
|
53
|
+
if ($form.find('.translatable').size() > 0) {
|
54
|
+
$form.find('.translatable').Translatable();
|
55
|
+
}
|
56
|
+
}).filter(".validate").each(function () {
|
57
|
+
$(this).validate()
|
58
|
+
});
|
59
|
+
};
|
60
|
+
|
61
|
+
|
62
|
+
!(function ($) {
|
63
|
+
// serialize form into json
|
64
|
+
jQuery.fn.serializeObject = function () {
|
65
|
+
var json = {};
|
66
|
+
jQuery.map(jQuery(this).serializeArray(), function (n, i) {
|
67
|
+
var __i = n.name.indexOf('[');
|
68
|
+
if (__i > -1) {
|
69
|
+
var o = json;
|
70
|
+
_name = n.name.replace(/\]/gi, '').split('[');
|
71
|
+
for (var i = 0, len = _name.length; i < len; i++) {
|
72
|
+
if (i == len - 1) {
|
73
|
+
if (o[_name[i]] && $.trim(_name[i]) == '') {
|
74
|
+
if (typeof o[_name[i]] == 'string') {
|
75
|
+
o[_name[i]] = [o[_name[i]]];
|
76
|
+
}
|
77
|
+
o[_name[i]].push(n.value);
|
78
|
+
}
|
79
|
+
else o[_name[i]] = n.value || '';
|
80
|
+
}
|
81
|
+
else o = o[_name[i]] = o[_name[i]] || {};
|
82
|
+
}
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
if (json[n.name] !== undefined) {
|
86
|
+
if (!json[n.name].push) {
|
87
|
+
json[n.name] = [json[n.name]];
|
88
|
+
}
|
89
|
+
json[n.name].push(n.value || '');
|
90
|
+
}
|
91
|
+
else json[n.name] = n.value || '';
|
92
|
+
}
|
93
|
+
});
|
94
|
+
return json;
|
95
|
+
};
|
96
|
+
})(jQuery);
|
97
|
+
|
98
|
+
|
99
|
+
// file uploader
|
100
|
+
(function ($) {
|
101
|
+
$.fn.input_upload = function (options_init) {
|
102
|
+
var default_options = {label: I18n("msg.upload_image"), type: "image", ext: "none", icon: "upload", full_url: true, height: '100px'};
|
103
|
+
default_options = $.extend({}, default_options, options_init || {});
|
104
|
+
$(this).each(function () {
|
105
|
+
var $that = $(this);
|
106
|
+
var options = $.extend({}, default_options, $that.data() || {});
|
107
|
+
var $content_image = $("<div class='content-upload-plugin'><a href='#' target='_blank'><img src=''><strong></strong></a></div>").hide();
|
108
|
+
if (options.type != 'image') $content_image.find('img').remove();
|
109
|
+
var $btn_upload = $('<a class="btn btn-default" href="#"><i class="fa fa-upload"></i> ' + options.label + '</a>')
|
110
|
+
$content_image.find('img').css('max-height', options.height);
|
111
|
+
|
112
|
+
$btn_upload.click(function () {
|
113
|
+
$.fn.upload_filemanager({
|
114
|
+
formats: options.type,
|
115
|
+
selected: function (file, response) {
|
116
|
+
set_texts(file.url);
|
117
|
+
}
|
118
|
+
});
|
119
|
+
return false;
|
120
|
+
});
|
121
|
+
|
122
|
+
$that.after($content_image).after($btn_upload);
|
123
|
+
|
124
|
+
function set_texts(url) {
|
125
|
+
$content_image.find('img').attr('src', url);
|
126
|
+
$content_image.find('a').attr('href', url);
|
127
|
+
$that.val(url).trigger("change");
|
128
|
+
$content_image.find('strong').html(_.last(url.split('/')));
|
129
|
+
$content_image.show()
|
130
|
+
}
|
131
|
+
|
132
|
+
if ($that.val()) set_texts($that.val())
|
133
|
+
});
|
134
|
+
};
|
135
|
+
|
136
|
+
// create inline input file uploader with an icon to upload file
|
137
|
+
// options: all options needed for uploader
|
138
|
+
// you can add an attribute "data-format" in the input to define the file formats required
|
139
|
+
$.fn.input_upload_field = function (options) {
|
140
|
+
this.each(function () {
|
141
|
+
var input = $(this);
|
142
|
+
var def = {
|
143
|
+
formats: (input.attr("data-format") || "image"),
|
144
|
+
selected: function (file) {
|
145
|
+
input.val(file.url);
|
146
|
+
}
|
147
|
+
};
|
148
|
+
if (!input.parent().hasClass("input-group")) {
|
149
|
+
input.wrap('<div class="group-input-fields-content input-group"></div>');
|
150
|
+
input.after('<span class="input-group-addon btn_upload"><i class="fa fa-upload"></i> </span>');
|
151
|
+
input.addClass("form-control");
|
152
|
+
}
|
153
|
+
input.next("span").click(function () {
|
154
|
+
$.fn.upload_filemanager($.extend({}, def, (options || {})));
|
155
|
+
});
|
156
|
+
});
|
157
|
+
}
|
158
|
+
})(jQuery);
|
159
|
+
|
160
|
+
// jquery custom validations and default values
|
161
|
+
(function ($) {
|
162
|
+
|
163
|
+
// file formats
|
164
|
+
$.file_formats = {
|
165
|
+
jpg: "image",
|
166
|
+
gif: "image",
|
167
|
+
png: "image",
|
168
|
+
bmp: "image",
|
169
|
+
jpeg: "image",
|
170
|
+
|
171
|
+
mp3: "audio",
|
172
|
+
ogg: "audio",
|
173
|
+
mid: "audio",
|
174
|
+
mod: "audio",
|
175
|
+
wav: "audio",
|
176
|
+
|
177
|
+
mp4: "video",
|
178
|
+
wmv: "video",
|
179
|
+
avi: "video",
|
180
|
+
swf: "video",
|
181
|
+
mov: "video",
|
182
|
+
mpeg: "video",
|
183
|
+
mjpg: "video"
|
184
|
+
}
|
185
|
+
|
186
|
+
// return the video id of a video url
|
187
|
+
// http://lasnv.net/foro/839/Javascript_parsear_URL_de_YouTube
|
188
|
+
$.cama_youtube_key = function(url){
|
189
|
+
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
|
190
|
+
var match = url.match(regExp);
|
191
|
+
var b = false;
|
192
|
+
if (match&&match[7].length==11){
|
193
|
+
b=match[7];
|
194
|
+
}
|
195
|
+
return b;
|
196
|
+
}
|
197
|
+
|
198
|
+
// verify the url for youtube, vimeo...
|
199
|
+
// return youtube | metcafe|dailymotion|vimeo
|
200
|
+
$.cama_check_video_url = function (url) {
|
201
|
+
var regYoutube = new RegExp(/^.*((youtu.be\/)|(v\/)|(\/u\/w\/)|(embed\/)|(watch?))??v?=?([^#&?]*).*/);
|
202
|
+
var regVimeo = new RegExp(/^.*(vimeo.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/);
|
203
|
+
var regDailymotion = new RegExp(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);
|
204
|
+
var regMetacafe = new RegExp(/^.*(metacafe.com)(\/watch\/)(d+)(.*)/i);
|
205
|
+
if (regYoutube.test(url)) {
|
206
|
+
return 'youtube';
|
207
|
+
} else if (regMetacafe.test(url)) {
|
208
|
+
return 'metacafe';
|
209
|
+
} else if (regDailymotion.test(url)) {
|
210
|
+
return 'dailymotion';
|
211
|
+
} else if (regVimeo.test(url)) {
|
212
|
+
return 'vimeo';
|
213
|
+
} else {
|
214
|
+
return false;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
// helper validate only letters latin
|
219
|
+
var regex = /^[a-z\sÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏàáâãäåæçèéêëìíîïÐÑÒÓÔÕÖØÙÚÛÜÝÞßðñòóôõöøùúûüýþÿ]+$/i;
|
220
|
+
jQuery.validator.addMethod("lettersonly", function (value, element) {
|
221
|
+
return this.optional(element) || regex.test(value);
|
222
|
+
}, "Only alphabetical characters");
|
223
|
+
|
224
|
+
/************ Custom jquery validation as defaults ***************/
|
225
|
+
jQuery.validator.setDefaults({
|
226
|
+
focusInvalid: true, ignore: ".translated-item", errorPlacement: function (a, b) {
|
227
|
+
if (!a.text()) return;
|
228
|
+
if (b.parent().hasClass('trans_tab_item')) { // tabs
|
229
|
+
var parent = b.parent();
|
230
|
+
$("a[href='#" + parent.attr('id') + "']").addClass('has-error').trigger('click');
|
231
|
+
parent.addClass('has-error').append(a.addClass('help-block'));
|
232
|
+
} else if (b.parent().hasClass('form-group')) {
|
233
|
+
b.parent().addClass('has-error').append(a.addClass('help-block'));
|
234
|
+
} else {
|
235
|
+
if (b.attr('name') == 'categories[]')
|
236
|
+
b.parent().before(a.addClass('help-block')).parent().addClass('has-error');
|
237
|
+
else
|
238
|
+
b.parent().after(a.addClass('help-block')).parent().addClass('has-error');
|
239
|
+
}
|
240
|
+
}, success: function (error, element) {
|
241
|
+
$(element).parent().removeClass('has-error').parent().removeClass('has-error')
|
242
|
+
if ($(element).parent().hasClass('tab-pane')) $("a[href='#" + $(element).parent().attr('id') + "']").removeClass('has-error');
|
243
|
+
}
|
244
|
+
});
|
245
|
+
|
246
|
+
// validate file extension defined in data-formats
|
247
|
+
// data-formats: (default '') image | audio | video (support also external youtube metacafe, dailymotion, vimeo) | or file extension like: jpg|png
|
248
|
+
$.validator.addMethod("file_format", function (value, element) {
|
249
|
+
var formats = $(element).attr("data-formats");
|
250
|
+
var ext = value.split(".").pop().toLowerCase();
|
251
|
+
if (formats)
|
252
|
+
return ($.inArray("video", formats.split(",")) >= 0 && $.cama_check_video_url(value)) || $.inArray($.file_formats[ext], formats.split(",")) >= 0 || $.inArray(ext, formats.split(",")) >= 0
|
253
|
+
|
254
|
+
return true;
|
255
|
+
}, "File format not accepted.");
|
256
|
+
jQuery.validator.addClassRules({
|
257
|
+
file_format: {file_format: true}
|
258
|
+
});
|
259
|
+
})(jQuery);
|
260
|
+
|
261
|
+
// convert string into hashcode
|
262
|
+
String.prototype.hashCode = function () {
|
263
|
+
var message = this;
|
264
|
+
if (message == "") {
|
265
|
+
return "";
|
266
|
+
}
|
267
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/_-".split("");
|
268
|
+
var length = 40;
|
269
|
+
for (var last = 0, i = 0, len = message.length; i < len; i++) {
|
270
|
+
last = (message.charCodeAt(i) + 31 * last) % 59;
|
271
|
+
}
|
272
|
+
length = length || message.length;
|
273
|
+
while (len < length) {
|
274
|
+
message += message;
|
275
|
+
len += len;
|
276
|
+
}
|
277
|
+
message = message.slice(0, length);
|
278
|
+
for (var ret = "", i = 0; i < length; i++) {
|
279
|
+
ret += chars[last = (i + last + message.charCodeAt(i)) % 64];
|
280
|
+
}
|
281
|
+
return ret;
|
282
|
+
};
|
283
|
+
|
284
|
+
// convert string path into full url
|
285
|
+
String.prototype.to_url = function () {
|
286
|
+
return root_url.slice(0, root_url.length - 1) + this;
|
287
|
+
};
|
288
|
+
// jquery browser supoer
|
289
|
+
!function (a) {
|
290
|
+
"function" == typeof define && define.amd ? define(["jquery"], function (b) {
|
291
|
+
a(b)
|
292
|
+
}) : "object" == typeof module && "object" == typeof module.exports ? module.exports = a(require("jquery")) : a(window.jQuery)
|
293
|
+
}(function (a) {
|
294
|
+
"use strict";
|
295
|
+
function b(a) {
|
296
|
+
void 0 === a && (a = window.navigator.userAgent), a = a.toLowerCase();
|
297
|
+
var b = /(edge)\/([\w.]+)/.exec(a) || /(opr)[\/]([\w.]+)/.exec(a) || /(chrome)[ \/]([\w.]+)/.exec(a) || /(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a) || /(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a) || /(webkit)[ \/]([\w.]+)/.exec(a) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a) || /(msie) ([\w.]+)/.exec(a) || a.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec(a) || a.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a) || [], c = /(ipad)/.exec(a) || /(ipod)/.exec(a) || /(iphone)/.exec(a) || /(kindle)/.exec(a) || /(silk)/.exec(a) || /(android)/.exec(a) || /(windows phone)/.exec(a) || /(win)/.exec(a) || /(mac)/.exec(a) || /(linux)/.exec(a) || /(cros)/.exec(a) || /(playbook)/.exec(a) || /(bb)/.exec(a) || /(blackberry)/.exec(a) || [], d = {}, e = {
|
298
|
+
browser: b[5] || b[3] || b[1] || "",
|
299
|
+
version: b[2] || b[4] || "0",
|
300
|
+
versionNumber: b[4] || b[2] || "0",
|
301
|
+
platform: c[0] || ""
|
302
|
+
};
|
303
|
+
if (e.browser && (d[e.browser] = !0, d.version = e.version, d.versionNumber = parseInt(e.versionNumber, 10)), e.platform && (d[e.platform] = !0), (d.android || d.bb || d.blackberry || d.ipad || d.iphone || d.ipod || d.kindle || d.playbook || d.silk || d["windows phone"]) && (d.mobile = !0), (d.cros || d.mac || d.linux || d.win) && (d.desktop = !0), (d.chrome || d.opr || d.safari) && (d.webkit = !0), d.rv || d.edge) {
|
304
|
+
var f = "msie";
|
305
|
+
e.browser = f, d[f] = !0
|
306
|
+
}
|
307
|
+
if (d.safari && d.blackberry) {
|
308
|
+
var g = "blackberry";
|
309
|
+
e.browser = g, d[g] = !0
|
310
|
+
}
|
311
|
+
if (d.safari && d.playbook) {
|
312
|
+
var h = "playbook";
|
313
|
+
e.browser = h, d[h] = !0
|
314
|
+
}
|
315
|
+
if (d.bb) {
|
316
|
+
var i = "blackberry";
|
317
|
+
e.browser = i, d[i] = !0
|
318
|
+
}
|
319
|
+
if (d.opr) {
|
320
|
+
var j = "opera";
|
321
|
+
e.browser = j, d[j] = !0
|
322
|
+
}
|
323
|
+
if (d.safari && d.android) {
|
324
|
+
var k = "android";
|
325
|
+
e.browser = k, d[k] = !0
|
326
|
+
}
|
327
|
+
if (d.safari && d.kindle) {
|
328
|
+
var l = "kindle";
|
329
|
+
e.browser = l, d[l] = !0
|
330
|
+
}
|
331
|
+
if (d.safari && d.silk) {
|
332
|
+
var m = "silk";
|
333
|
+
e.browser = m, d[m] = !0
|
334
|
+
}
|
335
|
+
return d.name = e.browser, d.platform = e.platform, d
|
336
|
+
}
|
337
|
+
|
338
|
+
return window.jQBrowser = b(window.navigator.userAgent), window.jQBrowser.uaMatch = b, a && (a.browser = window.jQBrowser), window.jQBrowser
|
339
|
+
});
|