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
data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js
ADDED
@@ -0,0 +1,338 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $
|
3
|
+
*
|
4
|
+
* @author Moxiecode
|
5
|
+
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
|
6
|
+
*/
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
|
10
|
+
|
11
|
+
tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
|
12
|
+
getInfo : function() {
|
13
|
+
return {
|
14
|
+
longname : 'Spellchecker',
|
15
|
+
author : 'Moxiecode Systems AB',
|
16
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
17
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
|
18
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
19
|
+
};
|
20
|
+
},
|
21
|
+
|
22
|
+
init : function(ed, url) {
|
23
|
+
var t = this, cm;
|
24
|
+
|
25
|
+
t.url = url;
|
26
|
+
t.editor = ed;
|
27
|
+
|
28
|
+
// Register commands
|
29
|
+
ed.addCommand('mceSpellCheck', function() {
|
30
|
+
if (!t.active) {
|
31
|
+
ed.setProgressState(1);
|
32
|
+
t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
|
33
|
+
if (r.length > 0) {
|
34
|
+
t.active = 1;
|
35
|
+
t._markWords(r);
|
36
|
+
ed.setProgressState(0);
|
37
|
+
ed.nodeChanged();
|
38
|
+
} else {
|
39
|
+
ed.setProgressState(0);
|
40
|
+
ed.windowManager.alert('spellchecker.no_mpell');
|
41
|
+
}
|
42
|
+
});
|
43
|
+
} else
|
44
|
+
t._done();
|
45
|
+
});
|
46
|
+
|
47
|
+
ed.onInit.add(function() {
|
48
|
+
if (ed.settings.content_css !== false)
|
49
|
+
ed.dom.loadCSS(url + '/css/content.css');
|
50
|
+
});
|
51
|
+
|
52
|
+
ed.onClick.add(t._showMenu, t);
|
53
|
+
ed.onContextMenu.add(t._showMenu, t);
|
54
|
+
ed.onBeforeGetContent.add(function() {
|
55
|
+
if (t.active)
|
56
|
+
t._removeWords();
|
57
|
+
});
|
58
|
+
|
59
|
+
ed.onNodeChange.add(function(ed, cm) {
|
60
|
+
cm.setActive('spellchecker', t.active);
|
61
|
+
});
|
62
|
+
|
63
|
+
ed.onSetContent.add(function() {
|
64
|
+
t._done();
|
65
|
+
});
|
66
|
+
|
67
|
+
ed.onBeforeGetContent.add(function() {
|
68
|
+
t._done();
|
69
|
+
});
|
70
|
+
|
71
|
+
ed.onBeforeExecCommand.add(function(ed, cmd) {
|
72
|
+
if (cmd == 'mceFullScreen')
|
73
|
+
t._done();
|
74
|
+
});
|
75
|
+
|
76
|
+
// Find selected language
|
77
|
+
t.languages = {};
|
78
|
+
each(ed.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(v, k) {
|
79
|
+
if (k.indexOf('+') === 0) {
|
80
|
+
k = k.substring(1);
|
81
|
+
t.selectedLang = v;
|
82
|
+
}
|
83
|
+
|
84
|
+
t.languages[k] = v;
|
85
|
+
});
|
86
|
+
},
|
87
|
+
|
88
|
+
createControl : function(n, cm) {
|
89
|
+
var t = this, c, ed = t.editor;
|
90
|
+
|
91
|
+
if (n == 'spellchecker') {
|
92
|
+
c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
|
93
|
+
|
94
|
+
c.onRenderMenu.add(function(c, m) {
|
95
|
+
m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
96
|
+
each(t.languages, function(v, k) {
|
97
|
+
var o = {icon : 1}, mi;
|
98
|
+
|
99
|
+
o.onclick = function() {
|
100
|
+
mi.setSelected(1);
|
101
|
+
t.selectedItem.setSelected(0);
|
102
|
+
t.selectedItem = mi;
|
103
|
+
t.selectedLang = v;
|
104
|
+
};
|
105
|
+
|
106
|
+
o.title = k;
|
107
|
+
mi = m.add(o);
|
108
|
+
mi.setSelected(v == t.selectedLang);
|
109
|
+
|
110
|
+
if (v == t.selectedLang)
|
111
|
+
t.selectedItem = mi;
|
112
|
+
})
|
113
|
+
});
|
114
|
+
|
115
|
+
return c;
|
116
|
+
}
|
117
|
+
},
|
118
|
+
|
119
|
+
// Internal functions
|
120
|
+
|
121
|
+
_walk : function(n, f) {
|
122
|
+
var d = this.editor.getDoc(), w;
|
123
|
+
|
124
|
+
if (d.createTreeWalker) {
|
125
|
+
w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
|
126
|
+
|
127
|
+
while ((n = w.nextNode()) != null)
|
128
|
+
f.call(this, n);
|
129
|
+
} else
|
130
|
+
tinymce.walk(n, f, 'childNodes');
|
131
|
+
},
|
132
|
+
|
133
|
+
_getSeparators : function() {
|
134
|
+
var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');
|
135
|
+
|
136
|
+
// Build word separator regexp
|
137
|
+
for (i=0; i<str.length; i++)
|
138
|
+
re += '\\' + str.charAt(i);
|
139
|
+
|
140
|
+
return re;
|
141
|
+
},
|
142
|
+
|
143
|
+
_getWords : function() {
|
144
|
+
var ed = this.editor, wl = [], tx = '', lo = {};
|
145
|
+
|
146
|
+
// Get area text
|
147
|
+
this._walk(ed.getBody(), function(n) {
|
148
|
+
if (n.nodeType == 3)
|
149
|
+
tx += n.nodeValue + ' ';
|
150
|
+
});
|
151
|
+
|
152
|
+
// Split words by separator
|
153
|
+
tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
|
154
|
+
tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
|
155
|
+
|
156
|
+
// Build word array and remove duplicates
|
157
|
+
each(tx.split(' '), function(v) {
|
158
|
+
if (!lo[v]) {
|
159
|
+
wl.push(v);
|
160
|
+
lo[v] = 1;
|
161
|
+
}
|
162
|
+
});
|
163
|
+
|
164
|
+
return wl;
|
165
|
+
},
|
166
|
+
|
167
|
+
_removeWords : function(w) {
|
168
|
+
var ed = this.editor, dom = ed.dom, se = ed.selection, b = se.getBookmark();
|
169
|
+
|
170
|
+
each(dom.select('span').reverse(), function(n) {
|
171
|
+
if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
|
172
|
+
if (!w || dom.decode(n.innerHTML) == w)
|
173
|
+
dom.remove(n, 1);
|
174
|
+
}
|
175
|
+
});
|
176
|
+
|
177
|
+
se.moveToBookmark(b);
|
178
|
+
},
|
179
|
+
|
180
|
+
_markWords : function(wl) {
|
181
|
+
var r1, r2, r3, r4, r5, w = '', ed = this.editor, re = this._getSeparators(), dom = ed.dom, nl = [];
|
182
|
+
var se = ed.selection, b = se.getBookmark();
|
183
|
+
|
184
|
+
each(wl, function(v) {
|
185
|
+
w += (w ? '|' : '') + v;
|
186
|
+
});
|
187
|
+
|
188
|
+
r1 = new RegExp('([' + re + '])(' + w + ')([' + re + '])', 'g');
|
189
|
+
r2 = new RegExp('^(' + w + ')', 'g');
|
190
|
+
r3 = new RegExp('(' + w + ')([' + re + ']?)$', 'g');
|
191
|
+
r4 = new RegExp('^(' + w + ')([' + re + ']?)$', 'g');
|
192
|
+
r5 = new RegExp('(' + w + ')([' + re + '])', 'g');
|
193
|
+
|
194
|
+
// Collect all text nodes
|
195
|
+
this._walk(this.editor.getBody(), function(n) {
|
196
|
+
if (n.nodeType == 3) {
|
197
|
+
nl.push(n);
|
198
|
+
}
|
199
|
+
});
|
200
|
+
|
201
|
+
// Wrap incorrect words in spans
|
202
|
+
each(nl, function(n) {
|
203
|
+
var v;
|
204
|
+
|
205
|
+
if (n.nodeType == 3) {
|
206
|
+
v = n.nodeValue;
|
207
|
+
|
208
|
+
if (r1.test(v) || r2.test(v) || r3.test(v) || r4.test(v)) {
|
209
|
+
v = dom.encode(v);
|
210
|
+
v = v.replace(r5, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
211
|
+
v = v.replace(r3, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
212
|
+
|
213
|
+
dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n);
|
214
|
+
}
|
215
|
+
}
|
216
|
+
});
|
217
|
+
|
218
|
+
se.moveToBookmark(b);
|
219
|
+
},
|
220
|
+
|
221
|
+
_showMenu : function(ed, e) {
|
222
|
+
var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin());
|
223
|
+
|
224
|
+
if (!m) {
|
225
|
+
p1 = DOM.getPos(ed.getContentAreaContainer());
|
226
|
+
//p2 = DOM.getPos(ed.getContainer());
|
227
|
+
|
228
|
+
m = ed.controlManager.createDropMenu('spellcheckermenu', {
|
229
|
+
offset_x : p1.x,
|
230
|
+
offset_y : p1.y,
|
231
|
+
'class' : 'mceNoIcons'
|
232
|
+
});
|
233
|
+
|
234
|
+
t._menu = m;
|
235
|
+
}
|
236
|
+
|
237
|
+
if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) {
|
238
|
+
m.removeAll();
|
239
|
+
m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
240
|
+
|
241
|
+
t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) {
|
242
|
+
m.removeAll();
|
243
|
+
|
244
|
+
if (r.length > 0) {
|
245
|
+
m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
246
|
+
each(r, function(v) {
|
247
|
+
m.add({title : v, onclick : function() {
|
248
|
+
dom.replace(ed.getDoc().createTextNode(v), e.target);
|
249
|
+
t._checkDone();
|
250
|
+
}});
|
251
|
+
});
|
252
|
+
|
253
|
+
m.addSeparator();
|
254
|
+
} else
|
255
|
+
m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
256
|
+
|
257
|
+
m.add({
|
258
|
+
title : 'spellchecker.ignore_word',
|
259
|
+
onclick : function() {
|
260
|
+
dom.remove(e.target, 1);
|
261
|
+
t._checkDone();
|
262
|
+
}
|
263
|
+
});
|
264
|
+
|
265
|
+
m.add({
|
266
|
+
title : 'spellchecker.ignore_words',
|
267
|
+
onclick : function() {
|
268
|
+
t._removeWords(dom.decode(e.target.innerHTML));
|
269
|
+
t._checkDone();
|
270
|
+
}
|
271
|
+
});
|
272
|
+
|
273
|
+
m.update();
|
274
|
+
});
|
275
|
+
|
276
|
+
ed.selection.select(e.target);
|
277
|
+
p1 = dom.getPos(e.target);
|
278
|
+
m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y);
|
279
|
+
|
280
|
+
return tinymce.dom.Event.cancel(e);
|
281
|
+
} else
|
282
|
+
m.hideMenu();
|
283
|
+
},
|
284
|
+
|
285
|
+
_checkDone : function() {
|
286
|
+
var t = this, ed = t.editor, dom = ed.dom, o;
|
287
|
+
|
288
|
+
each(dom.select('span'), function(n) {
|
289
|
+
if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
|
290
|
+
o = true;
|
291
|
+
return false;
|
292
|
+
}
|
293
|
+
});
|
294
|
+
|
295
|
+
if (!o)
|
296
|
+
t._done();
|
297
|
+
},
|
298
|
+
|
299
|
+
_done : function() {
|
300
|
+
var t = this, la = t.active;
|
301
|
+
|
302
|
+
if (t.active) {
|
303
|
+
t.active = 0;
|
304
|
+
t._removeWords();
|
305
|
+
|
306
|
+
if (t._menu)
|
307
|
+
t._menu.hideMenu();
|
308
|
+
|
309
|
+
if (la)
|
310
|
+
t.editor.nodeChanged();
|
311
|
+
}
|
312
|
+
},
|
313
|
+
|
314
|
+
_sendRPC : function(m, p, cb) {
|
315
|
+
var t = this, url = t.editor.getParam("spellchecker_rpc_url", "{backend}");
|
316
|
+
|
317
|
+
if (url == '{backend}') {
|
318
|
+
t.editor.setProgressState(0);
|
319
|
+
alert('Please specify: spellchecker_rpc_url');
|
320
|
+
return;
|
321
|
+
}
|
322
|
+
|
323
|
+
JSONRequest.sendRPC({
|
324
|
+
url : url,
|
325
|
+
method : m,
|
326
|
+
params : p,
|
327
|
+
success : cb,
|
328
|
+
error : function(e, x) {
|
329
|
+
t.editor.setProgressState(0);
|
330
|
+
t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
|
331
|
+
}
|
332
|
+
});
|
333
|
+
}
|
334
|
+
});
|
335
|
+
|
336
|
+
// Register plugin
|
337
|
+
tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
|
338
|
+
})();
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#text_font {width:250px;}
|
2
|
+
#text_size {width:70px;}
|
3
|
+
.mceAddSelectValue {background:#DDD;}
|
4
|
+
select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;}
|
5
|
+
#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
|
6
|
+
#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
|
7
|
+
#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
|
8
|
+
.panel_wrapper div.current {padding-top:10px;height:230px;}
|
9
|
+
.delim {border-left:1px solid gray;}
|
10
|
+
.tdelim {border-bottom:1px solid gray;}
|
11
|
+
#block_display {width:145px;}
|
12
|
+
#list_type {width:115px;}
|
13
|
+
.disabled {background:#EEE;}
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})();
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/**
|
2
|
+
* $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z 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.StylePlugin', {
|
10
|
+
init : function(ed, url) {
|
11
|
+
// Register commands
|
12
|
+
ed.addCommand('mceStyleProps', function() {
|
13
|
+
ed.windowManager.open({
|
14
|
+
file : url + '/props.htm',
|
15
|
+
width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
|
16
|
+
height : 320 + parseInt(ed.getLang('style.delta_height', 0)),
|
17
|
+
inline : 1
|
18
|
+
}, {
|
19
|
+
plugin_url : url,
|
20
|
+
style_text : ed.selection.getNode().style.cssText
|
21
|
+
});
|
22
|
+
});
|
23
|
+
|
24
|
+
ed.addCommand('mceSetElementStyle', function(ui, v) {
|
25
|
+
if (e = ed.selection.getNode()) {
|
26
|
+
ed.dom.setAttrib(e, 'style', v);
|
27
|
+
ed.execCommand('mceRepaint');
|
28
|
+
}
|
29
|
+
});
|
30
|
+
|
31
|
+
ed.onNodeChange.add(function(ed, cm, n) {
|
32
|
+
cm.setDisabled('styleprops', n.nodeName === 'BODY');
|
33
|
+
});
|
34
|
+
|
35
|
+
// Register buttons
|
36
|
+
ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'});
|
37
|
+
},
|
38
|
+
|
39
|
+
getInfo : function() {
|
40
|
+
return {
|
41
|
+
longname : 'Style',
|
42
|
+
author : 'Moxiecode Systems AB',
|
43
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
44
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
|
45
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
46
|
+
};
|
47
|
+
}
|
48
|
+
});
|
49
|
+
|
50
|
+
// Register plugin
|
51
|
+
tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin);
|
52
|
+
})();
|