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,98 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: editor_plugin_src.js 851 2008-05-26 15:38:49Z spocke $
|
3
|
+
*
|
4
|
+
* @author Moxiecode
|
5
|
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6
|
+
*/
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
tinymce.create('tinymce.plugins.Save', {
|
10
|
+
init : function(ed, url) {
|
11
|
+
var t = this;
|
12
|
+
|
13
|
+
t.editor = ed;
|
14
|
+
|
15
|
+
// Register commands
|
16
|
+
ed.addCommand('mceSave', t._save, t);
|
17
|
+
ed.addCommand('mceCancel', t._cancel, t);
|
18
|
+
|
19
|
+
// Register buttons
|
20
|
+
ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'});
|
21
|
+
ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'});
|
22
|
+
|
23
|
+
ed.onNodeChange.add(t._nodeChange, t);
|
24
|
+
ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave');
|
25
|
+
},
|
26
|
+
|
27
|
+
getInfo : function() {
|
28
|
+
return {
|
29
|
+
longname : 'Save',
|
30
|
+
author : 'Moxiecode Systems AB',
|
31
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
32
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',
|
33
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
34
|
+
};
|
35
|
+
},
|
36
|
+
|
37
|
+
// Private methods
|
38
|
+
|
39
|
+
_nodeChange : function(ed, cm, n) {
|
40
|
+
var ed = this.editor;
|
41
|
+
|
42
|
+
if (ed.getParam('save_enablewhendirty')) {
|
43
|
+
cm.setDisabled('save', !ed.isDirty());
|
44
|
+
cm.setDisabled('cancel', !ed.isDirty());
|
45
|
+
}
|
46
|
+
},
|
47
|
+
|
48
|
+
// Private methods
|
49
|
+
|
50
|
+
_save : function() {
|
51
|
+
var ed = this.editor, formObj, os, i, elementId;
|
52
|
+
|
53
|
+
formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form');
|
54
|
+
|
55
|
+
if (ed.getParam("save_enablewhendirty") && !ed.isDirty())
|
56
|
+
return;
|
57
|
+
|
58
|
+
tinyMCE.triggerSave();
|
59
|
+
|
60
|
+
// Use callback instead
|
61
|
+
if (os = ed.getParam("save_onsavecallback")) {
|
62
|
+
if (ed.execCallback('save_onsavecallback', ed)) {
|
63
|
+
ed.startContent = tinymce.trim(ed.getContent({format : 'raw'}));
|
64
|
+
ed.nodeChanged();
|
65
|
+
}
|
66
|
+
|
67
|
+
return;
|
68
|
+
}
|
69
|
+
|
70
|
+
if (formObj) {
|
71
|
+
ed.isNotDirty = true;
|
72
|
+
|
73
|
+
if (formObj.onsubmit == null || formObj.onsubmit() != false)
|
74
|
+
formObj.submit();
|
75
|
+
|
76
|
+
ed.nodeChanged();
|
77
|
+
} else
|
78
|
+
ed.windowManager.alert("Error: No form element found.");
|
79
|
+
},
|
80
|
+
|
81
|
+
_cancel : function() {
|
82
|
+
var ed = this.editor, os, h = tinymce.trim(ed.startContent);
|
83
|
+
|
84
|
+
// Use callback instead
|
85
|
+
if (os = ed.getParam("save_oncancelcallback")) {
|
86
|
+
ed.execCallback('save_oncancelcallback', ed);
|
87
|
+
return;
|
88
|
+
}
|
89
|
+
|
90
|
+
ed.setContent(h);
|
91
|
+
ed.undoManager.clear();
|
92
|
+
ed.nodeChanged();
|
93
|
+
}
|
94
|
+
});
|
95
|
+
|
96
|
+
// Register plugin
|
97
|
+
tinymce.PluginManager.add('save', tinymce.plugins.Save);
|
98
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:160+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})();
|
data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: editor_plugin_src.js 686 2008-03-09 18:13:49Z spocke $
|
3
|
+
*
|
4
|
+
* @author Moxiecode
|
5
|
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6
|
+
*/
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
tinymce.create('tinymce.plugins.SearchReplacePlugin', {
|
10
|
+
init : function(ed, url) {
|
11
|
+
function open(m) {
|
12
|
+
ed.windowManager.open({
|
13
|
+
file : url + '/searchreplace.htm',
|
14
|
+
width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)),
|
15
|
+
height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
|
16
|
+
inline : 1,
|
17
|
+
auto_focus : 0
|
18
|
+
}, {
|
19
|
+
mode : m,
|
20
|
+
search_string : ed.selection.getContent({format : 'text'}),
|
21
|
+
plugin_url : url
|
22
|
+
});
|
23
|
+
};
|
24
|
+
|
25
|
+
// Register commands
|
26
|
+
ed.addCommand('mceSearch', function() {
|
27
|
+
open('search');
|
28
|
+
});
|
29
|
+
|
30
|
+
ed.addCommand('mceReplace', function() {
|
31
|
+
open('replace');
|
32
|
+
});
|
33
|
+
|
34
|
+
// Register buttons
|
35
|
+
ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'});
|
36
|
+
ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'});
|
37
|
+
|
38
|
+
ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch');
|
39
|
+
},
|
40
|
+
|
41
|
+
getInfo : function() {
|
42
|
+
return {
|
43
|
+
longname : 'Search/Replace',
|
44
|
+
author : 'Moxiecode Systems AB',
|
45
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
46
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
|
47
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
48
|
+
};
|
49
|
+
}
|
50
|
+
});
|
51
|
+
|
52
|
+
// Register plugin
|
53
|
+
tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin);
|
54
|
+
})();
|
data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
var SearchReplaceDialog = {
|
4
|
+
init : function(ed) {
|
5
|
+
var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
6
|
+
|
7
|
+
this.switchMode(m);
|
8
|
+
|
9
|
+
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
10
|
+
|
11
|
+
// Focus input field
|
12
|
+
f[m + '_panel_searchstring'].focus();
|
13
|
+
},
|
14
|
+
|
15
|
+
switchMode : function(m) {
|
16
|
+
var f, lm = this.lastMode;
|
17
|
+
|
18
|
+
if (lm != m) {
|
19
|
+
f = document.forms[0];
|
20
|
+
|
21
|
+
if (lm) {
|
22
|
+
f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
|
23
|
+
f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
|
24
|
+
f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
|
25
|
+
f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
|
26
|
+
}
|
27
|
+
|
28
|
+
mcTabs.displayTab(m + '_tab', m + '_panel');
|
29
|
+
document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
|
30
|
+
document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
|
31
|
+
this.lastMode = m;
|
32
|
+
}
|
33
|
+
},
|
34
|
+
|
35
|
+
searchNext : function(a) {
|
36
|
+
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
|
37
|
+
|
38
|
+
// Get input
|
39
|
+
f = document.forms[0];
|
40
|
+
s = f[m + '_panel_searchstring'].value;
|
41
|
+
b = f[m + '_panel_backwardsu'].checked;
|
42
|
+
ca = f[m + '_panel_casesensitivebox'].checked;
|
43
|
+
rs = f['replace_panel_replacestring'].value;
|
44
|
+
|
45
|
+
if (s == '')
|
46
|
+
return;
|
47
|
+
|
48
|
+
function fix() {
|
49
|
+
// Correct Firefox graphics glitches
|
50
|
+
r = se.getRng().cloneRange();
|
51
|
+
ed.getDoc().execCommand('SelectAll', false, null);
|
52
|
+
se.setRng(r);
|
53
|
+
};
|
54
|
+
|
55
|
+
function replace() {
|
56
|
+
if (tinymce.isIE)
|
57
|
+
ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE
|
58
|
+
else
|
59
|
+
ed.getDoc().execCommand('InsertHTML', false, rs);
|
60
|
+
};
|
61
|
+
|
62
|
+
// IE flags
|
63
|
+
if (ca)
|
64
|
+
fl = fl | 4;
|
65
|
+
|
66
|
+
switch (a) {
|
67
|
+
case 'all':
|
68
|
+
// Move caret to beginning of text
|
69
|
+
ed.execCommand('SelectAll');
|
70
|
+
ed.selection.collapse(true);
|
71
|
+
|
72
|
+
if (tinymce.isIE) {
|
73
|
+
while (r.findText(s, b ? -1 : 1, fl)) {
|
74
|
+
r.scrollIntoView();
|
75
|
+
r.select();
|
76
|
+
replace();
|
77
|
+
fo = 1;
|
78
|
+
}
|
79
|
+
|
80
|
+
tinyMCEPopup.storeSelection();
|
81
|
+
} else {
|
82
|
+
while (w.find(s, ca, b, false, false, false, false)) {
|
83
|
+
replace();
|
84
|
+
fo = 1;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
if (fo)
|
89
|
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
|
90
|
+
else
|
91
|
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
92
|
+
|
93
|
+
return;
|
94
|
+
|
95
|
+
case 'current':
|
96
|
+
if (!ed.selection.isCollapsed())
|
97
|
+
replace();
|
98
|
+
|
99
|
+
break;
|
100
|
+
}
|
101
|
+
|
102
|
+
se.collapse(b);
|
103
|
+
r = se.getRng();
|
104
|
+
|
105
|
+
// Whats the point
|
106
|
+
if (!s)
|
107
|
+
return;
|
108
|
+
|
109
|
+
if (tinymce.isIE) {
|
110
|
+
if (r.findText(s, b ? -1 : 1, fl)) {
|
111
|
+
r.scrollIntoView();
|
112
|
+
r.select();
|
113
|
+
} else
|
114
|
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
115
|
+
|
116
|
+
tinyMCEPopup.storeSelection();
|
117
|
+
} else {
|
118
|
+
if (!w.find(s, ca, b, false, false, false, false))
|
119
|
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
120
|
+
else
|
121
|
+
fix();
|
122
|
+
}
|
123
|
+
}
|
124
|
+
};
|
125
|
+
|
126
|
+
tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
|
@@ -0,0 +1,16 @@
|
|
1
|
+
tinyMCE.addI18n('en.searchreplace_dlg',{
|
2
|
+
searchnext_desc:"Find again",
|
3
|
+
notfound:"The search has been completed. The search string could not be found.",
|
4
|
+
search_title:"Find",
|
5
|
+
replace_title:"Find/Replace",
|
6
|
+
allreplaced:"All occurrences of the search string were replaced.",
|
7
|
+
findwhat:"Find what",
|
8
|
+
replacewith:"Replace with",
|
9
|
+
direction:"Direction",
|
10
|
+
up:"Up",
|
11
|
+
down:"Down",
|
12
|
+
mcase:"Match case",
|
13
|
+
findnext:"Find next",
|
14
|
+
replace:"Replace",
|
15
|
+
replaceall:"Replace all"
|
16
|
+
});
|
data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>{#searchreplace_dlg.replace_title}</title>
|
5
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6
|
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7
|
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8
|
+
<script type="text/javascript" src="js/searchreplace.js"></script>
|
9
|
+
<link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
|
10
|
+
</head>
|
11
|
+
<body style="display:none;">
|
12
|
+
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
13
|
+
<div class="tabs">
|
14
|
+
<ul>
|
15
|
+
<li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
16
|
+
<li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
17
|
+
</ul>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="panel_wrapper">
|
21
|
+
<div id="search_panel" class="panel">
|
22
|
+
<table border="0" cellspacing="0" cellpadding="2">
|
23
|
+
<tr>
|
24
|
+
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
25
|
+
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td colspan="2">
|
29
|
+
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
30
|
+
<tr>
|
31
|
+
<td><label>{#searchreplace_dlg.direction}</label></td>
|
32
|
+
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
33
|
+
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
34
|
+
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
35
|
+
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
36
|
+
</tr>
|
37
|
+
</table>
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<tr>
|
41
|
+
<td colspan="2">
|
42
|
+
<table border="0" cellspacing="0" cellpadding="0">
|
43
|
+
<tr>
|
44
|
+
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
45
|
+
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
46
|
+
</tr>
|
47
|
+
</table>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
</table>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="replace_panel" class="panel">
|
54
|
+
<table border="0" cellspacing="0" cellpadding="2">
|
55
|
+
<tr>
|
56
|
+
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
57
|
+
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
61
|
+
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td colspan="2">
|
65
|
+
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
66
|
+
<tr>
|
67
|
+
<td><label>{#searchreplace_dlg.direction}</label></td>
|
68
|
+
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
69
|
+
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
70
|
+
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
71
|
+
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
<tr>
|
77
|
+
<td colspan="2">
|
78
|
+
<table border="0" cellspacing="0" cellpadding="0">
|
79
|
+
<tr>
|
80
|
+
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
81
|
+
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
82
|
+
</tr>
|
83
|
+
</table>
|
84
|
+
</td>
|
85
|
+
</tr>
|
86
|
+
</table>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div class="mceActionPanel">
|
92
|
+
<div style="float: left">
|
93
|
+
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
94
|
+
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
95
|
+
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<div style="float: right">
|
99
|
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
</form>
|
103
|
+
</body>
|
104
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;e.addCommand("mceSpellCheck",function(){if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);e.windowManager.alert("spellchecker.no_mpell")}})}else{g._done()}});e.onInit.add(function(){if(e.settings.content_css!==false){e.dom.loadCSS(f+"/css/content.css")}});e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}����������������\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={};this._walk(e.getBody(),function(h){if(h.nodeType==3){d+=h.nodeValue+" "}});d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));c(d.split(" "),function(h){if(!f[h]){g.push(h);f[h]=1}});return g},_removeWords:function(e){var f=this.editor,h=f.dom,g=f.selection,d=g.getBookmark();c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!e||h.decode(i.innerHTML)==e){h.remove(i,1)}}});g.moveToBookmark(d)},_markWords:function(o){var i,h,g,f,e,n="",k=this.editor,p=this._getSeparators(),j=k.dom,d=[];var l=k.selection,m=l.getBookmark();c(o,function(q){n+=(n?"|":"")+q});i=new RegExp("(["+p+"])("+n+")(["+p+"])","g");h=new RegExp("^("+n+")","g");g=new RegExp("("+n+")(["+p+"]?)$","g");f=new RegExp("^("+n+")(["+p+"]?)$","g");e=new RegExp("("+n+")(["+p+"])","g");this._walk(this.editor.getBody(),function(q){if(q.nodeType==3){d.push(q)}});c(d,function(r){var q;if(r.nodeType==3){q=r.nodeValue;if(i.test(q)||h.test(q)||g.test(q)||f.test(q)){q=j.encode(q);q=q.replace(e,'<span class="mceItemHiddenSpellWord">$1</span>$2');q=q.replace(g,'<span class="mceItemHiddenSpellWord">$1</span>$2');j.replace(j.create("span",{"class":"mceItemHidden"},q),r)}}});l.moveToBookmark(m)},_showMenu:function(g,i){var h=this,g=h.editor,d=h._menu,k,j=g.dom,f=j.getViewPort(g.getWin());if(!d){k=b.getPos(g.getContentAreaContainer());d=g.controlManager.createDropMenu("spellcheckermenu",{offset_x:k.x,offset_y:k.y,"class":"mceNoIcons"});h._menu=d}if(j.hasClass(i.target,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);h._sendRPC("getSuggestions",[h.selectedLang,j.decode(i.target.innerHTML)],function(e){d.removeAll();if(e.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(e,function(l){d.add({title:l,onclick:function(){j.replace(g.getDoc().createTextNode(l),i.target);h._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}d.add({title:"spellchecker.ignore_word",onclick:function(){j.remove(i.target,1);h._checkDone()}});d.add({title:"spellchecker.ignore_words",onclick:function(){h._removeWords(j.decode(i.target.innerHTML));h._checkDone()}});d.update()});g.selection.select(i.target);k=j.getPos(i.target);d.showMenu(k.x,k.y+i.target.offsetHeight-f.y);return tinymce.dom.Event.cancel(i)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,h,d){var g=this,f=g.editor.getParam("spellchecker_rpc_url","{backend}");if(f=="{backend}"){g.editor.setProgressState(0);alert("Please specify: spellchecker_rpc_url");return}a.sendRPC({url:f,method:e,params:h,success:d,error:function(j,i){g.editor.setProgressState(0);g.editor.windowManager.alert(j.errstr||("Error response: "+i.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
|