yodel_admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/lib/layouts/admin_list_record.html +94 -0
- data/lib/layouts/admin_login.html +131 -0
- data/lib/layouts/admin_page/admin_list_page.html +55 -0
- data/lib/layouts/admin_page/admin_settings_page.html +34 -0
- data/lib/layouts/admin_page/admin_tree_page.html +51 -0
- data/lib/layouts/admin_page.html +56 -0
- data/lib/layouts/admin_record_form.html +74 -0
- data/lib/migrations/01_admin_pages.rb +99 -0
- data/lib/migrations/02_admin_default_pages.rb +98 -0
- data/lib/models/admin_editor_page.rb +27 -0
- data/lib/models/admin_list_page.rb +121 -0
- data/lib/models/admin_root_page.rb +9 -0
- data/lib/models/admin_settings_page.rb +20 -0
- data/lib/models/admin_sync_page.rb +82 -0
- data/lib/models/admin_tree_page.rb +141 -0
- data/lib/public/admin/chosen/chosen-sprite.png +0 -0
- data/lib/public/admin/chosen/chosen.css +340 -0
- data/lib/public/admin/chosen/chosen.jquery.min.js +10 -0
- data/lib/public/admin/css/admin.css +1086 -0
- data/lib/public/admin/css/reset.css +48 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/lib/public/admin/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/public/admin/css/smoothness/jquery-ui-1.8.16.custom.css +380 -0
- data/lib/public/admin/images/add.png +0 -0
- data/lib/public/admin/images/clock.png +0 -0
- data/lib/public/admin/images/close.png +0 -0
- data/lib/public/admin/images/cross.png +0 -0
- data/lib/public/admin/images/default_icon.png +0 -0
- data/lib/public/admin/images/delete.png +0 -0
- data/lib/public/admin/images/deploy_spinner.gif +0 -0
- data/lib/public/admin/images/drag.png +0 -0
- data/lib/public/admin/images/group_icon.png +0 -0
- data/lib/public/admin/images/left_arrow.png +0 -0
- data/lib/public/admin/images/load_spinner.gif +0 -0
- data/lib/public/admin/images/load_spinner_selected.gif +0 -0
- data/lib/public/admin/images/missing_image.png +0 -0
- data/lib/public/admin/images/new.png +0 -0
- data/lib/public/admin/images/open.png +0 -0
- data/lib/public/admin/images/right_arrow.png +0 -0
- data/lib/public/admin/images/save_spinner.gif +0 -0
- data/lib/public/admin/images/search.png +0 -0
- data/lib/public/admin/images/tick.png +0 -0
- data/lib/public/admin/images/user_icon.png +0 -0
- data/lib/public/admin/images/yodel.png +0 -0
- data/lib/public/admin/js/admin.js +1030 -0
- data/lib/public/admin/js/jquery-ui-1.8.16.custom.min.js +227 -0
- data/lib/public/admin/js/jquery.min.js +18 -0
- data/lib/public/admin/js/jquery.tablesorter.min.js +4 -0
- data/lib/public/admin/js/json2.js +480 -0
- data/lib/public/admin/js/yodel_jquery.js +241 -0
- data/lib/public/admin/tiny_mce/jquery.tinymce.js +338 -0
- data/lib/public/admin/tiny_mce/langs/en.js +223 -0
- data/lib/public/admin/tiny_mce/license.txt +504 -0
- data/lib/public/admin/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/lib/public/admin/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/lib/public/admin/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/lib/public/admin/tiny_mce/plugins/advhr/langs/en_dlg.js +7 -0
- data/lib/public/admin/tiny_mce/plugins/advhr/rule.htm +58 -0
- data/lib/public/admin/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/lib/public/admin/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/lib/public/admin/tiny_mce/plugins/advimage/image.htm +235 -0
- data/lib/public/admin/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/advimage/js/image.js +458 -0
- data/lib/public/admin/tiny_mce/plugins/advimage/langs/en_dlg.js +45 -0
- data/lib/public/admin/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/lib/public/admin/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/lib/public/admin/tiny_mce/plugins/advlink/js/advlink.js +532 -0
- data/lib/public/admin/tiny_mce/plugins/advlink/langs/en_dlg.js +54 -0
- data/lib/public/admin/tiny_mce/plugins/advlink/link.htm +338 -0
- data/lib/public/admin/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/advlist/editor_plugin_src.js +176 -0
- data/lib/public/admin/tiny_mce/plugins/autolink/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/autolink/editor_plugin_src.js +172 -0
- data/lib/public/admin/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/autoresize/editor_plugin_src.js +137 -0
- data/lib/public/admin/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/autosave/editor_plugin_src.js +431 -0
- data/lib/public/admin/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/lib/public/admin/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/lib/public/admin/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/contextmenu/editor_plugin_src.js +160 -0
- data/lib/public/admin/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/emotions.htm +41 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/lib/public/admin/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/lib/public/admin/tiny_mce/plugins/example/dialog.htm +22 -0
- data/lib/public/admin/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/lib/public/admin/tiny_mce/plugins/example/img/example.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/lib/public/admin/tiny_mce/plugins/example/langs/en.js +3 -0
- data/lib/public/admin/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/lib/public/admin/tiny_mce/plugins/example_dependency/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/example_dependency/editor_plugin_src.js +50 -0
- data/lib/public/admin/tiny_mce/plugins/fullpage/css/fullpage.css +143 -0
- data/lib/public/admin/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/fullpage/editor_plugin_src.js +399 -0
- data/lib/public/admin/tiny_mce/plugins/fullpage/fullpage.htm +259 -0
- data/lib/public/admin/tiny_mce/plugins/fullpage/js/fullpage.js +232 -0
- data/lib/public/admin/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/lib/public/admin/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/fullscreen/editor_plugin_src.js +159 -0
- data/lib/public/admin/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/lib/public/admin/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +699 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/lib/public/admin/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/lib/public/admin/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/lib/public/admin/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/layer/editor_plugin_src.js +214 -0
- data/lib/public/admin/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +139 -0
- data/lib/public/admin/tiny_mce/plugins/lists/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/lists/editor_plugin_src.js +769 -0
- data/lib/public/admin/tiny_mce/plugins/media/css/media.css +17 -0
- data/lib/public/admin/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/media/editor_plugin_src.js +822 -0
- data/lib/public/admin/tiny_mce/plugins/media/js/embed.js +73 -0
- data/lib/public/admin/tiny_mce/plugins/media/js/media.js +389 -0
- data/lib/public/admin/tiny_mce/plugins/media/langs/en_dlg.js +112 -0
- data/lib/public/admin/tiny_mce/plugins/media/media.htm +897 -0
- data/lib/public/admin/tiny_mce/plugins/media/moxieplayer.swf +0 -0
- data/lib/public/admin/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/lib/public/admin/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/noneditable/editor_plugin_src.js +95 -0
- data/lib/public/admin/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/pagebreak/editor_plugin_src.js +74 -0
- data/lib/public/admin/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/paste/editor_plugin_src.js +942 -0
- data/lib/public/admin/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/lib/public/admin/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/lib/public/admin/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/lib/public/admin/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/lib/public/admin/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/lib/public/admin/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/lib/public/admin/tiny_mce/plugins/preview/example.html +28 -0
- data/lib/public/admin/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/lib/public/admin/tiny_mce/plugins/preview/preview.html +17 -0
- data/lib/public/admin/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/lib/public/admin/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/lib/public/admin/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/lib/public/admin/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/searchreplace/editor_plugin_src.js +61 -0
- data/lib/public/admin/tiny_mce/plugins/searchreplace/js/searchreplace.js +142 -0
- data/lib/public/admin/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/lib/public/admin/tiny_mce/plugins/searchreplace/searchreplace.htm +100 -0
- data/lib/public/admin/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/lib/public/admin/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/spellchecker/editor_plugin_src.js +434 -0
- data/lib/public/admin/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/lib/public/admin/tiny_mce/plugins/style/css/props.css +13 -0
- data/lib/public/admin/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/lib/public/admin/tiny_mce/plugins/style/js/props.js +635 -0
- data/lib/public/admin/tiny_mce/plugins/style/langs/en_dlg.js +70 -0
- data/lib/public/admin/tiny_mce/plugins/style/props.htm +840 -0
- data/lib/public/admin/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/tabfocus/editor_plugin_src.js +122 -0
- data/lib/public/admin/tiny_mce/plugins/table/cell.htm +180 -0
- data/lib/public/admin/tiny_mce/plugins/table/css/cell.css +17 -0
- data/lib/public/admin/tiny_mce/plugins/table/css/row.css +25 -0
- data/lib/public/admin/tiny_mce/plugins/table/css/table.css +13 -0
- data/lib/public/admin/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/table/editor_plugin_src.js +1363 -0
- data/lib/public/admin/tiny_mce/plugins/table/js/cell.js +319 -0
- data/lib/public/admin/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/lib/public/admin/tiny_mce/plugins/table/js/row.js +237 -0
- data/lib/public/admin/tiny_mce/plugins/table/js/table.js +450 -0
- data/lib/public/admin/tiny_mce/plugins/table/langs/en_dlg.js +75 -0
- data/lib/public/admin/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/lib/public/admin/tiny_mce/plugins/table/row.htm +158 -0
- data/lib/public/admin/tiny_mce/plugins/table/table.htm +188 -0
- data/lib/public/admin/tiny_mce/plugins/template/blank.htm +12 -0
- data/lib/public/admin/tiny_mce/plugins/template/css/template.css +23 -0
- data/lib/public/admin/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/lib/public/admin/tiny_mce/plugins/template/js/template.js +106 -0
- data/lib/public/admin/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/lib/public/admin/tiny_mce/plugins/template/template.htm +31 -0
- data/lib/public/admin/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/visualchars/editor_plugin_src.js +83 -0
- data/lib/public/admin/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/wordcount/editor_plugin_src.js +114 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/abbr.htm +142 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/acronym.htm +142 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/attributes.htm +149 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/cite.htm +142 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/del.htm +162 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/ins.htm +162 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/js/attributes.js +111 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/js/del.js +53 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/js/element_common.js +229 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/js/ins.js +53 -0
- data/lib/public/admin/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/lib/public/admin/tiny_mce/themes/advanced/about.htm +52 -0
- data/lib/public/admin/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/lib/public/admin/tiny_mce/themes/advanced/charmap.htm +51 -0
- data/lib/public/admin/tiny_mce/themes/advanced/color_picker.htm +74 -0
- data/lib/public/admin/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/lib/public/admin/tiny_mce/themes/advanced/editor_template_src.js +1358 -0
- data/lib/public/admin/tiny_mce/themes/advanced/image.htm +80 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/flash.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/iframe.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/trans.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/video.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/js/about.js +73 -0
- data/lib/public/admin/tiny_mce/themes/advanced/js/anchor.js +42 -0
- data/lib/public/admin/tiny_mce/themes/advanced/js/charmap.js +355 -0
- data/lib/public/admin/tiny_mce/themes/advanced/js/color_picker.js +329 -0
- data/lib/public/admin/tiny_mce/themes/advanced/js/image.js +247 -0
- data/lib/public/admin/tiny_mce/themes/advanced/js/link.js +153 -0
- data/lib/public/admin/tiny_mce/themes/advanced/js/source_editor.js +56 -0
- data/lib/public/admin/tiny_mce/themes/advanced/langs/en.js +68 -0
- data/lib/public/admin/tiny_mce/themes/advanced/langs/en_dlg.js +54 -0
- data/lib/public/admin/tiny_mce/themes/advanced/link.htm +57 -0
- data/lib/public/admin/tiny_mce/themes/advanced/shortcuts.htm +47 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/content.css +48 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/default/ui.css +214 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/highcontrast/content.css +23 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +105 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/highcontrast/ui.css +102 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/content.css +47 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/dialog.css +117 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/ui.css +217 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/lib/public/admin/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/lib/public/admin/tiny_mce/themes/advanced/source_editor.htm +25 -0
- data/lib/public/admin/tiny_mce/themes/simple/editor_template.js +1 -0
- data/lib/public/admin/tiny_mce/themes/simple/editor_template_src.js +84 -0
- data/lib/public/admin/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/lib/public/admin/tiny_mce/themes/simple/langs/en.js +11 -0
- data/lib/public/admin/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/lib/public/admin/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/lib/public/admin/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/lib/public/admin/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/lib/public/admin/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/lib/public/admin/tiny_mce/tiny_mce.js +1 -0
- data/lib/public/admin/tiny_mce/tiny_mce_popup.js +5 -0
- data/lib/public/admin/tiny_mce/tiny_mce_src.js +15519 -0
- data/lib/public/admin/tiny_mce/utils/editable_selects.js +70 -0
- data/lib/public/admin/tiny_mce/utils/form_utils.js +210 -0
- data/lib/public/admin/tiny_mce/utils/mctabs.js +162 -0
- data/lib/public/admin/tiny_mce/utils/validate.js +252 -0
- data/lib/yodel_admin.rb +3 -0
- data/yodel_admin.gemspec +22 -0
- metadata +365 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,94 @@
|
|
1
|
+
<% if page.render_form %>
|
2
|
+
<h1>
|
3
|
+
<span id="record_name">
|
4
|
+
<% if record.new? %>
|
5
|
+
New <%= record.model.name.humanize %>
|
6
|
+
<% else %>
|
7
|
+
<%= record.name %>
|
8
|
+
<% end %>
|
9
|
+
</span>
|
10
|
+
</h1>
|
11
|
+
<% record.form_for_page remote: true do |form| %>
|
12
|
+
<% form.success do %>
|
13
|
+
$('#save_success').fadeIn().delay(2000).fadeOut();
|
14
|
+
|
15
|
+
// remove the model id regardless of whether this was a new or existing record
|
16
|
+
$('#model').remove();
|
17
|
+
|
18
|
+
// update the record's id
|
19
|
+
$('#record_id').remove();
|
20
|
+
$('#record_form').append('<input type="hidden" id="record_id" name="id" value="' + record['_id'] + '">');
|
21
|
+
|
22
|
+
// further saves are updates
|
23
|
+
$('#record_form input[name=_method]').val('put');
|
24
|
+
|
25
|
+
// update the UI to reflect any changes in the record
|
26
|
+
updateListRecord(json);
|
27
|
+
$('#delete_row').show();
|
28
|
+
$('#delete_row a.delete').attr('data-record-id', record['_id']);
|
29
|
+
/*
|
30
|
+
var values = jQuery.parseJSON(record.values);
|
31
|
+
if(values) {
|
32
|
+
$('#record_form .field-type-attachment, #record_form .field-type-image').each(function(index, element) {
|
33
|
+
element = jQuery(element);
|
34
|
+
var field_name = element.attr('data-field');
|
35
|
+
|
36
|
+
var file_name = 'none';
|
37
|
+
|
38
|
+
if(values[field_name] && values[field_name].name) {
|
39
|
+
file_name = values[field_name].name;
|
40
|
+
element.find('img').attr('src', '/attachments/' + field_name + '/' + values._id + '/admin_thumb.jpg');
|
41
|
+
element.find('img').show();
|
42
|
+
element.find('.clear').show();
|
43
|
+
element.find('input[type=file]').val('');
|
44
|
+
} else {
|
45
|
+
element.find('.clear').hide();
|
46
|
+
}
|
47
|
+
element.find('p span').html(file_name);
|
48
|
+
});
|
49
|
+
}*/
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<% form.failure do %>
|
53
|
+
$('#save_failure').fadeIn().delay(2000).fadeOut();
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<% record.field_sections.each do |section| %>
|
57
|
+
<% if section.display? %>
|
58
|
+
<section>
|
59
|
+
<% if section.name.present? %>
|
60
|
+
<h1><%= section.name %> <a href="#" class="section_toggle">show</a></h1>
|
61
|
+
<% end %>
|
62
|
+
<div <% if section.name.present? %> style="display: none" <% end %>>
|
63
|
+
<%= form.form_for_section(section) %>
|
64
|
+
</div>
|
65
|
+
</section>
|
66
|
+
<% end %>
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
<% if record.new? %>
|
70
|
+
<input type="hidden" name="model" value="<%= record.model.id %>" id="model">
|
71
|
+
<% else %>
|
72
|
+
<input type="hidden" name="id" value="<%= record.id %>" id="record_id">
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
<div id="save">
|
76
|
+
<div>
|
77
|
+
<img src="/admin/images/tick.png" style="display: none" id="save_success">
|
78
|
+
<img src="/admin/images/cross.png" style="display: none" id="save_failure">
|
79
|
+
<% form.progress do %><img src="/admin/images/save_spinner.gif" id="save_spinner"><% end %>
|
80
|
+
</div>
|
81
|
+
<input type="submit" value='Save'>
|
82
|
+
</div>
|
83
|
+
<% end %>
|
84
|
+
<div class="delete" id="delete_row" <% if record.new? %>style="display: none"<% end %>>
|
85
|
+
<img src="/admin/images/save_spinner.gif" style="display: none" id="delete_spinner">
|
86
|
+
<a class="delete" data-record-id="<%= record.id %>" data-record-type="<%= record.model.name.humanize.downcase %>" href="#">Delete</a>
|
87
|
+
</div>
|
88
|
+
<% end %>
|
89
|
+
|
90
|
+
<% if page.partial_name? %>
|
91
|
+
<div id="partial">
|
92
|
+
<%= partial page.partial_name %>
|
93
|
+
</div>
|
94
|
+
<% end %>
|
@@ -0,0 +1,131 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Yodel - Login</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body {
|
7
|
+
background-color: #F3F3F3;
|
8
|
+
font-family: HelveticaNeue, Helvetica, sans-serif;
|
9
|
+
}
|
10
|
+
|
11
|
+
#modal {
|
12
|
+
width: 620px;
|
13
|
+
background-color: white;
|
14
|
+
border-bottom: 1px solid #e0e0e0;
|
15
|
+
border-radius: 5px;
|
16
|
+
-moz-border-radius: 5px;
|
17
|
+
position: relative;
|
18
|
+
margin: 200px auto 0px auto;
|
19
|
+
padding: 81px 33px 35px 33px;
|
20
|
+
}
|
21
|
+
|
22
|
+
h2 {
|
23
|
+
color: #333;
|
24
|
+
font-size: 25px;
|
25
|
+
font-weight: normal;
|
26
|
+
padding: 0px;
|
27
|
+
margin: 0px 0px 14px 0px;
|
28
|
+
}
|
29
|
+
|
30
|
+
p {
|
31
|
+
color: #777;
|
32
|
+
font-size: 16px;
|
33
|
+
margin: 0px;
|
34
|
+
padding: 0px;
|
35
|
+
}
|
36
|
+
|
37
|
+
a {
|
38
|
+
color: #777;
|
39
|
+
}
|
40
|
+
|
41
|
+
#lip {
|
42
|
+
position: absolute;
|
43
|
+
top: 60px;
|
44
|
+
left: -16px;
|
45
|
+
width: 0px;
|
46
|
+
height: 0px;
|
47
|
+
border: 8px solid transparent;
|
48
|
+
border-top-color: #E5A700;
|
49
|
+
border-right-color: #E5A700;
|
50
|
+
padding: 0px;
|
51
|
+
margin: 0px;
|
52
|
+
}
|
53
|
+
|
54
|
+
h1 {
|
55
|
+
position: absolute;
|
56
|
+
background-color: #FFC900;
|
57
|
+
height: 53px;
|
58
|
+
width: 170px;
|
59
|
+
left: -16px;
|
60
|
+
top: 8px;
|
61
|
+
padding: 0px;
|
62
|
+
margin: 0px;
|
63
|
+
color: transparent;
|
64
|
+
background-repeat: no-repeat;
|
65
|
+
background-position: center 10px;
|
66
|
+
background-image: url(/admin/images/yodel.png);
|
67
|
+
}
|
68
|
+
|
69
|
+
p.error {
|
70
|
+
background-color: #D6362E;
|
71
|
+
-moz-border-radius: 4px;
|
72
|
+
border-radius: 4px;
|
73
|
+
color: white;
|
74
|
+
padding: 7px 15px;
|
75
|
+
margin-bottom: 18px;
|
76
|
+
line-height: 18px;
|
77
|
+
font-size: 13px;
|
78
|
+
}
|
79
|
+
|
80
|
+
label {
|
81
|
+
display: inline-block;
|
82
|
+
margin-bottom: 10px;
|
83
|
+
width: 80px;
|
84
|
+
font-size: 13px;
|
85
|
+
vertical-align: middle;
|
86
|
+
}
|
87
|
+
|
88
|
+
input[type=text], input[type=password] {
|
89
|
+
display: inline-block;
|
90
|
+
margin-bottom: 10px;
|
91
|
+
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08) inset;
|
92
|
+
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08) inset;
|
93
|
+
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08) inset;
|
94
|
+
border-radius: 3px;
|
95
|
+
-moz-border-radius: 3px;
|
96
|
+
border: 1px solid #bbb;
|
97
|
+
height: 20px;
|
98
|
+
width: 300px;
|
99
|
+
outline: none;
|
100
|
+
font-size: 11px;
|
101
|
+
vertical-align: middle;
|
102
|
+
padding: 3px 5px;
|
103
|
+
}
|
104
|
+
</style>
|
105
|
+
</head>
|
106
|
+
<body>
|
107
|
+
<div id="modal">
|
108
|
+
<div id="lip"></div>
|
109
|
+
<h1>yodel</h1>
|
110
|
+
<h2>Login</h2>
|
111
|
+
<% if flash[:permission_denied] %>
|
112
|
+
<p class="error">Please login to continue</p>
|
113
|
+
<% end %>
|
114
|
+
<% if flash[:login_failed] %>
|
115
|
+
<p class="error">Sorry, your email or password were incorrect</p>
|
116
|
+
<% end %>
|
117
|
+
|
118
|
+
<form action="<%= page.path %>" method="post">
|
119
|
+
<p>
|
120
|
+
<label for="name">Email</label>
|
121
|
+
<input type="text" id="email" name="email" value="<%= params['email'] %>">
|
122
|
+
</p>
|
123
|
+
<p>
|
124
|
+
<label for="password">Password</label>
|
125
|
+
<input type="password" name="password" id="password" <% if flash[:login_failed] %>class="error"<% end %>>
|
126
|
+
</p>
|
127
|
+
<input type="submit" value="Login">
|
128
|
+
</form>
|
129
|
+
</div>
|
130
|
+
</body>
|
131
|
+
</html>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<div class="list">
|
2
|
+
<article>
|
3
|
+
<div id="save_status" style="display: none"></div>
|
4
|
+
<menu>
|
5
|
+
<p>Search: <input type="search" id="search"></p>
|
6
|
+
<% if show_new_button %>
|
7
|
+
<a href="#" id="new_record">New</a>
|
8
|
+
<% end %>
|
9
|
+
<img src="/admin/images/load_spinner_selected.gif" style="display: none" id="activity_spinner">
|
10
|
+
</menu>
|
11
|
+
<section id="list_items">
|
12
|
+
<table class="<%= title.downcase.underscore %>">
|
13
|
+
<% page.columns.size.times do %>
|
14
|
+
<col></col>
|
15
|
+
<% end %>
|
16
|
+
<thead>
|
17
|
+
<tr>
|
18
|
+
<% page.columns.each do |column| %>
|
19
|
+
<th class="<%= column.style.downcase %> <%= parser_for_column(column) %>" data-field-name="<%= column.name %>">
|
20
|
+
<% if column.as %>
|
21
|
+
<%= column.as %>
|
22
|
+
<% else %>
|
23
|
+
<%= column.name.humanize.titlecase %>
|
24
|
+
<% end %>
|
25
|
+
</th>
|
26
|
+
<% end %>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<tbody>
|
30
|
+
<% records.each do |record| %>
|
31
|
+
<%= render_record(record) %>
|
32
|
+
<% end %>
|
33
|
+
</tbody>
|
34
|
+
</table>
|
35
|
+
<script>
|
36
|
+
$(document).ready(function() {
|
37
|
+
$('#list_items > table').tablesorter({
|
38
|
+
textExtraction: adminListPageValueExtractor,
|
39
|
+
sortList: <%= sort_list %>
|
40
|
+
});
|
41
|
+
|
42
|
+
fixHeaders($('#list_items table'));
|
43
|
+
});
|
44
|
+
</script>
|
45
|
+
</section>
|
46
|
+
|
47
|
+
<section id="record">
|
48
|
+
</section>
|
49
|
+
</article>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<script>
|
53
|
+
var jsonURL = "<%= page.path %>.json";
|
54
|
+
var htmlURL = "<%= page.path %>";
|
55
|
+
</script>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<article class="settings">
|
2
|
+
<div id="record">
|
3
|
+
<h1>Site Settings</h1>
|
4
|
+
<form action="<%= page.path %>" id="record_form" method="post">
|
5
|
+
<input type="hidden" name="_method" value="put">
|
6
|
+
<section>
|
7
|
+
<div>
|
8
|
+
<div>
|
9
|
+
<label>Name</label>
|
10
|
+
<div><input type="text" name="name" value="<%= site.name %>"></div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div>
|
14
|
+
<label>Domains</label>
|
15
|
+
<div>
|
16
|
+
<ul id="domains_list">
|
17
|
+
<% site.domains.each_with_index do |domain, index| %>
|
18
|
+
<li><input type="hidden" name="domains[]" value="<%= domain %>"><%= domain %><% if index > 0 %> - <a href="#" class="remove_domain">remove</a><% end %></li>
|
19
|
+
<% end %>
|
20
|
+
</ul>
|
21
|
+
<p id="new_domain_row">
|
22
|
+
New Domain: <input type="text" id="new_domain"> <button id="add_domain">Add</button>
|
23
|
+
</p>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</section>
|
28
|
+
|
29
|
+
<div id="save">
|
30
|
+
<input type="submit" value='Save'>
|
31
|
+
</div>
|
32
|
+
</form>
|
33
|
+
</div>
|
34
|
+
</article>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<div class="tree">
|
2
|
+
<article>
|
3
|
+
<div id="save_status" style="display: none"></div>
|
4
|
+
<div id="navigation_panels">
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<section id="record">
|
8
|
+
<%= render_layout 'admin_record_form', 'html' %>
|
9
|
+
</section>
|
10
|
+
|
11
|
+
<section id="new_model_panel" style="display: none">
|
12
|
+
<h1>New</h1>
|
13
|
+
<ul>
|
14
|
+
<% site.models.each do |model| %>
|
15
|
+
<% next if model.name.end_with?('_eigenmodel') || model.name.end_with?('Eigenmodel') %>
|
16
|
+
<a href="#" class="model" data-type="<%= model.name %>" data-model-id="<%= model.id %>">
|
17
|
+
<li>
|
18
|
+
<img src="/admin/images/load_spinner.gif" class="spinner">
|
19
|
+
<img src="<%= model.icon || "/admin/images/default_icon.png" %>" class="icon">
|
20
|
+
<p><%= model.name.titleize.humanize %></p>
|
21
|
+
</li>
|
22
|
+
</a>
|
23
|
+
<% end %>
|
24
|
+
<div style="clear: both"></div>
|
25
|
+
</ul>
|
26
|
+
<a href="#" id="cancel_new_record">Cancel</a>
|
27
|
+
</section>
|
28
|
+
</article>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<script>
|
32
|
+
var jsonURL = "<%= page.path %>.json";
|
33
|
+
var htmlURL = "<%= page.path %>";
|
34
|
+
var rootID = "<%= page.root.id %>";
|
35
|
+
var types = {
|
36
|
+
<% site.models.each do |model| %>
|
37
|
+
<% next if model.name.end_with?('_eigenmodel') || model.name.end_with?('Eigenmodel') %>
|
38
|
+
"<%= model.name %>": {
|
39
|
+
id: "<%= model.id %>",
|
40
|
+
name: "<%= model.name %>",
|
41
|
+
humanName: "<%= model.name.titleize.humanize %>",
|
42
|
+
validChildren: [<%= model.valid_children.collect {|child| "'#{child.name}'"}.join(',') %>]
|
43
|
+
},
|
44
|
+
<% end %>
|
45
|
+
};
|
46
|
+
|
47
|
+
$(document).ready(function() {
|
48
|
+
showMenu("<%= page.title.gsub('"', "\\\"") %>", rootID, true);
|
49
|
+
initialiseWidgets();
|
50
|
+
});
|
51
|
+
</script>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<link rel="stylesheet" href="/admin/css/reset.css" type="text/css">
|
5
|
+
<link rel="stylesheet" href="/admin/css/admin.css" type="text/css">
|
6
|
+
<link rel="stylesheet" href="/admin/css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css">
|
7
|
+
<link rel="stylesheet" href="/admin/chosen/chosen.css" type="text/css">
|
8
|
+
<script src="/admin/js/jquery.min.js"></script>
|
9
|
+
<title>Admin - <%= title %></title>
|
10
|
+
<%= @head %>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<header>
|
14
|
+
<h1>yodel</h1>
|
15
|
+
<div id="lip"></div>
|
16
|
+
<div id="site_menu">
|
17
|
+
<p style="display: none"><span>Creating site</span><img src="/admin/images/deploy_spinner.gif"></p>
|
18
|
+
<h2>
|
19
|
+
<%= @site.name %>
|
20
|
+
<nav>
|
21
|
+
<% if current_user.groups.include?(site.groups['Developers']) %>
|
22
|
+
<a href="/admin/settings">Settings</a>
|
23
|
+
<% end %>
|
24
|
+
<% if Yodel.env.development? %>
|
25
|
+
<% if site.remote? %>
|
26
|
+
<a href="#" class="sync push">Push</a>
|
27
|
+
<a href="#" class="sync pull">Pull</a>
|
28
|
+
<a href="http://<%= site.remote_domains.first %>">View live site</a>
|
29
|
+
<% else %>
|
30
|
+
<% Remote.all.each do |remote| %>
|
31
|
+
<a href="#" class="sync create" data-sync-remote="<%= remote.id %>">Push to <%= remote.name %></a>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<% if Yodel.env.development? && AdminEditorPage.available_editors.present? %>
|
36
|
+
<% AdminEditorPage.available_editors.each do |editor| %>
|
37
|
+
<a href="/admin/edit?editor=<%= editor.command %>" class="opens-editor">Edit in <%= editor.name %></a>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
<a href="/admin/logout">Logout</a>
|
41
|
+
</nav>
|
42
|
+
</h2>
|
43
|
+
</div>
|
44
|
+
<%= menu :nav %>
|
45
|
+
</header>
|
46
|
+
<%= content %>
|
47
|
+
|
48
|
+
<script src="/admin/js/jquery.tablesorter.min.js"></script>
|
49
|
+
<script src="/admin/chosen/chosen.jquery.min.js"></script>
|
50
|
+
<script src="/admin/js/jquery-ui-1.8.16.custom.min.js"></script>
|
51
|
+
<script src="/admin/js/json2.js"></script>
|
52
|
+
<script src="/admin/tiny_mce/jquery.tinymce.js"></script>
|
53
|
+
<script src="/admin/js/yodel_jquery.js"></script>
|
54
|
+
<script src="/admin/js/admin.js"></script>
|
55
|
+
</body>
|
56
|
+
</html>
|
@@ -0,0 +1,74 @@
|
|
1
|
+
<h1><span class="type"><%= @record.model_name.underscore.humanize.titleize %></span> <span id="record_name"><%= @record.name %></span></h1>
|
2
|
+
<% form_for @record, page.path, remote: true, params: {id: 'record_form'} do |form| %>
|
3
|
+
<% form.success do %>
|
4
|
+
$('#save_success').fadeIn().delay(2000).fadeOut();
|
5
|
+
|
6
|
+
// remove the model and parent id's regardless of whether this was a new or existing record
|
7
|
+
$('#model').remove();
|
8
|
+
$('#parent').remove();
|
9
|
+
|
10
|
+
// update the record's id
|
11
|
+
$('#record_id').remove();
|
12
|
+
$('#record_form').append('<input type="hidden" id="record_id" name="id" value="' + record.id + '">');
|
13
|
+
|
14
|
+
// further saves are updates
|
15
|
+
$('#record_form input[name=_method]').val('put');
|
16
|
+
|
17
|
+
// update the UI to reflect any changes in the record
|
18
|
+
$('#record_name').html(record.name)
|
19
|
+
updateRecord(record);
|
20
|
+
var values = jQuery.parseJSON(record.values);
|
21
|
+
if(values) {
|
22
|
+
$('#record_form .field-type-attachment, #record_form .field-type-image').each(function(index, element) {
|
23
|
+
element = jQuery(element);
|
24
|
+
var field_name = element.attr('data-field');
|
25
|
+
|
26
|
+
var file_name = 'none';
|
27
|
+
|
28
|
+
if(values[field_name] && values[field_name].name) {
|
29
|
+
file_name = values[field_name].name;
|
30
|
+
element.find('img').attr('src', '/attachments/' + field_name + '/' + values._id + '/admin_thumb.jpg');
|
31
|
+
element.find('img').show();
|
32
|
+
element.find('.clear').show();
|
33
|
+
element.find('input[type=file]').val('');
|
34
|
+
} else {
|
35
|
+
element.find('.clear').hide();
|
36
|
+
}
|
37
|
+
element.find('p span').html(file_name);
|
38
|
+
});
|
39
|
+
}
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% form.failure do %>
|
43
|
+
$('#save_failure').fadeIn().delay(2000).fadeOut();
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<% @record.field_sections.each do |section| %>
|
47
|
+
<% if section.display? %>
|
48
|
+
<section>
|
49
|
+
<% if section.name.present? %>
|
50
|
+
<h1><%= section.name %> <a href="#" class="section_toggle">show</a></h1>
|
51
|
+
<% end %>
|
52
|
+
<div <% if section.name.present? %> style="display: none" <% end %>>
|
53
|
+
<%= form.form_for_section(section) %>
|
54
|
+
</div>
|
55
|
+
</section>
|
56
|
+
<% end %>
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<% if @record.new? %>
|
60
|
+
<%= form.field :model, as: :hidden %>
|
61
|
+
<%= form.field :parent, as: :hidden %>
|
62
|
+
<% else %>
|
63
|
+
<input type="hidden" name="id" value="<%= @record.id %>" id="record_id">
|
64
|
+
<% end %>
|
65
|
+
|
66
|
+
<div id="save">
|
67
|
+
<div>
|
68
|
+
<img src="/admin/images/tick.png" style="display: none" id="save_success">
|
69
|
+
<img src="/admin/images/cross.png" style="display: none" id="save_failure">
|
70
|
+
<% form.progress do %><img src="/admin/images/save_spinner.gif" id="save_spinner"><% end %>
|
71
|
+
</div>
|
72
|
+
<input type="submit" value='Save'>
|
73
|
+
</div>
|
74
|
+
<% end %>
|
@@ -0,0 +1,99 @@
|
|
1
|
+
class AdminPagesMigration < Migration
|
2
|
+
def self.up(site)
|
3
|
+
site.pages.create_model :admin_root_pages do |admin_root_pages|
|
4
|
+
admin_root_pages.view_group = site.groups['Administrators']
|
5
|
+
admin_root_pages.create_group = site.groups['Administrators']
|
6
|
+
admin_root_pages.update_group = site.groups['Administrators']
|
7
|
+
admin_root_pages.delete_group = site.groups['Administrators']
|
8
|
+
admin_root_pages.allowed_children = []
|
9
|
+
admin_root_pages.allowed_parents = []
|
10
|
+
admin_root_pages.hide_in_admin = true
|
11
|
+
admin_root_pages.record_class_name = 'AdminRootPage'
|
12
|
+
end
|
13
|
+
|
14
|
+
site.record_proxy_pages.create_model :admin_list_pages do |admin_list_pages|
|
15
|
+
add_field :show_record_layout, :string, default: 'admin_list_record'
|
16
|
+
add_field :render_form, :boolean, default: true
|
17
|
+
add_field :show_new_button, :boolean, default: true
|
18
|
+
add_field :partial_name, :string
|
19
|
+
add_embed_many :columns do
|
20
|
+
add_field :name, :string, validations: {required: {}}
|
21
|
+
add_field :as, :string
|
22
|
+
add_field :style, :enum, options: %w{Text Boolean Integer Float Currency Percentage Date Time DateTime Label}, default: 'Text'
|
23
|
+
add_field :decimals, :integer
|
24
|
+
add_field :symbol, :string, default: '$'
|
25
|
+
add_field :true_text, :string, default: 'Yes'
|
26
|
+
add_field :false_text, :string, default: 'No'
|
27
|
+
add_field :format, :string
|
28
|
+
add_embed_many :colors do
|
29
|
+
add_field :label, :string
|
30
|
+
add_field :color, :color
|
31
|
+
end
|
32
|
+
add_field :default_sort, :boolean, default: false
|
33
|
+
end
|
34
|
+
|
35
|
+
admin_list_pages.view_group = site.groups['Administrators']
|
36
|
+
admin_list_pages.create_group = site.groups['Administrators']
|
37
|
+
admin_list_pages.update_group = site.groups['Administrators']
|
38
|
+
admin_list_pages.delete_group = site.groups['Administrators']
|
39
|
+
admin_list_pages.allowed_children = []
|
40
|
+
admin_list_pages.allowed_parents = []
|
41
|
+
admin_list_pages.hide_in_admin = true
|
42
|
+
admin_list_pages.record_class_name = 'AdminListPage'
|
43
|
+
end
|
44
|
+
|
45
|
+
site.pages.create_model :admin_tree_pages do |admin_tree_pages|
|
46
|
+
add_one :root, model: :record
|
47
|
+
admin_tree_pages.view_group = site.groups['Administrators']
|
48
|
+
admin_tree_pages.create_group = site.groups['Administrators']
|
49
|
+
admin_tree_pages.update_group = site.groups['Administrators']
|
50
|
+
admin_tree_pages.delete_group = site.groups['Administrators']
|
51
|
+
admin_tree_pages.allowed_children = []
|
52
|
+
admin_tree_pages.allowed_parents = []
|
53
|
+
admin_tree_pages.hide_in_admin = true
|
54
|
+
admin_tree_pages.record_class_name = 'AdminTreePage'
|
55
|
+
end
|
56
|
+
|
57
|
+
site.pages.create_model :admin_editor_pages do |admin_editor_pages|
|
58
|
+
admin_editor_pages.record_class_name = 'AdminEditorPage'
|
59
|
+
admin_editor_pages.allowed_children = []
|
60
|
+
admin_editor_pages.allowed_parents = []
|
61
|
+
admin_editor_pages.hide_in_admin = true
|
62
|
+
admin_editor_pages.view_group = site.groups['Administrators']
|
63
|
+
admin_editor_pages.create_group = site.groups['Administrators']
|
64
|
+
admin_editor_pages.update_group = site.groups['Administrators']
|
65
|
+
admin_editor_pages.delete_group = site.groups['Administrators']
|
66
|
+
end
|
67
|
+
|
68
|
+
site.pages.create_model :admin_settings_pages do |admin_settings_pages|
|
69
|
+
admin_settings_pages.record_class_name = 'AdminSettingsPage'
|
70
|
+
admin_settings_pages.allowed_children = []
|
71
|
+
admin_settings_pages.allowed_parents = []
|
72
|
+
admin_settings_pages.hide_in_admin = true
|
73
|
+
admin_settings_pages.view_group = site.groups['Administrators']
|
74
|
+
admin_settings_pages.create_group = site.groups['Administrators']
|
75
|
+
admin_settings_pages.update_group = site.groups['Administrators']
|
76
|
+
admin_settings_pages.delete_group = site.groups['Administrators']
|
77
|
+
end
|
78
|
+
|
79
|
+
site.pages.create_model :admin_sync_pages do |admin_sync_pages|
|
80
|
+
admin_sync_pages.record_class_name = 'AdminSyncPage'
|
81
|
+
admin_sync_pages.allowed_children = []
|
82
|
+
admin_sync_pages.allowed_parents = []
|
83
|
+
admin_sync_pages.hide_in_admin = true
|
84
|
+
admin_sync_pages.view_group = site.groups['Administrators']
|
85
|
+
admin_sync_pages.create_group = site.groups['Administrators']
|
86
|
+
admin_sync_pages.update_group = site.groups['Administrators']
|
87
|
+
admin_sync_pages.delete_group = site.groups['Administrators']
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def self.down(site)
|
92
|
+
site.admin_root_pages.destroy
|
93
|
+
site.admin_list_pages.destroy
|
94
|
+
site.admin_tree_pages.destroy
|
95
|
+
site.admin_editor_pages.destroy
|
96
|
+
site.admin_settings_pages.destroy
|
97
|
+
site.admin_sync_pages.destroy
|
98
|
+
end
|
99
|
+
end
|