ds-kitsune 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.specification +447 -0
- data/README.textile +16 -0
- data/Rakefile +30 -0
- data/VERSION +1 -0
- data/app/controllers/admin/kitsune/application_controller.rb +3 -0
- data/app/controllers/admin/kitsune/kitsune_controller.rb +87 -0
- data/app/controllers/admin/kitsune/kitsune_users_controller.rb +20 -0
- data/app/controllers/admin/kitsune/media_controller.rb +27 -0
- data/app/controllers/admin/kitsune/models_controller.rb +10 -0
- data/app/controllers/admin/kitsune/pages_controller.rb +35 -0
- data/app/controllers/admin/kitsune/records_controller.rb +98 -0
- data/app/controllers/admin/kitsune/sessions_controller.rb +23 -0
- data/app/controllers/kitsune_controller.rb +8 -0
- data/app/helpers/admin/kitsune/records_helper.rb +39 -0
- data/app/views/admin/kitsune/kitsune_users/index.html.haml +19 -0
- data/app/views/admin/kitsune/kitsune_users/new.html.haml +19 -0
- data/app/views/admin/kitsune/media/new.html.erb +49 -0
- data/app/views/admin/kitsune/models/index.html.haml +1 -0
- data/app/views/admin/kitsune/pages/_form.html.erb +13 -0
- data/app/views/admin/kitsune/pages/edit.html.erb +7 -0
- data/app/views/admin/kitsune/pages/index.html.erb +5 -0
- data/app/views/admin/kitsune/pages/new.html.erb +7 -0
- data/app/views/admin/kitsune/records/_form.html.haml +27 -0
- data/app/views/admin/kitsune/records/_list.html.haml +26 -0
- data/app/views/admin/kitsune/records/edit.html.haml +6 -0
- data/app/views/admin/kitsune/records/index.html.haml +13 -0
- data/app/views/admin/kitsune/records/new.html.haml +6 -0
- data/app/views/admin/kitsune/records/show.html.haml +11 -0
- data/app/views/admin/kitsune/sessions/new.html.haml +12 -0
- data/app/views/admin/kitsune/shared/_flashes.html.haml +6 -0
- data/app/views/kitsune/show.html.erb +8 -0
- data/app/views/kitsune/show.html.haml +5 -0
- data/app/views/layouts/admin/kitsune.html.erb +66 -0
- data/config/kitsune_routes.rb +21 -0
- data/doc/developers.html +38 -0
- data/generators/kitsune/USAGE +1 -0
- data/generators/kitsune/kitsune_generator.rb +67 -0
- data/generators/kitsune/lib/insert_commands.rb +31 -0
- data/generators/kitsune/templates/README +18 -0
- data/generators/kitsune/templates/VERSIONED_README +19 -0
- data/generators/kitsune/templates/images/back-arrow.gif +0 -0
- data/generators/kitsune/templates/images/bg.jpg +0 -0
- data/generators/kitsune/templates/images/box-shadow.png +0 -0
- data/generators/kitsune/templates/images/content-bg.gif +0 -0
- data/generators/kitsune/templates/images/form-bg.gif +0 -0
- data/generators/kitsune/templates/images/grey-btn.png +0 -0
- data/generators/kitsune/templates/images/header-bg.gif +0 -0
- data/generators/kitsune/templates/images/header-link.png +0 -0
- data/generators/kitsune/templates/images/nicEditorIcons.gif +0 -0
- data/generators/kitsune/templates/javascripts/jquery.js +19 -0
- data/generators/kitsune/templates/javascripts/kitsune_jquery.js +10 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/langs/en.js +154 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/license.txt +504 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +54 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/rule.htm +62 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +47 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/image.htm +237 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/js/image.js +443 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +58 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/js/advlink.js +528 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/link.htm +338 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +114 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +51 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +117 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +95 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +79 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +40 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/emotions.htm +40 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/dialog.htm +27 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +81 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +146 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +576 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +461 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +145 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +51 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +632 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +80 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +209 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/css/media.css +16 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +411 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/js/media.js +630 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/media.htm +822 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +50 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +87 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/css/content.css +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +74 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +531 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/pastetext.htm +33 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/pasteword.htm +27 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +50 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/example.html +28 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/preview.html +17 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +31 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/safari/blank.htm +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/safari/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js +438 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +98 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +54 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +126 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +104 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +338 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +52 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/js/props.js +641 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/props.htm +730 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +109 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/cell.htm +183 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1202 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/cell.js +269 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/merge_cells.js +29 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/row.js +212 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/table.js +440 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/merge_cells.htm +37 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/row.htm +160 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/table.htm +192 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +156 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/template.htm +38 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +73 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +95 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +148 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +148 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +153 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +148 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +169 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +136 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +169 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +25 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +25 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +123 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +25 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +60 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +59 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/about.htm +56 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/anchor.htm +31 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/charmap.htm +53 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/color_picker.htm +75 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1153 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/image.htm +85 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/about.js +72 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/charmap.js +325 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/image.js +245 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/link.js +156 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/source_editor.js +62 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/link.htm +63 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/content.css +32 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +116 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +214 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +32 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +115 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/source_editor.htm +31 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/about.htm +56 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/anchor.htm +31 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/charmap.htm +53 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/color_picker.htm +75 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/editor_template.js +1153 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/editor_template_src.js +1153 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/image.htm +65 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/images.json +8 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/img/colorpicker.jpg +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/img/icons.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/js/about.js +72 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/js/anchor.js +37 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/js/charmap.js +325 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/js/color_picker.js +253 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/js/image.js +260 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/js/link.js +156 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/js/source_editor.js +62 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/langs/en.js +62 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/langs/en_dlg.js +51 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/link.htm +63 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/content.css +32 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/dialog.css +184 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/img/buttons.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/img/items.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/img/menu_arrow.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/img/menu_check.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/img/progress.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/img/tabs.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/default/ui.css +214 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/content.css +32 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/dialog.css +115 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/img/button_bg.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/img/button_bg_black.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/img/button_bg_silver.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/ui.css +215 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/ui_black.css +8 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/skins/o2k7/ui_silver.css +5 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/kitsune/source_editor.htm +31 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/tiny_mce.js +1 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/tiny_mce_src.js +13231 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/utils/editable_selects.js +69 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/utils/form_utils.js +199 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/utils/mctabs.js +76 -0
- data/generators/kitsune/templates/javascripts/tiny_mce/utils/validate.js +219 -0
- data/generators/kitsune/templates/javascripts/upload_maker.js +19 -0
- data/generators/kitsune/templates/kitsune_user.rb +3 -0
- data/generators/kitsune/templates/migrations/create_kitsune_users.rb +15 -0
- data/generators/kitsune/templates/migrations/create_pages.rb +16 -0
- data/generators/kitsune/templates/page.rb +3 -0
- data/generators/kitsune/templates/stylesheets/global.css +445 -0
- data/generators/kitsune/templates/stylesheets/ie.css +3 -0
- data/generators/kitsune_flat_files/kitsune_flat_files_generator.rb +8 -0
- data/generators/kitsune_flat_files/templates/index.html.erb +35 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/models/_form.html.erb +16 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/models/index.html.erb +2 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/pages/_form.html.erb +13 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/pages/edit.html.erb +7 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/pages/index.html.erb +5 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/pages/new.html.erb +7 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/records/_form.html.erb +21 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/records/_list.html.erb +38 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/records/edit.html.erb +15 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/records/index.html.erb +13 -0
- data/generators/kitsune_flat_files/templates/views/erb/admin/kitsune/records/new.html.erb +8 -0
- data/generators/kitsune_flat_files/templates/views/erb/kitsune/show.html.erb +1 -0
- data/generators/kitsune_flat_files/templates/views/erb/layouts/admin/kitsune.html.erb +46 -0
- data/kitsune.gemspec +419 -0
- data/lib/kitsune/active_record.rb +36 -0
- data/lib/kitsune/builder.rb +236 -0
- data/lib/kitsune/extensions/routes.rb +15 -0
- data/lib/kitsune/faux_column.rb +8 -0
- data/lib/kitsune/form_helper_ext.rb +23 -0
- data/lib/kitsune/inspector.rb +268 -0
- data/lib/kitsune/layout.rb +15 -0
- data/lib/kitsune/mongo_mapper.rb +49 -0
- data/lib/kitsune/page.rb +70 -0
- data/lib/kitsune.rb +53 -0
- data/lib/kitsune_user.rb +49 -0
- data/rails/init.rb +7 -0
- data/test/builder_test.rb +9 -0
- data/test/inspector_test.rb +13 -0
- data/test/schema.rb +23 -0
- data/test/test_helper.rb +11 -0
- metadata +451 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: editable_selects.js 867 2008-06-09 20:33:40Z spocke $
|
3
|
+
*
|
4
|
+
* Makes select boxes editable.
|
5
|
+
*
|
6
|
+
* @author Moxiecode
|
7
|
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8
|
+
*/
|
9
|
+
|
10
|
+
var TinyMCE_EditableSelects = {
|
11
|
+
editSelectElm : null,
|
12
|
+
|
13
|
+
init : function() {
|
14
|
+
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
15
|
+
|
16
|
+
for (i=0; i<nl.length; i++) {
|
17
|
+
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
18
|
+
o = new Option('(value)', '__mce_add_custom__');
|
19
|
+
|
20
|
+
o.className = 'mceAddSelectValue';
|
21
|
+
|
22
|
+
nl[i].options[nl[i].options.length] = o;
|
23
|
+
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
},
|
27
|
+
|
28
|
+
onChangeEditableSelect : function(e) {
|
29
|
+
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
30
|
+
|
31
|
+
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
32
|
+
ne = d.createElement("input");
|
33
|
+
ne.id = se.id + "_custom";
|
34
|
+
ne.name = se.name + "_custom";
|
35
|
+
ne.type = "text";
|
36
|
+
|
37
|
+
ne.style.width = se.offsetWidth + 'px';
|
38
|
+
se.parentNode.insertBefore(ne, se);
|
39
|
+
se.style.display = 'none';
|
40
|
+
ne.focus();
|
41
|
+
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
42
|
+
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
43
|
+
TinyMCE_EditableSelects.editSelectElm = se;
|
44
|
+
}
|
45
|
+
},
|
46
|
+
|
47
|
+
onBlurEditableSelectInput : function() {
|
48
|
+
var se = TinyMCE_EditableSelects.editSelectElm;
|
49
|
+
|
50
|
+
if (se) {
|
51
|
+
if (se.previousSibling.value != '') {
|
52
|
+
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
53
|
+
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
54
|
+
} else
|
55
|
+
selectByValue(document.forms[0], se.id, '');
|
56
|
+
|
57
|
+
se.style.display = 'inline';
|
58
|
+
se.parentNode.removeChild(se.previousSibling);
|
59
|
+
TinyMCE_EditableSelects.editSelectElm = null;
|
60
|
+
}
|
61
|
+
},
|
62
|
+
|
63
|
+
onKeyDown : function(e) {
|
64
|
+
e = e || window.event;
|
65
|
+
|
66
|
+
if (e.keyCode == 13)
|
67
|
+
TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
68
|
+
}
|
69
|
+
};
|
@@ -0,0 +1,199 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: form_utils.js 1184 2009-08-11 11:47:27Z spocke $
|
3
|
+
*
|
4
|
+
* Various form utilitiy functions.
|
5
|
+
*
|
6
|
+
* @author Moxiecode
|
7
|
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8
|
+
*/
|
9
|
+
|
10
|
+
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
11
|
+
|
12
|
+
function getColorPickerHTML(id, target_form_element) {
|
13
|
+
var h = "";
|
14
|
+
|
15
|
+
h += '<a id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
16
|
+
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> </span></a>';
|
17
|
+
|
18
|
+
return h;
|
19
|
+
}
|
20
|
+
|
21
|
+
function updateColor(img_id, form_element_id) {
|
22
|
+
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
23
|
+
}
|
24
|
+
|
25
|
+
function setBrowserDisabled(id, state) {
|
26
|
+
var img = document.getElementById(id);
|
27
|
+
var lnk = document.getElementById(id + "_link");
|
28
|
+
|
29
|
+
if (lnk) {
|
30
|
+
if (state) {
|
31
|
+
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
32
|
+
lnk.removeAttribute("href");
|
33
|
+
tinyMCEPopup.dom.addClass(img, 'disabled');
|
34
|
+
} else {
|
35
|
+
if (lnk.getAttribute("realhref"))
|
36
|
+
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
37
|
+
|
38
|
+
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
function getBrowserHTML(id, target_form_element, type, prefix) {
|
44
|
+
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
45
|
+
|
46
|
+
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
47
|
+
|
48
|
+
if (!cb)
|
49
|
+
return "";
|
50
|
+
|
51
|
+
html = "";
|
52
|
+
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
53
|
+
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> </span></a>';
|
54
|
+
|
55
|
+
return html;
|
56
|
+
}
|
57
|
+
|
58
|
+
function openBrowser(img_id, target_form_element, type, option) {
|
59
|
+
var img = document.getElementById(img_id);
|
60
|
+
|
61
|
+
if (img.className != "mceButtonDisabled")
|
62
|
+
tinyMCEPopup.openBrowser(target_form_element, type, option);
|
63
|
+
}
|
64
|
+
|
65
|
+
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
66
|
+
if (!form_obj || !form_obj.elements[field_name])
|
67
|
+
return;
|
68
|
+
|
69
|
+
var sel = form_obj.elements[field_name];
|
70
|
+
|
71
|
+
var found = false;
|
72
|
+
for (var i=0; i<sel.options.length; i++) {
|
73
|
+
var option = sel.options[i];
|
74
|
+
|
75
|
+
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
76
|
+
option.selected = true;
|
77
|
+
found = true;
|
78
|
+
} else
|
79
|
+
option.selected = false;
|
80
|
+
}
|
81
|
+
|
82
|
+
if (!found && add_custom && value != '') {
|
83
|
+
var option = new Option(value, value);
|
84
|
+
option.selected = true;
|
85
|
+
sel.options[sel.options.length] = option;
|
86
|
+
sel.selectedIndex = sel.options.length - 1;
|
87
|
+
}
|
88
|
+
|
89
|
+
return found;
|
90
|
+
}
|
91
|
+
|
92
|
+
function getSelectValue(form_obj, field_name) {
|
93
|
+
var elm = form_obj.elements[field_name];
|
94
|
+
|
95
|
+
if (elm == null || elm.options == null || elm.selectedIndex === -1)
|
96
|
+
return "";
|
97
|
+
|
98
|
+
return elm.options[elm.selectedIndex].value;
|
99
|
+
}
|
100
|
+
|
101
|
+
function addSelectValue(form_obj, field_name, name, value) {
|
102
|
+
var s = form_obj.elements[field_name];
|
103
|
+
var o = new Option(name, value);
|
104
|
+
s.options[s.options.length] = o;
|
105
|
+
}
|
106
|
+
|
107
|
+
function addClassesToList(list_id, specific_option) {
|
108
|
+
// Setup class droplist
|
109
|
+
var styleSelectElm = document.getElementById(list_id);
|
110
|
+
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
111
|
+
styles = tinyMCEPopup.getParam(specific_option, styles);
|
112
|
+
|
113
|
+
if (styles) {
|
114
|
+
var stylesAr = styles.split(';');
|
115
|
+
|
116
|
+
for (var i=0; i<stylesAr.length; i++) {
|
117
|
+
if (stylesAr != "") {
|
118
|
+
var key, value;
|
119
|
+
|
120
|
+
key = stylesAr[i].split('=')[0];
|
121
|
+
value = stylesAr[i].split('=')[1];
|
122
|
+
|
123
|
+
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
} else {
|
127
|
+
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
128
|
+
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
129
|
+
});
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
function isVisible(element_id) {
|
134
|
+
var elm = document.getElementById(element_id);
|
135
|
+
|
136
|
+
return elm && elm.style.display != "none";
|
137
|
+
}
|
138
|
+
|
139
|
+
function convertRGBToHex(col) {
|
140
|
+
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
141
|
+
|
142
|
+
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
143
|
+
if (rgb.length == 3) {
|
144
|
+
r = parseInt(rgb[0]).toString(16);
|
145
|
+
g = parseInt(rgb[1]).toString(16);
|
146
|
+
b = parseInt(rgb[2]).toString(16);
|
147
|
+
|
148
|
+
r = r.length == 1 ? '0' + r : r;
|
149
|
+
g = g.length == 1 ? '0' + g : g;
|
150
|
+
b = b.length == 1 ? '0' + b : b;
|
151
|
+
|
152
|
+
return "#" + r + g + b;
|
153
|
+
}
|
154
|
+
|
155
|
+
return col;
|
156
|
+
}
|
157
|
+
|
158
|
+
function convertHexToRGB(col) {
|
159
|
+
if (col.indexOf('#') != -1) {
|
160
|
+
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
161
|
+
|
162
|
+
r = parseInt(col.substring(0, 2), 16);
|
163
|
+
g = parseInt(col.substring(2, 4), 16);
|
164
|
+
b = parseInt(col.substring(4, 6), 16);
|
165
|
+
|
166
|
+
return "rgb(" + r + "," + g + "," + b + ")";
|
167
|
+
}
|
168
|
+
|
169
|
+
return col;
|
170
|
+
}
|
171
|
+
|
172
|
+
function trimSize(size) {
|
173
|
+
return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
|
174
|
+
}
|
175
|
+
|
176
|
+
function getCSSSize(size) {
|
177
|
+
size = trimSize(size);
|
178
|
+
|
179
|
+
if (size == "")
|
180
|
+
return "";
|
181
|
+
|
182
|
+
// Add px
|
183
|
+
if (/^[0-9]+$/.test(size))
|
184
|
+
size += 'px';
|
185
|
+
|
186
|
+
return size;
|
187
|
+
}
|
188
|
+
|
189
|
+
function getStyle(elm, attrib, style) {
|
190
|
+
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
191
|
+
|
192
|
+
if (val != '')
|
193
|
+
return '' + val;
|
194
|
+
|
195
|
+
if (typeof(style) == 'undefined')
|
196
|
+
style = attrib;
|
197
|
+
|
198
|
+
return tinyMCEPopup.dom.getStyle(elm, style);
|
199
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: mctabs.js 758 2008-03-30 13:53:29Z spocke $
|
3
|
+
*
|
4
|
+
* Moxiecode DHTML Tabs script.
|
5
|
+
*
|
6
|
+
* @author Moxiecode
|
7
|
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8
|
+
*/
|
9
|
+
|
10
|
+
function MCTabs() {
|
11
|
+
this.settings = [];
|
12
|
+
};
|
13
|
+
|
14
|
+
MCTabs.prototype.init = function(settings) {
|
15
|
+
this.settings = settings;
|
16
|
+
};
|
17
|
+
|
18
|
+
MCTabs.prototype.getParam = function(name, default_value) {
|
19
|
+
var value = null;
|
20
|
+
|
21
|
+
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
22
|
+
|
23
|
+
// Fix bool values
|
24
|
+
if (value == "true" || value == "false")
|
25
|
+
return (value == "true");
|
26
|
+
|
27
|
+
return value;
|
28
|
+
};
|
29
|
+
|
30
|
+
MCTabs.prototype.displayTab = function(tab_id, panel_id) {
|
31
|
+
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i;
|
32
|
+
|
33
|
+
panelElm= document.getElementById(panel_id);
|
34
|
+
panelContainerElm = panelElm ? panelElm.parentNode : null;
|
35
|
+
tabElm = document.getElementById(tab_id);
|
36
|
+
tabContainerElm = tabElm ? tabElm.parentNode : null;
|
37
|
+
selectionClass = this.getParam('selection_class', 'current');
|
38
|
+
|
39
|
+
if (tabElm && tabContainerElm) {
|
40
|
+
nodes = tabContainerElm.childNodes;
|
41
|
+
|
42
|
+
// Hide all other tabs
|
43
|
+
for (i = 0; i < nodes.length; i++) {
|
44
|
+
if (nodes[i].nodeName == "LI")
|
45
|
+
nodes[i].className = '';
|
46
|
+
}
|
47
|
+
|
48
|
+
// Show selected tab
|
49
|
+
tabElm.className = 'current';
|
50
|
+
}
|
51
|
+
|
52
|
+
if (panelElm && panelContainerElm) {
|
53
|
+
nodes = panelContainerElm.childNodes;
|
54
|
+
|
55
|
+
// Hide all other panels
|
56
|
+
for (i = 0; i < nodes.length; i++) {
|
57
|
+
if (nodes[i].nodeName == "DIV")
|
58
|
+
nodes[i].className = 'panel';
|
59
|
+
}
|
60
|
+
|
61
|
+
// Show selected panel
|
62
|
+
panelElm.className = 'current';
|
63
|
+
}
|
64
|
+
};
|
65
|
+
|
66
|
+
MCTabs.prototype.getAnchor = function() {
|
67
|
+
var pos, url = document.location.href;
|
68
|
+
|
69
|
+
if ((pos = url.lastIndexOf('#')) != -1)
|
70
|
+
return url.substring(pos + 1);
|
71
|
+
|
72
|
+
return "";
|
73
|
+
};
|
74
|
+
|
75
|
+
// Global instance
|
76
|
+
var mcTabs = new MCTabs();
|
@@ -0,0 +1,219 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: validate.js 758 2008-03-30 13:53:29Z spocke $
|
3
|
+
*
|
4
|
+
* Various form validation methods.
|
5
|
+
*
|
6
|
+
* @author Moxiecode
|
7
|
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
8
|
+
*/
|
9
|
+
|
10
|
+
/**
|
11
|
+
// String validation:
|
12
|
+
|
13
|
+
if (!Validator.isEmail('myemail'))
|
14
|
+
alert('Invalid email.');
|
15
|
+
|
16
|
+
// Form validation:
|
17
|
+
|
18
|
+
var f = document.forms['myform'];
|
19
|
+
|
20
|
+
if (!Validator.isEmail(f.myemail))
|
21
|
+
alert('Invalid email.');
|
22
|
+
*/
|
23
|
+
|
24
|
+
var Validator = {
|
25
|
+
isEmail : function(s) {
|
26
|
+
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
27
|
+
},
|
28
|
+
|
29
|
+
isAbsUrl : function(s) {
|
30
|
+
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
31
|
+
},
|
32
|
+
|
33
|
+
isSize : function(s) {
|
34
|
+
return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
|
35
|
+
},
|
36
|
+
|
37
|
+
isId : function(s) {
|
38
|
+
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
39
|
+
},
|
40
|
+
|
41
|
+
isEmpty : function(s) {
|
42
|
+
var nl, i;
|
43
|
+
|
44
|
+
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
45
|
+
return true;
|
46
|
+
|
47
|
+
if (s.type == 'checkbox' && !s.checked)
|
48
|
+
return true;
|
49
|
+
|
50
|
+
if (s.type == 'radio') {
|
51
|
+
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
52
|
+
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
53
|
+
return false;
|
54
|
+
}
|
55
|
+
|
56
|
+
return true;
|
57
|
+
}
|
58
|
+
|
59
|
+
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
60
|
+
},
|
61
|
+
|
62
|
+
isNumber : function(s, d) {
|
63
|
+
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
64
|
+
},
|
65
|
+
|
66
|
+
test : function(s, p) {
|
67
|
+
s = s.nodeType == 1 ? s.value : s;
|
68
|
+
|
69
|
+
return s == '' || new RegExp(p).test(s);
|
70
|
+
}
|
71
|
+
};
|
72
|
+
|
73
|
+
var AutoValidator = {
|
74
|
+
settings : {
|
75
|
+
id_cls : 'id',
|
76
|
+
int_cls : 'int',
|
77
|
+
url_cls : 'url',
|
78
|
+
number_cls : 'number',
|
79
|
+
email_cls : 'email',
|
80
|
+
size_cls : 'size',
|
81
|
+
required_cls : 'required',
|
82
|
+
invalid_cls : 'invalid',
|
83
|
+
min_cls : 'min',
|
84
|
+
max_cls : 'max'
|
85
|
+
},
|
86
|
+
|
87
|
+
init : function(s) {
|
88
|
+
var n;
|
89
|
+
|
90
|
+
for (n in s)
|
91
|
+
this.settings[n] = s[n];
|
92
|
+
},
|
93
|
+
|
94
|
+
validate : function(f) {
|
95
|
+
var i, nl, s = this.settings, c = 0;
|
96
|
+
|
97
|
+
nl = this.tags(f, 'label');
|
98
|
+
for (i=0; i<nl.length; i++)
|
99
|
+
this.removeClass(nl[i], s.invalid_cls);
|
100
|
+
|
101
|
+
c += this.validateElms(f, 'input');
|
102
|
+
c += this.validateElms(f, 'select');
|
103
|
+
c += this.validateElms(f, 'textarea');
|
104
|
+
|
105
|
+
return c == 3;
|
106
|
+
},
|
107
|
+
|
108
|
+
invalidate : function(n) {
|
109
|
+
this.mark(n.form, n);
|
110
|
+
},
|
111
|
+
|
112
|
+
reset : function(e) {
|
113
|
+
var t = ['label', 'input', 'select', 'textarea'];
|
114
|
+
var i, j, nl, s = this.settings;
|
115
|
+
|
116
|
+
if (e == null)
|
117
|
+
return;
|
118
|
+
|
119
|
+
for (i=0; i<t.length; i++) {
|
120
|
+
nl = this.tags(e.form ? e.form : e, t[i]);
|
121
|
+
for (j=0; j<nl.length; j++)
|
122
|
+
this.removeClass(nl[j], s.invalid_cls);
|
123
|
+
}
|
124
|
+
},
|
125
|
+
|
126
|
+
validateElms : function(f, e) {
|
127
|
+
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
128
|
+
|
129
|
+
nl = this.tags(f, e);
|
130
|
+
for (i=0; i<nl.length; i++) {
|
131
|
+
n = nl[i];
|
132
|
+
|
133
|
+
this.removeClass(n, s.invalid_cls);
|
134
|
+
|
135
|
+
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
136
|
+
st = this.mark(f, n);
|
137
|
+
|
138
|
+
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
139
|
+
st = this.mark(f, n);
|
140
|
+
|
141
|
+
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
142
|
+
st = this.mark(f, n);
|
143
|
+
|
144
|
+
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
145
|
+
st = this.mark(f, n);
|
146
|
+
|
147
|
+
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
148
|
+
st = this.mark(f, n);
|
149
|
+
|
150
|
+
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
151
|
+
st = this.mark(f, n);
|
152
|
+
|
153
|
+
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
154
|
+
st = this.mark(f, n);
|
155
|
+
|
156
|
+
if (this.hasClass(n, s.min_cls, true)) {
|
157
|
+
v = this.getNum(n, s.min_cls);
|
158
|
+
|
159
|
+
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
160
|
+
st = this.mark(f, n);
|
161
|
+
}
|
162
|
+
|
163
|
+
if (this.hasClass(n, s.max_cls, true)) {
|
164
|
+
v = this.getNum(n, s.max_cls);
|
165
|
+
|
166
|
+
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
167
|
+
st = this.mark(f, n);
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
return st;
|
172
|
+
},
|
173
|
+
|
174
|
+
hasClass : function(n, c, d) {
|
175
|
+
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
176
|
+
},
|
177
|
+
|
178
|
+
getNum : function(n, c) {
|
179
|
+
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
180
|
+
c = c.replace(/[^0-9]/g, '');
|
181
|
+
|
182
|
+
return c;
|
183
|
+
},
|
184
|
+
|
185
|
+
addClass : function(n, c, b) {
|
186
|
+
var o = this.removeClass(n, c);
|
187
|
+
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
188
|
+
},
|
189
|
+
|
190
|
+
removeClass : function(n, c) {
|
191
|
+
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
192
|
+
return n.className = c != ' ' ? c : '';
|
193
|
+
},
|
194
|
+
|
195
|
+
tags : function(f, s) {
|
196
|
+
return f.getElementsByTagName(s);
|
197
|
+
},
|
198
|
+
|
199
|
+
mark : function(f, n) {
|
200
|
+
var s = this.settings;
|
201
|
+
|
202
|
+
this.addClass(n, s.invalid_cls);
|
203
|
+
this.markLabels(f, n, s.invalid_cls);
|
204
|
+
|
205
|
+
return false;
|
206
|
+
},
|
207
|
+
|
208
|
+
markLabels : function(f, n, ic) {
|
209
|
+
var nl, i;
|
210
|
+
|
211
|
+
nl = this.tags(f, "label");
|
212
|
+
for (i=0; i<nl.length; i++) {
|
213
|
+
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
214
|
+
this.addClass(nl[i], ic);
|
215
|
+
}
|
216
|
+
|
217
|
+
return null;
|
218
|
+
}
|
219
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
$.fn.upload_maker = function(destination) {
|
2
|
+
$(this).each(function() {
|
3
|
+
//Get some vars
|
4
|
+
var id = $(this).attr('id');
|
5
|
+
var image_input_id = id + '_image_url';
|
6
|
+
//write the iframe
|
7
|
+
$(this).before('<iframe style="height: 1em;width:650px" src="'+destination+'&destination=' + image_input_id +'" frameborder="0"></iframe>');
|
8
|
+
//write hidden input
|
9
|
+
$(this).after('<input id="' + image_input_id +'" name="' + image_input_id +'" style="position:absolute;left:-9999em" />');
|
10
|
+
$('#' + image_input_id).focus(function() {
|
11
|
+
var url = $(this).val();
|
12
|
+
if (tinyMCE && (ed = tinyMCE.get(id))) {
|
13
|
+
ed.execCommand('mceInsertContent', false, '<img src="' + url + '" alt="' + url + '" />');
|
14
|
+
} else {
|
15
|
+
insertTag(id, '<img src="' + url + '" alt="' + url + '" />');
|
16
|
+
}
|
17
|
+
});
|
18
|
+
})
|
19
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class KitsuneCreateKitsuneUsers < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table(:kitsune_users) do |t|
|
4
|
+
t.string :email
|
5
|
+
t.string :encrypted_password
|
6
|
+
t.string :username
|
7
|
+
t.string :salt
|
8
|
+
t.string :remember_token
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :kitsune_users
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class KitsuneCreatePages < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table(:pages) do |t|
|
4
|
+
t.string :title
|
5
|
+
t.string :url
|
6
|
+
t.string :layout
|
7
|
+
t.text :body
|
8
|
+
t.integer :parent_id
|
9
|
+
t.text :data
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :pages
|
15
|
+
end
|
16
|
+
end
|