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
@@ -21,6 +21,14 @@
|
|
21
21
|
background-image: url("/images/admin/form/footer-popup.png");
|
22
22
|
}
|
23
23
|
|
24
|
+
#fancybox-inner form.formtastic fieldset ol li label {
|
25
|
+
width: 20%;
|
26
|
+
}
|
27
|
+
|
28
|
+
#fancybox-inner form.formtastic fieldset ol li p.inline-hints {
|
29
|
+
margin-left: 30%;
|
30
|
+
}
|
31
|
+
|
24
32
|
#fancybox-inner form.formtastic .editable-list ol {
|
25
33
|
width: 433px;
|
26
34
|
}
|
@@ -137,6 +137,15 @@ form.formtastic fieldset ol li p.inline-errors {
|
|
137
137
|
font-size: 0.7em !important;
|
138
138
|
}
|
139
139
|
|
140
|
+
form.formtastic fieldset ol li.code p.inline-errors {
|
141
|
+
display: block;
|
142
|
+
float: right;
|
143
|
+
margin: 4px 16px 0 0;
|
144
|
+
position: relative;
|
145
|
+
left: 0px;
|
146
|
+
background-image: none;
|
147
|
+
}
|
148
|
+
|
140
149
|
form.formtastic fieldset ol li.more { text-align: right; width: auto; margin-right: 20px; line-height: 0.6em; }
|
141
150
|
form.formtastic fieldset ol li.more a { text-decoration: none; color: #787A89; font-size: 0.7em; }
|
142
151
|
form.formtastic fieldset ol li.more a:hover { text-decoration: underline; }
|
@@ -370,6 +379,12 @@ form.formtastic fieldset.validations ol li.added em.key {
|
|
370
379
|
width: 180px;
|
371
380
|
}
|
372
381
|
|
382
|
+
/* ___ content instance ___ */
|
383
|
+
|
384
|
+
form.content_instance fieldset ol li.text textarea {
|
385
|
+
width: 75%;
|
386
|
+
}
|
387
|
+
|
373
388
|
/* ___ my account ___ */
|
374
389
|
|
375
390
|
form.formtastic fieldset.language li.full span {
|
@@ -0,0 +1,105 @@
|
|
1
|
+
body {
|
2
|
+
/* body:url("/images/admin/form/field.png") repeat-x scroll 0 0 white*/
|
3
|
+
/* font-family: Verdana, Arial, Helvetica, sans-serif;
|
4
|
+
font-size: 10px;
|
5
|
+
scrollbar-3dlight-color: #F0F0EE;
|
6
|
+
scrollbar-arrow-color: #676662;
|
7
|
+
scrollbar-base-color: #F0F0EE;
|
8
|
+
scrollbar-darkshadow-color: #DDDDDD;
|
9
|
+
scrollbar-face-color: #E0E0DD;
|
10
|
+
scrollbar-highlight-color: #F0F0EE;
|
11
|
+
scrollbar-shadow-color: #F0F0EE;
|
12
|
+
scrollbar-track-color: #F5F5F5;
|
13
|
+
*/}
|
14
|
+
|
15
|
+
td {
|
16
|
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
17
|
+
font-size: 10px;
|
18
|
+
}
|
19
|
+
|
20
|
+
pre {
|
21
|
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
22
|
+
font-size: 10px;
|
23
|
+
}
|
24
|
+
|
25
|
+
.example1 {
|
26
|
+
font-weight: bold;
|
27
|
+
font-size: 14px
|
28
|
+
}
|
29
|
+
|
30
|
+
.example2 {
|
31
|
+
font-weight: bold;
|
32
|
+
font-size: 12px;
|
33
|
+
color: #FF0000
|
34
|
+
}
|
35
|
+
|
36
|
+
.tablerow1 {
|
37
|
+
background-color: #BBBBBB;
|
38
|
+
}
|
39
|
+
|
40
|
+
thead {
|
41
|
+
background-color: #FFBBBB;
|
42
|
+
}
|
43
|
+
|
44
|
+
tfoot {
|
45
|
+
background-color: #BBBBFF;
|
46
|
+
}
|
47
|
+
|
48
|
+
th {
|
49
|
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
50
|
+
font-size: 13px;
|
51
|
+
}
|
52
|
+
|
53
|
+
/* Basic formats */
|
54
|
+
|
55
|
+
.bold {
|
56
|
+
font-weight: bold;
|
57
|
+
}
|
58
|
+
|
59
|
+
.italic {
|
60
|
+
font-style: italic;
|
61
|
+
}
|
62
|
+
|
63
|
+
.underline {
|
64
|
+
text-decoration: underline;
|
65
|
+
}
|
66
|
+
|
67
|
+
/* Global align classes */
|
68
|
+
|
69
|
+
.left {
|
70
|
+
text-align: inherit;
|
71
|
+
}
|
72
|
+
|
73
|
+
.center {
|
74
|
+
text-align: center;
|
75
|
+
}
|
76
|
+
|
77
|
+
.right {
|
78
|
+
text-align: right;
|
79
|
+
}
|
80
|
+
|
81
|
+
.full {
|
82
|
+
text-align: justify
|
83
|
+
}
|
84
|
+
|
85
|
+
/* Image and table specific aligns */
|
86
|
+
|
87
|
+
img.left, table.left {
|
88
|
+
float: left;
|
89
|
+
text-align: inherit;
|
90
|
+
}
|
91
|
+
|
92
|
+
img.center, table.center {
|
93
|
+
margin-left: auto;
|
94
|
+
margin-right: auto;
|
95
|
+
text-align: inherit;
|
96
|
+
}
|
97
|
+
|
98
|
+
img.center {
|
99
|
+
display: block;
|
100
|
+
}
|
101
|
+
|
102
|
+
img.right, table.right {
|
103
|
+
float: right;
|
104
|
+
text-align: inherit;
|
105
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Locomotive::Liquid::Drops::Contents do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@site = Factory.build(:site)
|
7
|
+
@content_type = Factory.build(:content_type, :site => @site, :slug => 'projects')
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'retrieves a content type from a slug' do
|
11
|
+
@site.content_types.expects(:where).with(:slug => 'projects')
|
12
|
+
render_template '{{ contents.projects }}'
|
13
|
+
end
|
14
|
+
|
15
|
+
context '#group_by' do
|
16
|
+
|
17
|
+
it 'orders contents' do
|
18
|
+
@site.content_types.stubs(:where).returns([@content_type])
|
19
|
+
@content_type.contents.klass.expects(:group_by_category).with(:ordered_contents)
|
20
|
+
render_template '{% for group in contents.projects.group_by_category %} {{ group.name }} {% endfor %}'
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
def render_template(template = '', assigns = {})
|
26
|
+
assigns = {
|
27
|
+
'contents' => Locomotive::Liquid::Drops::Contents.new(@site)
|
28
|
+
}.merge(assigns)
|
29
|
+
|
30
|
+
Liquid::Template.parse(template).render assigns
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Locomotive::Liquid::Drops::Page do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@home = Factory.build(:page)
|
7
|
+
@home.stubs(:children).returns([
|
8
|
+
Page.new(:title => 'Child #1'),
|
9
|
+
Page.new(:title => 'Child #2'),
|
10
|
+
Page.new(:title => 'Child #3')
|
11
|
+
])
|
12
|
+
@home.children.last.stubs(:children).returns([
|
13
|
+
Page.new(:title => 'Child #3.1'),
|
14
|
+
Page.new(:title => 'Child #3.2')
|
15
|
+
])
|
16
|
+
end
|
17
|
+
|
18
|
+
context '#rendering' do
|
19
|
+
|
20
|
+
context '#children' do
|
21
|
+
|
22
|
+
it 'renders title of all children pages' do
|
23
|
+
content = render_template '{% for child in home.children %}{{ child.title }},{% endfor %}'
|
24
|
+
content.should == 'Child #1,Child #2,Child #3,'
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
context '#sub children' do
|
30
|
+
|
31
|
+
it 'renders title of all sub children pages' do
|
32
|
+
content = render_template '{% for child in home.children.last.children %}{{ child.title }},{% endfor %}'
|
33
|
+
content.should == 'Child #3.1,Child #3.2,'
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
def render_template(template = '', assigns = {})
|
41
|
+
assigns = {
|
42
|
+
'home' => @home
|
43
|
+
}.merge(assigns)
|
44
|
+
|
45
|
+
Liquid::Template.parse(template).render assigns
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -16,13 +16,22 @@ describe 'Locomotive rendering system' do
|
|
16
16
|
@controller.send(:prepare_and_set_response, 'Hello world !')
|
17
17
|
end
|
18
18
|
|
19
|
-
it '
|
20
|
-
@controller.response.headers[
|
19
|
+
it 'sets the content type to html' do
|
20
|
+
@controller.response.headers['Content-Type'].should == 'text/html; charset=utf-8'
|
21
21
|
end
|
22
22
|
|
23
|
-
it '
|
23
|
+
it 'displays the output' do
|
24
24
|
@controller.output.should == 'Hello world !'
|
25
25
|
end
|
26
|
+
|
27
|
+
it 'does not set the cache' do
|
28
|
+
@controller.response.headers['Cache-Control'].should be_nil
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'sets the cache' do
|
32
|
+
@controller.send(:prepare_and_set_response, 'Hello world !', 3600)
|
33
|
+
@controller.response.headers['Cache-Control'].should == 'public, max-age=3600'
|
34
|
+
end
|
26
35
|
|
27
36
|
end
|
28
37
|
|
@@ -7,7 +7,10 @@ require 'custom_fields/extensions/mongoid/associations/proxy'
|
|
7
7
|
require 'custom_fields/extensions/mongoid/associations/has_many_related'
|
8
8
|
require 'custom_fields/extensions/mongoid/associations/embeds_many'
|
9
9
|
require 'custom_fields/types/default'
|
10
|
+
require 'custom_fields/types/string'
|
11
|
+
require 'custom_fields/types/text'
|
10
12
|
require 'custom_fields/types/category'
|
13
|
+
require 'custom_fields/types/boolean'
|
11
14
|
require 'custom_fields/proxy_class_enabler'
|
12
15
|
require 'custom_fields/field'
|
13
16
|
require 'custom_fields/custom_fields_for'
|
@@ -6,11 +6,14 @@ module CustomFields
|
|
6
6
|
|
7
7
|
# types ##
|
8
8
|
include Types::Default
|
9
|
+
include Types::String
|
10
|
+
include Types::Text
|
9
11
|
include Types::Category
|
12
|
+
include Types::Boolean
|
10
13
|
|
11
14
|
## fields ##
|
12
15
|
field :label
|
13
|
-
field :_alias
|
16
|
+
field :_alias
|
14
17
|
field :_name
|
15
18
|
field :kind
|
16
19
|
field :hint
|
@@ -22,18 +25,8 @@ module CustomFields
|
|
22
25
|
|
23
26
|
## methods ##
|
24
27
|
|
25
|
-
%w{String Text Category}.each do |kind|
|
26
|
-
define_method "#{kind.downcase}?" do
|
27
|
-
self.kind == kind
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
28
|
def field_type
|
32
|
-
|
33
|
-
when 'String', 'Text', 'Category' then String
|
34
|
-
else
|
35
|
-
self.kind.constantize
|
36
|
-
end
|
29
|
+
self.class.field_types[self.kind.to_sym]
|
37
30
|
end
|
38
31
|
|
39
32
|
def apply(klass)
|
@@ -41,9 +34,10 @@ module CustomFields
|
|
41
34
|
|
42
35
|
klass.field self._name, :type => self.field_type
|
43
36
|
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
apply_method_name = :"apply_#{self.kind.downcase}_type"
|
38
|
+
|
39
|
+
if self.respond_to?(apply_method_name)
|
40
|
+
self.send(apply_method_name, klass)
|
47
41
|
else
|
48
42
|
apply_default_type(klass)
|
49
43
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module CustomFields
|
2
|
+
module Types
|
3
|
+
module Boolean
|
4
|
+
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
register_type :boolean
|
9
|
+
end
|
10
|
+
|
11
|
+
module InstanceMethods
|
12
|
+
|
13
|
+
def apply_boolean_type(klass)
|
14
|
+
|
15
|
+
klass.class_eval <<-EOF
|
16
|
+
alias :#{self.safe_alias}= :#{self._name}=
|
17
|
+
|
18
|
+
def #{self.safe_alias}
|
19
|
+
::Boolean.set(read_attribute(:#{self._name}))
|
20
|
+
end
|
21
|
+
EOF
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -10,6 +10,8 @@ module CustomFields
|
|
10
10
|
validates_associated :category_items
|
11
11
|
|
12
12
|
accepts_nested_attributes_for :category_items, :allow_destroy => true
|
13
|
+
|
14
|
+
register_type :category, String
|
13
15
|
end
|
14
16
|
|
15
17
|
module InstanceMethods
|
@@ -18,6 +20,14 @@ module CustomFields
|
|
18
20
|
self.category_items.sort { |a, b| (a.position || 0) <=> (b.position || 0) }
|
19
21
|
end
|
20
22
|
|
23
|
+
def category_names
|
24
|
+
self.category_items.collect(&:name)
|
25
|
+
end
|
26
|
+
|
27
|
+
def category_ids
|
28
|
+
self.category_items.collect(&:_id)
|
29
|
+
end
|
30
|
+
|
21
31
|
def apply_category_type(klass)
|
22
32
|
klass.cattr_accessor :"#{self.safe_alias}_items"
|
23
33
|
|
@@ -28,11 +38,13 @@ module CustomFields
|
|
28
38
|
self.#{self.safe_alias}_items.collect(&:name)
|
29
39
|
end
|
30
40
|
|
31
|
-
def self.group_by_#{self.safe_alias}
|
41
|
+
def self.group_by_#{self.safe_alias}(list_method = nil)
|
32
42
|
groups = (if self.embedded?
|
33
|
-
self.
|
43
|
+
list_method ||= self.association_name
|
44
|
+
self._parent.send(list_method)
|
34
45
|
else
|
35
|
-
|
46
|
+
list_method ||= :all
|
47
|
+
self.send(list_method)
|
36
48
|
end).to_a.group_by(&:#{self._name})
|
37
49
|
|
38
50
|
self.#{self.safe_alias}_items.collect do |category|
|
@@ -2,7 +2,11 @@ module CustomFields
|
|
2
2
|
module Types
|
3
3
|
module Default
|
4
4
|
extend ActiveSupport::Concern
|
5
|
-
|
5
|
+
|
6
|
+
included do
|
7
|
+
cattr_accessor :field_types
|
8
|
+
end
|
9
|
+
|
6
10
|
module InstanceMethods
|
7
11
|
|
8
12
|
def apply_default_type(klass)
|
@@ -12,7 +16,22 @@ module CustomFields
|
|
12
16
|
EOF
|
13
17
|
end
|
14
18
|
|
15
|
-
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module ClassMethods
|
22
|
+
|
23
|
+
def register_type(kind, klass = String)
|
24
|
+
self.field_types ||= {}
|
25
|
+
self.field_types[kind.to_sym] = klass
|
26
|
+
|
27
|
+
self.class_eval <<-EOF
|
28
|
+
def #{kind.to_s}?
|
29
|
+
self.kind.downcase == '#{kind}' rescue false
|
30
|
+
end
|
31
|
+
EOF
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
16
35
|
end
|
17
36
|
end
|
18
37
|
end
|