locomotive_cms 0.0.2.5 → 0.0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/asset_collections_controller.rb +1 -1
- data/app/controllers/admin/contents_controller.rb +1 -1
- data/app/controllers/admin/current_sites_controller.rb +2 -3
- data/app/controllers/admin/custom_fields_controller.rb +11 -5
- data/app/controllers/admin/layouts_controller.rb +2 -1
- data/app/controllers/admin/sites_controller.rb +0 -11
- data/app/controllers/admin/snippets_controller.rb +1 -1
- data/app/controllers/application_controller.rb +1 -1
- data/app/helpers/admin/custom_fields_helper.rb +14 -2
- data/app/helpers/admin/pages_helper.rb +10 -0
- data/app/models/asset_collection.rb +1 -1
- data/app/models/content_instance.rb +8 -0
- data/app/models/content_type.rb +25 -0
- data/app/models/page.rb +6 -2
- data/app/models/site.rb +3 -1
- data/app/views/admin/asset_collections/edit.html.haml +1 -1
- data/app/views/admin/assets/_form.html.haml +5 -6
- data/app/views/admin/content_types/_form.html.haml +6 -2
- data/app/views/admin/content_types/edit.html.haml +2 -2
- data/app/views/admin/contents/_form.html.haml +2 -17
- data/app/views/admin/contents/_list.html.haml +16 -0
- data/app/views/admin/contents/index.html.haml +6 -14
- data/app/views/admin/current_sites/_form.html.haml +6 -1
- data/app/views/admin/custom_fields/_custom_form.html.haml +18 -0
- data/app/views/admin/custom_fields/_edit_field.html.haml +3 -2
- data/app/views/admin/custom_fields/_index.html.haml +10 -6
- data/app/views/admin/custom_fields/edit_category.html.haml +1 -1
- data/app/views/admin/layouts/_form.html.haml +1 -1
- data/app/views/admin/pages/_form.html.haml +1 -4
- data/app/views/admin/shared/menu/_contents.html.haml +1 -1
- data/app/views/admin/sites/_form.html.haml +1 -1
- data/config/locales/admin_ui_en.yml +27 -5
- data/config/routes.rb +4 -4
- data/lib/locomotive.rb +2 -3
- data/lib/locomotive/liquid/drops/base.rb +2 -0
- data/lib/locomotive/liquid/drops/content.rb +1 -3
- data/lib/locomotive/liquid/drops/contents.rb +6 -1
- data/lib/locomotive/liquid/drops/page.rb +19 -0
- data/lib/locomotive/patches.rb +1 -2
- data/lib/locomotive/render.rb +9 -7
- data/lib/locomotive/routing/default_constraint.rb +3 -9
- data/lib/locomotive/routing/site_dispatcher.rb +8 -14
- data/public/javascripts/admin/application.js +13 -2
- data/public/javascripts/admin/asset_collections.js +1 -0
- data/public/javascripts/admin/assets.js +5 -0
- data/public/javascripts/admin/contents.js +7 -15
- data/public/javascripts/admin/custom_fields.js +18 -4
- data/public/javascripts/admin/custom_fields/category.js +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/langs/en.js +170 -0
- data/public/javascripts/admin/plugins/tiny_mce/license.txt +504 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/rule.htm +57 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/image.htm +232 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/js/image.js +443 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/js/advlink.js +528 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/link.htm +333 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autoresize/editor_plugin_src.js +119 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autosave/editor_plugin_src.js +422 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/contextmenu/editor_plugin_src.js +147 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/emotions.htm +40 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/dialog.htm +22 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/img/example.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/langs/en.js +3 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/editor_plugin_src.js +153 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/fullpage.htm +571 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/js/fullpage.js +471 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullscreen/editor_plugin_src.js +151 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/layer/editor_plugin_src.js +212 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +136 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/css/content.css +6 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/css/media.css +16 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/editor_plugin_src.js +414 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/flash.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/flv_player.swf +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/quicktime.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/realmedia.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/shockwave.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/trans.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/js/embed.js +73 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/js/media.js +630 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/media.htm +817 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/noneditable/editor_plugin_src.js +90 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/css/content.css +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/editor_plugin_src.js +77 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/editor_plugin_src.js +940 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/example.html +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/preview.html +17 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/editor_plugin_src.js +57 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/js/searchreplace.js +130 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/searchreplace.htm +99 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/editor_plugin_src.js +417 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/css/props.css +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/js/props.js +641 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/props.htm +723 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/tabfocus/editor_plugin_src.js +112 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/cell.htm +178 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/css/cell.css +17 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/css/row.css +25 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/css/table.css +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/editor_plugin_src.js +1125 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/cell.js +286 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/row.js +237 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/table.js +449 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/row.htm +155 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/table.htm +187 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/blank.htm +12 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/css/template.css +23 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/js/template.js +106 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/template.htm +31 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/visualchars/editor_plugin_src.js +76 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/abbr.htm +141 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/acronym.htm +141 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/attributes.htm +148 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/cite.htm +141 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/del.htm +161 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +144 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/ins.htm +161 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/attributes.js +126 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/del.js +63 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/ins.js +62 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/about.htm +54 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/charmap.htm +52 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/color_picker.htm +73 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/editor_template_src.js +1194 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/image.htm +80 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/about.js +72 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/image.js +245 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/link.js +156 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/source_editor.js +62 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/link.htm +58 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/content.css +35 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/dialog.css +117 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/buttons.png +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/items.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu_arrow.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu_check.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/progress.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/tabs.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/ui.css +213 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/source_editor.htm +25 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/editor_template.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/editor_template_src.js +85 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/langs/en.js +11 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/public/javascripts/admin/plugins/tiny_mce/tiny_mce.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/tiny_mce_popup.js +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/tiny_mce_src.js +13374 -0
- data/public/javascripts/admin/plugins/tiny_mce/tinymce.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/editable_selects.js +70 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/form_utils.js +200 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/mctabs.js +77 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/validate.js +220 -0
- data/public/stylesheets/admin/box.css +8 -0
- data/public/stylesheets/admin/formtastic_changes.css +15 -0
- data/public/stylesheets/admin/plugins/tiny_mce.css +105 -0
- data/spec/lib/locomotive/liquid/drops/contents_spec.rb +33 -0
- data/spec/lib/locomotive/liquid/drops/page_spec.rb +48 -0
- data/spec/lib/locomotive/render_spec.rb +12 -3
- data/vendor/plugins/custom_fields/Gemfile +1 -1
- data/vendor/plugins/custom_fields/lib/custom_fields.rb +3 -0
- data/vendor/plugins/custom_fields/lib/custom_fields/field.rb +9 -15
- data/vendor/plugins/custom_fields/lib/custom_fields/types/boolean.rb +29 -0
- data/vendor/plugins/custom_fields/lib/custom_fields/types/category.rb +15 -3
- data/vendor/plugins/custom_fields/lib/custom_fields/types/default.rb +21 -2
- data/vendor/plugins/custom_fields/lib/custom_fields/types/string.rb +13 -0
- data/vendor/plugins/custom_fields/lib/custom_fields/types/text.rb +15 -0
- data/vendor/plugins/custom_fields/spec/models/project.rb +2 -0
- data/vendor/plugins/custom_fields/spec/unit/types/boolean_spec.rb +81 -0
- data/vendor/plugins/custom_fields/spec/unit/types/category_spec.rb +15 -0
- metadata +251 -4
- data/lib/locomotive/devise/sessions_controller.rb +0 -2
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
= form_tag '#', :class => 'formtastic' do
|
6
6
|
= fields_for CustomFields::Field.new, :builder => Formtastic::SemanticFormHelper.builder do |g|
|
7
|
-
= g.inputs :name => :
|
7
|
+
= g.inputs :name => :attributes do
|
8
8
|
= g.input :_alias
|
9
|
-
= g.input :hint
|
9
|
+
= g.input :hint
|
10
|
+
= g.input :text_formatting, :as => 'select', :collection => options_for_text_formatting, :include_blank => false
|
@@ -1,11 +1,11 @@
|
|
1
1
|
- collection_name = "#{collection_name.singularize}_custom_fields"
|
2
|
-
- custom_fields =
|
3
|
-
- ordered_custom_fields =
|
2
|
+
- custom_fields = form.object.send(collection_name.to_sym)
|
3
|
+
- ordered_custom_fields = form.object.send(:"ordered_#{collection_name}")
|
4
4
|
|
5
|
-
=
|
5
|
+
= form.foldable_inputs :name => :custom_fields, :class => 'editable-list fields' do
|
6
6
|
- ordered_custom_fields.each do |field|
|
7
|
-
=
|
8
|
-
%li{ :class => "item added #{'new' if
|
7
|
+
= form.fields_for collection_name.to_sym, field, :child_index => field._index do |g|
|
8
|
+
%li{ :class => "item added #{'new' if form.object.new_record?} #{'error' unless field.errors.empty?}"}
|
9
9
|
%span.handle
|
10
10
|
= image_tag 'admin/form/icons/drag.png'
|
11
11
|
|
@@ -14,6 +14,8 @@
|
|
14
14
|
= g.hidden_field :_alias, :class => 'alias'
|
15
15
|
|
16
16
|
= g.hidden_field :hint, :class => 'hint'
|
17
|
+
|
18
|
+
= g.hidden_field :text_formatting, :class => 'text-formatting'
|
17
19
|
|
18
20
|
= g.text_field :label, :class => 'label'
|
19
21
|
|
@@ -29,7 +31,7 @@
|
|
29
31
|
= link_to image_tag('admin/form/pen.png'), '#edit-custom-field', :class => 'edit first'
|
30
32
|
= link_to image_tag('admin/form/icons/trash.png'), '#', :class => 'remove', :confirm => t('admin.messages.confirm')
|
31
33
|
|
32
|
-
=
|
34
|
+
= form.fields_for collection_name.to_sym, custom_fields.build(:label => 'field name', :_alias => ''), :child_index => '-1' do |g|
|
33
35
|
%li{ :class => 'item template' }
|
34
36
|
%span.handle
|
35
37
|
= image_tag 'admin/form/icons/drag.png'
|
@@ -39,6 +41,8 @@
|
|
39
41
|
= g.hidden_field :_alias, :class => 'alias'
|
40
42
|
|
41
43
|
= g.hidden_field :hint, :class => 'hint'
|
44
|
+
|
45
|
+
= g.hidden_field :text_formatting, :class => 'text-formatting'
|
42
46
|
|
43
47
|
= g.text_field :label, :class => 'string label void'
|
44
48
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
%p= t('.help')
|
6
6
|
|
7
|
-
= semantic_form_for @field, :as => :custom_field, :url => admin_custom_field_url(@
|
7
|
+
= semantic_form_for @field, :as => :custom_field, :url => admin_custom_field_url(@parent.model_name.underscore, @parent.slug, @field) do |f|
|
8
8
|
= f.foldable_inputs :name => t('.collection_label'), :class => 'editable-list off' do
|
9
9
|
- @field.ordered_category_items.each do |item|
|
10
10
|
= f.fields_for :category_items, item, :child_index => item._index do |g|
|
@@ -16,10 +16,7 @@
|
|
16
16
|
= f.custom_input :published, :css => 'toggle' do
|
17
17
|
= f.check_box :published
|
18
18
|
|
19
|
-
= f.
|
20
|
-
|
21
|
-
= f.input :keywords
|
22
|
-
= f.input :description
|
19
|
+
= f.input :cache_expires_in, :as => :select, :collection => options_for_page_cache_expiration, :include_blank => false
|
23
20
|
|
24
21
|
#page-parts
|
25
22
|
.nav
|
@@ -7,7 +7,7 @@
|
|
7
7
|
%ul
|
8
8
|
- current_site.pages.latest_updated.each do |page|
|
9
9
|
%li
|
10
|
-
= link_to truncate(page.title, :length =>
|
10
|
+
= link_to truncate(page.title, :length => 25), edit_admin_page_url(page)
|
11
11
|
%span= time_ago_in_words(page.updated_at)
|
12
12
|
|
13
13
|
- current_site.content_types.each do |content_type|
|
@@ -32,4 +32,4 @@
|
|
32
32
|
%span.actions
|
33
33
|
= link_to image_tag('admin/form/icons/trash.png'), '#', :class => 'remove first', :confirm => t('admin.messages.confirm')
|
34
34
|
%button{ :class => 'button light add', :type => 'button' }
|
35
|
-
%span= t('admin.buttons.new_item')
|
35
|
+
%span= t('admin.buttons.new_item')
|
@@ -39,12 +39,18 @@ en:
|
|
39
39
|
string: Simple Input
|
40
40
|
text: Text
|
41
41
|
category: Select
|
42
|
+
boolean: Checkbox
|
43
|
+
text_formatting:
|
44
|
+
none: None
|
45
|
+
html: HTML
|
42
46
|
edit_field:
|
43
47
|
title: Edit field
|
44
48
|
edit_category:
|
45
49
|
title: Edit options
|
46
50
|
help: Manage the list of options for your select box.
|
47
51
|
collection_label: List of options
|
52
|
+
custom_form:
|
53
|
+
edit_categories: Edit options
|
48
54
|
|
49
55
|
sessions:
|
50
56
|
new:
|
@@ -84,8 +90,16 @@ en:
|
|
84
90
|
successful_create: "Page was successfully created."
|
85
91
|
successful_update: "Page was successfully updated."
|
86
92
|
successful_destroy: "Page was successfully deleted."
|
93
|
+
successful_sort: "Pages were successfully sorted."
|
87
94
|
failed_create: "Page was not created."
|
88
95
|
failed_update: "Page was not updated."
|
96
|
+
form:
|
97
|
+
expiration:
|
98
|
+
never: Never
|
99
|
+
hour: 1 hour
|
100
|
+
day: 1 day
|
101
|
+
week: 1 week
|
102
|
+
month: 1 month
|
89
103
|
|
90
104
|
layouts:
|
91
105
|
index:
|
@@ -264,16 +278,16 @@ en:
|
|
264
278
|
edit: edit model
|
265
279
|
destroy: remove model
|
266
280
|
download: download items
|
267
|
-
new: new item
|
268
|
-
|
281
|
+
new: new item
|
282
|
+
category_noname: "No name"
|
269
283
|
lastest_items: "Lastest items"
|
270
284
|
updated_at: "Updated at"
|
285
|
+
list:
|
286
|
+
no_items: "There are no items for now. Just click <a href=\"{{url}}\">here</a> to create the first one."
|
271
287
|
new:
|
272
288
|
title: '{{type}} — new item'
|
273
289
|
edit:
|
274
290
|
title: '{{type}} — editing item'
|
275
|
-
form:
|
276
|
-
edit_categories: Edit options
|
277
291
|
messages:
|
278
292
|
successful_create: "Content was successfully created."
|
279
293
|
successful_update: "Content was successfully updated."
|
@@ -284,7 +298,7 @@ en:
|
|
284
298
|
formtastic:
|
285
299
|
titles:
|
286
300
|
information: General information
|
287
|
-
meta:
|
301
|
+
meta: SEO Metadata
|
288
302
|
code: Code
|
289
303
|
credentials: Credentials
|
290
304
|
language: Language
|
@@ -297,6 +311,8 @@ en:
|
|
297
311
|
options: Advanced options
|
298
312
|
custom_fields: Custom fields
|
299
313
|
other_fields: Other information
|
314
|
+
presentation: Presentation
|
315
|
+
attributes: Attributes
|
300
316
|
labels:
|
301
317
|
theme_asset:
|
302
318
|
new:
|
@@ -311,6 +327,8 @@ en:
|
|
311
327
|
page:
|
312
328
|
keywords: "Meta keywords used within the head tag of the page. They are separeted by an empty space. Required for SEO."
|
313
329
|
description: "Meta description used within the head tag of the page. Required for SEO."
|
330
|
+
published: "Only authenticated accounts can view unpublished pages."
|
331
|
+
cache_expires_in: "Cache the page for better performance. Pressing shift-reload in the browser will regenerate the page."
|
314
332
|
snippet:
|
315
333
|
slug: "You need to know it in order to insert the snippet inside a page or a layout"
|
316
334
|
site:
|
@@ -319,4 +337,8 @@ en:
|
|
319
337
|
slug: "You do not need to add the extension file (.css or .js)"
|
320
338
|
edit:
|
321
339
|
source: "You can replace it by a file of the same extension"
|
340
|
+
custom_fields:
|
341
|
+
field:
|
342
|
+
_alias: "Property available in liquid templates"
|
343
|
+
hint: "Text displayed in the model form just below the field"
|
322
344
|
|
data/config/routes.rb
CHANGED
@@ -36,17 +36,17 @@ Rails.application.routes.draw do |map|
|
|
36
36
|
|
37
37
|
resources :asset_collections
|
38
38
|
|
39
|
-
resources :assets, :path =>
|
39
|
+
resources :assets, :path => 'asset_collections/:collection_id/assets'
|
40
40
|
|
41
41
|
resources :content_types
|
42
42
|
|
43
|
-
resources :contents, :path =>
|
43
|
+
resources :contents, :path => 'content_types/:slug/contents' do
|
44
44
|
put :sort, :on => :collection
|
45
45
|
end
|
46
46
|
|
47
|
-
resources :api_contents, :path =>
|
47
|
+
resources :api_contents, :path => 'api/:slug/contents', :controller => 'api_contents', :only => [:create]
|
48
48
|
|
49
|
-
resources :custom_fields, :path =>
|
49
|
+
resources :custom_fields, :path => 'custom/:parent/:slug/fields'
|
50
50
|
end
|
51
51
|
|
52
52
|
# magic urls
|
data/lib/locomotive.rb
CHANGED
@@ -32,10 +32,9 @@ module Locomotive
|
|
32
32
|
|
33
33
|
ActionMailer::Base.default_url_options[:host] = self.config.default_domain + (Rails.env.development? ? ':3000' : '')
|
34
34
|
|
35
|
-
# cookies stored in mongodb
|
35
|
+
# cookies stored in mongodb (mongoid_store)
|
36
36
|
Rails.application.config.session_store :mongoid_store, {
|
37
|
-
:key => Locomotive.config.cookie_key
|
38
|
-
:domain => ".#{Locomotive.config.default_domain}"
|
37
|
+
:key => Locomotive.config.cookie_key
|
39
38
|
}
|
40
39
|
|
41
40
|
# Heroku support
|
@@ -32,6 +32,7 @@ module Locomotive
|
|
32
32
|
|
33
33
|
def each(&block)
|
34
34
|
@collection ||= @content_type.ordered_contents(@context['with_scope'])
|
35
|
+
@collection.each(&block)
|
35
36
|
end
|
36
37
|
|
37
38
|
def paginate(options = {})
|
@@ -53,7 +54,11 @@ module Locomotive
|
|
53
54
|
|
54
55
|
def before_method(meth)
|
55
56
|
klass = @content_type.contents.klass # delegate to the proxy class
|
56
|
-
|
57
|
+
if (meth.to_s =~ /^group_by_.+$/) == 0
|
58
|
+
klass.send(meth, :ordered_contents)
|
59
|
+
else
|
60
|
+
klass.send(meth)
|
61
|
+
end
|
57
62
|
end
|
58
63
|
end
|
59
64
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Locomotive
|
2
|
+
module Liquid
|
3
|
+
module Drops
|
4
|
+
class Page < Base
|
5
|
+
|
6
|
+
liquid_attributes << :title
|
7
|
+
|
8
|
+
def children
|
9
|
+
@children ||= liquify(*@source.children)
|
10
|
+
end
|
11
|
+
|
12
|
+
def fullpath
|
13
|
+
@fullpath ||= @source.fullpath
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/locomotive/patches.rb
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
# load patches
|
2
|
-
require 'locomotive/devise/sessions_controller'
|
1
|
+
# load patches here
|
data/lib/locomotive/render.rb
CHANGED
@@ -8,13 +8,13 @@ module Locomotive
|
|
8
8
|
protected
|
9
9
|
|
10
10
|
def render_locomotive_page
|
11
|
-
page = locomotive_page
|
11
|
+
@page = locomotive_page
|
12
12
|
|
13
|
-
redirect_to application_root_url and return if page.nil?
|
13
|
+
redirect_to application_root_url and return if @page.nil?
|
14
14
|
|
15
|
-
output = page.render(locomotive_context)
|
15
|
+
output = @page.render(locomotive_context)
|
16
16
|
|
17
|
-
prepare_and_set_response(output)
|
17
|
+
prepare_and_set_response(output, @page.cache_expires_in || 0)
|
18
18
|
end
|
19
19
|
|
20
20
|
def locomotive_page
|
@@ -35,6 +35,7 @@ module Locomotive
|
|
35
35
|
def locomotive_context
|
36
36
|
assigns = {
|
37
37
|
'site' => current_site,
|
38
|
+
'page' => @page,
|
38
39
|
'asset_collections' => Locomotive::Liquid::Drops::AssetCollections.new(current_site),
|
39
40
|
'stylesheets' => Locomotive::Liquid::Drops::Stylesheets.new(current_site),
|
40
41
|
'javascripts' => Locomotive::Liquid::Drops::Javascripts.new(current_site),
|
@@ -42,13 +43,14 @@ module Locomotive
|
|
42
43
|
'current_page' => self.params[:page]
|
43
44
|
}
|
44
45
|
|
45
|
-
registers = { :controller => self, :site => current_site }
|
46
|
+
registers = { :controller => self, :site => current_site, :page => @page }
|
46
47
|
|
47
48
|
::Liquid::Context.new(assigns, registers)
|
48
49
|
end
|
49
50
|
|
50
|
-
def prepare_and_set_response(output)
|
51
|
-
response.headers[
|
51
|
+
def prepare_and_set_response(output, cache_expiration = 0)
|
52
|
+
response.headers['Cache-Control'] = "public, max-age=#{cache_expiration}" if cache_expiration > 0
|
53
|
+
response.headers['Content-Type'] = 'text/html; charset=utf-8'
|
52
54
|
render :text => output, :layout => false, :status => :ok
|
53
55
|
end
|
54
56
|
|
@@ -1,16 +1,11 @@
|
|
1
1
|
module Locomotive
|
2
|
-
|
3
2
|
module Routing
|
4
|
-
|
5
3
|
class DefaultConstraint
|
6
4
|
|
7
5
|
def self.matches?(request)
|
8
6
|
domain, subdomain = domain_and_subdomain(request)
|
9
7
|
subdomain = 'www' if subdomain.blank?
|
10
8
|
|
11
|
-
# puts "domain = #{domain} / #{Locomotive.config.default_domain.inspect}"
|
12
|
-
# puts "subdomain = #{subdomain} / #{Locomotive.config.reserved_subdomains.inspect}"
|
13
|
-
|
14
9
|
domain == Locomotive.config.default_domain && Locomotive.config.reserved_subdomains.include?(subdomain)
|
15
10
|
end
|
16
11
|
|
@@ -38,8 +33,7 @@ module Locomotive
|
|
38
33
|
parts = request.host.split('.')
|
39
34
|
parts[0..-(tld_length+2)]
|
40
35
|
end
|
41
|
-
|
42
|
-
|
43
|
-
end
|
44
|
-
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
45
39
|
end
|
@@ -1,17 +1,13 @@
|
|
1
1
|
module Locomotive
|
2
|
-
|
3
|
-
module Routing
|
4
|
-
|
2
|
+
module Routing
|
5
3
|
module SiteDispatcher
|
6
4
|
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
before_filter :fetch_site
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
helper_method :current_site
|
14
|
-
end
|
10
|
+
helper_method :current_site
|
15
11
|
end
|
16
12
|
|
17
13
|
module InstanceMethods
|
@@ -42,8 +38,6 @@ module Locomotive
|
|
42
38
|
|
43
39
|
end
|
44
40
|
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
48
|
-
|
41
|
+
end
|
42
|
+
end
|
49
43
|
end
|
@@ -43,6 +43,17 @@ var addCodeMirrorEditor = function(type, el, parser) {
|
|
43
43
|
CodeMirrorEditors.push({ 'el': el, 'editor': editor });
|
44
44
|
}
|
45
45
|
|
46
|
+
/* ___ tinyMCE ___ */
|
47
|
+
|
48
|
+
var TinyMceDefaultSettings = {
|
49
|
+
script_url : '/javascripts/admin/plugins/tiny_mce/tiny_mce.js',
|
50
|
+
theme : 'advanced',
|
51
|
+
skin : 'locomotive',
|
52
|
+
theme_advanced_buttons1 : 'code,|,bold,italic,|,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,|,formatselect,fontselect,fontsizeselect',
|
53
|
+
theme_advanced_buttons2 : '',
|
54
|
+
theme_advanced_buttons3 : ''
|
55
|
+
};
|
56
|
+
|
46
57
|
/* ___ global ___ */
|
47
58
|
|
48
59
|
$(document).ready(function() {
|
@@ -61,8 +72,8 @@ $(document).ready(function() {
|
|
61
72
|
$('#submenu > ul > li.' + css).addClass('on');
|
62
73
|
|
63
74
|
// form
|
64
|
-
$('.formtastic li input, .formtastic li textarea').focus(function() {
|
65
|
-
$('.formtastic li.error p.inline-errors').fadeOut(200);
|
75
|
+
$('.formtastic li input, .formtastic li textarea, .formtastic li code').focus(function() {
|
76
|
+
$('.formtastic li.error:not(.code) p.inline-errors').fadeOut(200);
|
66
77
|
if ($(this).parent().hasClass('error')) {
|
67
78
|
$(this).nextAll('p.inline-errors').show();
|
68
79
|
}
|