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,269 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
var ed;
|
4
|
+
|
5
|
+
function init() {
|
6
|
+
ed = tinyMCEPopup.editor;
|
7
|
+
tinyMCEPopup.resizeToInnerSize();
|
8
|
+
|
9
|
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
10
|
+
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
11
|
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
12
|
+
|
13
|
+
var inst = ed;
|
14
|
+
var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th");
|
15
|
+
var formObj = document.forms[0];
|
16
|
+
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
17
|
+
|
18
|
+
// Get table cell data
|
19
|
+
var celltype = tdElm.nodeName.toLowerCase();
|
20
|
+
var align = ed.dom.getAttrib(tdElm, 'align');
|
21
|
+
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
22
|
+
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
23
|
+
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
24
|
+
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
25
|
+
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
26
|
+
var className = ed.dom.getAttrib(tdElm, 'class');
|
27
|
+
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
|
28
|
+
var id = ed.dom.getAttrib(tdElm, 'id');
|
29
|
+
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
30
|
+
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
31
|
+
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
32
|
+
|
33
|
+
// Setup form
|
34
|
+
addClassesToList('class', 'table_cell_styles');
|
35
|
+
TinyMCE_EditableSelects.init();
|
36
|
+
|
37
|
+
formObj.bordercolor.value = bordercolor;
|
38
|
+
formObj.bgcolor.value = bgcolor;
|
39
|
+
formObj.backgroundimage.value = backgroundimage;
|
40
|
+
formObj.width.value = width;
|
41
|
+
formObj.height.value = height;
|
42
|
+
formObj.id.value = id;
|
43
|
+
formObj.lang.value = lang;
|
44
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
45
|
+
selectByValue(formObj, 'align', align);
|
46
|
+
selectByValue(formObj, 'valign', valign);
|
47
|
+
selectByValue(formObj, 'class', className, true, true);
|
48
|
+
selectByValue(formObj, 'celltype', celltype);
|
49
|
+
selectByValue(formObj, 'dir', dir);
|
50
|
+
selectByValue(formObj, 'scope', scope);
|
51
|
+
|
52
|
+
// Resize some elements
|
53
|
+
if (isVisible('backgroundimagebrowser'))
|
54
|
+
document.getElementById('backgroundimage').style.width = '180px';
|
55
|
+
|
56
|
+
updateColor('bordercolor_pick', 'bordercolor');
|
57
|
+
updateColor('bgcolor_pick', 'bgcolor');
|
58
|
+
}
|
59
|
+
|
60
|
+
function updateAction() {
|
61
|
+
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
62
|
+
|
63
|
+
tinyMCEPopup.restoreSelection();
|
64
|
+
el = ed.selection.getNode();
|
65
|
+
tdElm = ed.dom.getParent(el, "td,th");
|
66
|
+
trElm = ed.dom.getParent(el, "tr");
|
67
|
+
tableElm = ed.dom.getParent(el, "table");
|
68
|
+
|
69
|
+
ed.execCommand('mceBeginUndoLevel');
|
70
|
+
|
71
|
+
switch (getSelectValue(formObj, 'action')) {
|
72
|
+
case "cell":
|
73
|
+
var celltype = getSelectValue(formObj, 'celltype');
|
74
|
+
var scope = getSelectValue(formObj, 'scope');
|
75
|
+
|
76
|
+
function doUpdate(s) {
|
77
|
+
if (s) {
|
78
|
+
updateCell(tdElm);
|
79
|
+
|
80
|
+
ed.addVisual();
|
81
|
+
ed.nodeChanged();
|
82
|
+
inst.execCommand('mceEndUndoLevel');
|
83
|
+
tinyMCEPopup.close();
|
84
|
+
}
|
85
|
+
};
|
86
|
+
|
87
|
+
if (ed.getParam("accessibility_warnings", 1)) {
|
88
|
+
if (celltype == "th" && scope == "")
|
89
|
+
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
90
|
+
else
|
91
|
+
doUpdate(1);
|
92
|
+
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
|
96
|
+
updateCell(tdElm);
|
97
|
+
break;
|
98
|
+
|
99
|
+
case "row":
|
100
|
+
var cell = trElm.firstChild;
|
101
|
+
|
102
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
103
|
+
cell = nextCell(cell);
|
104
|
+
|
105
|
+
do {
|
106
|
+
cell = updateCell(cell, true);
|
107
|
+
} while ((cell = nextCell(cell)) != null);
|
108
|
+
|
109
|
+
break;
|
110
|
+
|
111
|
+
case "all":
|
112
|
+
var rows = tableElm.getElementsByTagName("tr");
|
113
|
+
|
114
|
+
for (var i=0; i<rows.length; i++) {
|
115
|
+
var cell = rows[i].firstChild;
|
116
|
+
|
117
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
118
|
+
cell = nextCell(cell);
|
119
|
+
|
120
|
+
do {
|
121
|
+
cell = updateCell(cell, true);
|
122
|
+
} while ((cell = nextCell(cell)) != null);
|
123
|
+
}
|
124
|
+
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
|
128
|
+
ed.addVisual();
|
129
|
+
ed.nodeChanged();
|
130
|
+
inst.execCommand('mceEndUndoLevel');
|
131
|
+
tinyMCEPopup.close();
|
132
|
+
}
|
133
|
+
|
134
|
+
function nextCell(elm) {
|
135
|
+
while ((elm = elm.nextSibling) != null) {
|
136
|
+
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
137
|
+
return elm;
|
138
|
+
}
|
139
|
+
|
140
|
+
return null;
|
141
|
+
}
|
142
|
+
|
143
|
+
function updateCell(td, skip_id) {
|
144
|
+
var inst = ed;
|
145
|
+
var formObj = document.forms[0];
|
146
|
+
var curCellType = td.nodeName.toLowerCase();
|
147
|
+
var celltype = getSelectValue(formObj, 'celltype');
|
148
|
+
var doc = inst.getDoc();
|
149
|
+
var dom = ed.dom;
|
150
|
+
|
151
|
+
if (!skip_id)
|
152
|
+
td.setAttribute('id', formObj.id.value);
|
153
|
+
|
154
|
+
td.setAttribute('align', formObj.align.value);
|
155
|
+
td.setAttribute('vAlign', formObj.valign.value);
|
156
|
+
td.setAttribute('lang', formObj.lang.value);
|
157
|
+
td.setAttribute('dir', getSelectValue(formObj, 'dir'));
|
158
|
+
td.setAttribute('style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
159
|
+
td.setAttribute('scope', formObj.scope.value);
|
160
|
+
ed.dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
161
|
+
|
162
|
+
// Clear deprecated attributes
|
163
|
+
ed.dom.setAttrib(td, 'width', '');
|
164
|
+
ed.dom.setAttrib(td, 'height', '');
|
165
|
+
ed.dom.setAttrib(td, 'bgColor', '');
|
166
|
+
ed.dom.setAttrib(td, 'borderColor', '');
|
167
|
+
ed.dom.setAttrib(td, 'background', '');
|
168
|
+
|
169
|
+
// Set styles
|
170
|
+
td.style.width = getCSSSize(formObj.width.value);
|
171
|
+
td.style.height = getCSSSize(formObj.height.value);
|
172
|
+
if (formObj.bordercolor.value != "") {
|
173
|
+
td.style.borderColor = formObj.bordercolor.value;
|
174
|
+
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
175
|
+
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
176
|
+
} else
|
177
|
+
td.style.borderColor = '';
|
178
|
+
|
179
|
+
td.style.backgroundColor = formObj.bgcolor.value;
|
180
|
+
|
181
|
+
if (formObj.backgroundimage.value != "")
|
182
|
+
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
183
|
+
else
|
184
|
+
td.style.backgroundImage = '';
|
185
|
+
|
186
|
+
if (curCellType != celltype) {
|
187
|
+
// changing to a different node type
|
188
|
+
var newCell = doc.createElement(celltype);
|
189
|
+
|
190
|
+
for (var c=0; c<td.childNodes.length; c++)
|
191
|
+
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
192
|
+
|
193
|
+
for (var a=0; a<td.attributes.length; a++)
|
194
|
+
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
195
|
+
|
196
|
+
td.parentNode.replaceChild(newCell, td);
|
197
|
+
td = newCell;
|
198
|
+
}
|
199
|
+
|
200
|
+
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
201
|
+
|
202
|
+
return td;
|
203
|
+
}
|
204
|
+
|
205
|
+
function changedBackgroundImage() {
|
206
|
+
var formObj = document.forms[0];
|
207
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
208
|
+
|
209
|
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
210
|
+
|
211
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
212
|
+
}
|
213
|
+
|
214
|
+
function changedSize() {
|
215
|
+
var formObj = document.forms[0];
|
216
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
217
|
+
|
218
|
+
var width = formObj.width.value;
|
219
|
+
if (width != "")
|
220
|
+
st['width'] = getCSSSize(width);
|
221
|
+
else
|
222
|
+
st['width'] = "";
|
223
|
+
|
224
|
+
var height = formObj.height.value;
|
225
|
+
if (height != "")
|
226
|
+
st['height'] = getCSSSize(height);
|
227
|
+
else
|
228
|
+
st['height'] = "";
|
229
|
+
|
230
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
231
|
+
}
|
232
|
+
|
233
|
+
function changedColor() {
|
234
|
+
var formObj = document.forms[0];
|
235
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
236
|
+
|
237
|
+
st['background-color'] = formObj.bgcolor.value;
|
238
|
+
st['border-color'] = formObj.bordercolor.value;
|
239
|
+
|
240
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
241
|
+
}
|
242
|
+
|
243
|
+
function changedStyle() {
|
244
|
+
var formObj = document.forms[0];
|
245
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
246
|
+
|
247
|
+
if (st['background-image'])
|
248
|
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
249
|
+
else
|
250
|
+
formObj.backgroundimage.value = '';
|
251
|
+
|
252
|
+
if (st['width'])
|
253
|
+
formObj.width.value = trimSize(st['width']);
|
254
|
+
|
255
|
+
if (st['height'])
|
256
|
+
formObj.height.value = trimSize(st['height']);
|
257
|
+
|
258
|
+
if (st['background-color']) {
|
259
|
+
formObj.bgcolor.value = st['background-color'];
|
260
|
+
updateColor('bgcolor_pick','bgcolor');
|
261
|
+
}
|
262
|
+
|
263
|
+
if (st['border-color']) {
|
264
|
+
formObj.bordercolor.value = st['border-color'];
|
265
|
+
updateColor('bordercolor_pick','bordercolor');
|
266
|
+
}
|
267
|
+
}
|
268
|
+
|
269
|
+
tinyMCEPopup.onInit.add(init);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
function init() {
|
4
|
+
var f = document.forms[0], v;
|
5
|
+
|
6
|
+
tinyMCEPopup.resizeToInnerSize();
|
7
|
+
|
8
|
+
f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
|
9
|
+
f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1);
|
10
|
+
}
|
11
|
+
|
12
|
+
function mergeCells() {
|
13
|
+
var args = [], f = document.forms[0];
|
14
|
+
|
15
|
+
tinyMCEPopup.restoreSelection();
|
16
|
+
|
17
|
+
if (!AutoValidator.validate(f)) {
|
18
|
+
tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data'));
|
19
|
+
return false;
|
20
|
+
}
|
21
|
+
|
22
|
+
args["numcols"] = f.numcols.value;
|
23
|
+
args["numrows"] = f.numrows.value;
|
24
|
+
|
25
|
+
tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
|
26
|
+
tinyMCEPopup.close();
|
27
|
+
}
|
28
|
+
|
29
|
+
tinyMCEPopup.onInit.add(init);
|
@@ -0,0 +1,212 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
function init() {
|
4
|
+
tinyMCEPopup.resizeToInnerSize();
|
5
|
+
|
6
|
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
7
|
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
8
|
+
|
9
|
+
var inst = tinyMCEPopup.editor;
|
10
|
+
var dom = inst.dom;
|
11
|
+
var trElm = dom.getParent(inst.selection.getNode(), "tr");
|
12
|
+
var formObj = document.forms[0];
|
13
|
+
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
14
|
+
|
15
|
+
// Get table row data
|
16
|
+
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
17
|
+
var align = dom.getAttrib(trElm, 'align');
|
18
|
+
var valign = dom.getAttrib(trElm, 'valign');
|
19
|
+
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
20
|
+
var className = dom.getAttrib(trElm, 'class');
|
21
|
+
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
22
|
+
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
|
23
|
+
var id = dom.getAttrib(trElm, 'id');
|
24
|
+
var lang = dom.getAttrib(trElm, 'lang');
|
25
|
+
var dir = dom.getAttrib(trElm, 'dir');
|
26
|
+
|
27
|
+
// Setup form
|
28
|
+
addClassesToList('class', 'table_row_styles');
|
29
|
+
TinyMCE_EditableSelects.init();
|
30
|
+
|
31
|
+
formObj.bgcolor.value = bgcolor;
|
32
|
+
formObj.backgroundimage.value = backgroundimage;
|
33
|
+
formObj.height.value = height;
|
34
|
+
formObj.id.value = id;
|
35
|
+
formObj.lang.value = lang;
|
36
|
+
formObj.style.value = dom.serializeStyle(st);
|
37
|
+
selectByValue(formObj, 'align', align);
|
38
|
+
selectByValue(formObj, 'valign', valign);
|
39
|
+
selectByValue(formObj, 'class', className, true, true);
|
40
|
+
selectByValue(formObj, 'rowtype', rowtype);
|
41
|
+
selectByValue(formObj, 'dir', dir);
|
42
|
+
|
43
|
+
// Resize some elements
|
44
|
+
if (isVisible('backgroundimagebrowser'))
|
45
|
+
document.getElementById('backgroundimage').style.width = '180px';
|
46
|
+
|
47
|
+
updateColor('bgcolor_pick', 'bgcolor');
|
48
|
+
}
|
49
|
+
|
50
|
+
function updateAction() {
|
51
|
+
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
52
|
+
var action = getSelectValue(formObj, 'action');
|
53
|
+
|
54
|
+
tinyMCEPopup.restoreSelection();
|
55
|
+
trElm = dom.getParent(inst.selection.getNode(), "tr");
|
56
|
+
tableElm = dom.getParent(inst.selection.getNode(), "table");
|
57
|
+
|
58
|
+
inst.execCommand('mceBeginUndoLevel');
|
59
|
+
|
60
|
+
switch (action) {
|
61
|
+
case "row":
|
62
|
+
updateRow(trElm);
|
63
|
+
break;
|
64
|
+
|
65
|
+
case "all":
|
66
|
+
var rows = tableElm.getElementsByTagName("tr");
|
67
|
+
|
68
|
+
for (var i=0; i<rows.length; i++)
|
69
|
+
updateRow(rows[i], true);
|
70
|
+
|
71
|
+
break;
|
72
|
+
|
73
|
+
case "odd":
|
74
|
+
case "even":
|
75
|
+
var rows = tableElm.getElementsByTagName("tr");
|
76
|
+
|
77
|
+
for (var i=0; i<rows.length; i++) {
|
78
|
+
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
79
|
+
updateRow(rows[i], true, true);
|
80
|
+
}
|
81
|
+
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
|
85
|
+
inst.addVisual();
|
86
|
+
inst.nodeChanged();
|
87
|
+
inst.execCommand('mceEndUndoLevel');
|
88
|
+
tinyMCEPopup.close();
|
89
|
+
}
|
90
|
+
|
91
|
+
function updateRow(tr_elm, skip_id, skip_parent) {
|
92
|
+
var inst = tinyMCEPopup.editor;
|
93
|
+
var formObj = document.forms[0];
|
94
|
+
var dom = inst.dom;
|
95
|
+
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
96
|
+
var rowtype = getSelectValue(formObj, 'rowtype');
|
97
|
+
var doc = inst.getDoc();
|
98
|
+
|
99
|
+
// Update row element
|
100
|
+
if (!skip_id)
|
101
|
+
tr_elm.setAttribute('id', formObj.id.value);
|
102
|
+
|
103
|
+
tr_elm.setAttribute('align', getSelectValue(formObj, 'align'));
|
104
|
+
tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign'));
|
105
|
+
tr_elm.setAttribute('lang', formObj.lang.value);
|
106
|
+
tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir'));
|
107
|
+
tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
108
|
+
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
109
|
+
|
110
|
+
// Clear deprecated attributes
|
111
|
+
tr_elm.setAttribute('background', '');
|
112
|
+
tr_elm.setAttribute('bgColor', '');
|
113
|
+
tr_elm.setAttribute('height', '');
|
114
|
+
|
115
|
+
// Set styles
|
116
|
+
tr_elm.style.height = getCSSSize(formObj.height.value);
|
117
|
+
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
118
|
+
|
119
|
+
if (formObj.backgroundimage.value != "")
|
120
|
+
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
121
|
+
else
|
122
|
+
tr_elm.style.backgroundImage = '';
|
123
|
+
|
124
|
+
// Setup new rowtype
|
125
|
+
if (curRowType != rowtype && !skip_parent) {
|
126
|
+
// first, clone the node we are working on
|
127
|
+
var newRow = tr_elm.cloneNode(1);
|
128
|
+
|
129
|
+
// next, find the parent of its new destination (creating it if necessary)
|
130
|
+
var theTable = dom.getParent(tr_elm, "table");
|
131
|
+
var dest = rowtype;
|
132
|
+
var newParent = null;
|
133
|
+
for (var i = 0; i < theTable.childNodes.length; i++) {
|
134
|
+
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
135
|
+
newParent = theTable.childNodes[i];
|
136
|
+
}
|
137
|
+
|
138
|
+
if (newParent == null) {
|
139
|
+
newParent = doc.createElement(dest);
|
140
|
+
|
141
|
+
if (dest == "thead") {
|
142
|
+
if (theTable.firstChild.nodeName == 'CAPTION')
|
143
|
+
inst.dom.insertAfter(newParent, theTable.firstChild);
|
144
|
+
else
|
145
|
+
theTable.insertBefore(newParent, theTable.firstChild);
|
146
|
+
} else
|
147
|
+
theTable.appendChild(newParent);
|
148
|
+
}
|
149
|
+
|
150
|
+
// append the row to the new parent
|
151
|
+
newParent.appendChild(newRow);
|
152
|
+
|
153
|
+
// remove the original
|
154
|
+
tr_elm.parentNode.removeChild(tr_elm);
|
155
|
+
|
156
|
+
// set tr_elm to the new node
|
157
|
+
tr_elm = newRow;
|
158
|
+
}
|
159
|
+
|
160
|
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
161
|
+
}
|
162
|
+
|
163
|
+
function changedBackgroundImage() {
|
164
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
165
|
+
var st = dom.parseStyle(formObj.style.value);
|
166
|
+
|
167
|
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
168
|
+
|
169
|
+
formObj.style.value = dom.serializeStyle(st);
|
170
|
+
}
|
171
|
+
|
172
|
+
function changedStyle() {
|
173
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
174
|
+
var st = dom.parseStyle(formObj.style.value);
|
175
|
+
|
176
|
+
if (st['background-image'])
|
177
|
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
178
|
+
else
|
179
|
+
formObj.backgroundimage.value = '';
|
180
|
+
|
181
|
+
if (st['height'])
|
182
|
+
formObj.height.value = trimSize(st['height']);
|
183
|
+
|
184
|
+
if (st['background-color']) {
|
185
|
+
formObj.bgcolor.value = st['background-color'];
|
186
|
+
updateColor('bgcolor_pick','bgcolor');
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
function changedSize() {
|
191
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
192
|
+
var st = dom.parseStyle(formObj.style.value);
|
193
|
+
|
194
|
+
var height = formObj.height.value;
|
195
|
+
if (height != "")
|
196
|
+
st['height'] = getCSSSize(height);
|
197
|
+
else
|
198
|
+
st['height'] = "";
|
199
|
+
|
200
|
+
formObj.style.value = dom.serializeStyle(st);
|
201
|
+
}
|
202
|
+
|
203
|
+
function changedColor() {
|
204
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
205
|
+
var st = dom.parseStyle(formObj.style.value);
|
206
|
+
|
207
|
+
st['background-color'] = formObj.bgcolor.value;
|
208
|
+
|
209
|
+
formObj.style.value = dom.serializeStyle(st);
|
210
|
+
}
|
211
|
+
|
212
|
+
tinyMCEPopup.onInit.add(init);
|