cable 0.9.16 → 0.9.17
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/admin_controller.rb +1 -1
- data/app/views/layouts/admin.html.erb +3 -1
- data/lib/generators/cable/install_generator.rb +1 -0
- data/lib/generators/cable/menu/templates/erb/menus/_menu.html.erb +1 -1
- data/lib/generators/cable/menu/templates/erb/menus/_resources.html.erb +1 -1
- data/lib/generators/cable/menu/templates/erb/menus/show.html.erb +1 -1
- data/public/javascripts/admin.js +16 -16
- metadata +2 -254
- data/public/javascripts/tinymce/jquery.tinymce.js +0 -1
- data/public/javascripts/tinymce/langs/en.js +0 -222
- data/public/javascripts/tinymce/license.txt +0 -504
- data/public/javascripts/tinymce/plugins/advhr/css/advhr.css +0 -5
- data/public/javascripts/tinymce/plugins/advhr/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +0 -57
- data/public/javascripts/tinymce/plugins/advhr/js/rule.js +0 -43
- data/public/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +0 -7
- data/public/javascripts/tinymce/plugins/advhr/rule.htm +0 -58
- data/public/javascripts/tinymce/plugins/advimage/css/advimage.css +0 -13
- data/public/javascripts/tinymce/plugins/advimage/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +0 -50
- data/public/javascripts/tinymce/plugins/advimage/image.htm +0 -235
- data/public/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
- data/public/javascripts/tinymce/plugins/advimage/js/image.js +0 -445
- data/public/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +0 -45
- data/public/javascripts/tinymce/plugins/advlink/css/advlink.css +0 -8
- data/public/javascripts/tinymce/plugins/advlink/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +0 -61
- data/public/javascripts/tinymce/plugins/advlink/js/advlink.js +0 -523
- data/public/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +0 -54
- data/public/javascripts/tinymce/plugins/advlink/link.htm +0 -338
- data/public/javascripts/tinymce/plugins/advlist/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +0 -154
- data/public/javascripts/tinymce/plugins/autolink/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +0 -169
- data/public/javascripts/tinymce/plugins/autoresize/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +0 -119
- data/public/javascripts/tinymce/plugins/autosave/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +0 -431
- data/public/javascripts/tinymce/plugins/autosave/langs/en.js +0 -4
- data/public/javascripts/tinymce/plugins/bbcode/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +0 -120
- data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -156
- data/public/javascripts/tinymce/plugins/directionality/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +0 -82
- data/public/javascripts/tinymce/plugins/emotions/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +0 -43
- data/public/javascripts/tinymce/plugins/emotions/emotions.htm +0 -41
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/public/javascripts/tinymce/plugins/emotions/js/emotions.js +0 -22
- data/public/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +0 -20
- data/public/javascripts/tinymce/plugins/example/dialog.htm +0 -22
- data/public/javascripts/tinymce/plugins/example/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/example/editor_plugin_src.js +0 -84
- data/public/javascripts/tinymce/plugins/example/img/example.gif +0 -0
- data/public/javascripts/tinymce/plugins/example/js/dialog.js +0 -19
- data/public/javascripts/tinymce/plugins/example/langs/en.js +0 -3
- data/public/javascripts/tinymce/plugins/example/langs/en_dlg.js +0 -3
- data/public/javascripts/tinymce/plugins/fullpage/css/fullpage.css +0 -184
- data/public/javascripts/tinymce/plugins/fullpage/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +0 -198
- data/public/javascripts/tinymce/plugins/fullpage/fullpage.htm +0 -571
- data/public/javascripts/tinymce/plugins/fullpage/js/fullpage.js +0 -497
- data/public/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +0 -85
- data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -159
- data/public/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +0 -109
- data/public/javascripts/tinymce/plugins/iespell/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +0 -54
- data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -696
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
- data/public/javascripts/tinymce/plugins/inlinepopups/template.htm +0 -387
- data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -83
- data/public/javascripts/tinymce/plugins/layer/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/layer/editor_plugin_src.js +0 -214
- data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -139
- data/public/javascripts/tinymce/plugins/lists/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/lists/editor_plugin_src.js +0 -617
- data/public/javascripts/tinymce/plugins/media/css/media.css +0 -17
- data/public/javascripts/tinymce/plugins/media/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/media/editor_plugin_src.js +0 -770
- data/public/javascripts/tinymce/plugins/media/js/embed.js +0 -73
- data/public/javascripts/tinymce/plugins/media/js/media.js +0 -354
- data/public/javascripts/tinymce/plugins/media/langs/en_dlg.js +0 -109
- data/public/javascripts/tinymce/plugins/media/media.htm +0 -812
- data/public/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
- data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -53
- data/public/javascripts/tinymce/plugins/noneditable/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +0 -90
- data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -74
- data/public/javascripts/tinymce/plugins/paste/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/paste/editor_plugin_src.js +0 -930
- data/public/javascripts/tinymce/plugins/paste/js/pastetext.js +0 -36
- data/public/javascripts/tinymce/plugins/paste/js/pasteword.js +0 -51
- data/public/javascripts/tinymce/plugins/paste/langs/en_dlg.js +0 -5
- data/public/javascripts/tinymce/plugins/paste/pastetext.htm +0 -27
- data/public/javascripts/tinymce/plugins/paste/pasteword.htm +0 -21
- data/public/javascripts/tinymce/plugins/preview/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/preview/editor_plugin_src.js +0 -53
- data/public/javascripts/tinymce/plugins/preview/example.html +0 -28
- data/public/javascripts/tinymce/plugins/preview/jscripts/embed.js +0 -73
- data/public/javascripts/tinymce/plugins/preview/preview.html +0 -17
- data/public/javascripts/tinymce/plugins/print/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/print/editor_plugin_src.js +0 -34
- data/public/javascripts/tinymce/plugins/save/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/save/editor_plugin_src.js +0 -101
- data/public/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +0 -6
- data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -61
- data/public/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +0 -142
- data/public/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -16
- data/public/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +0 -100
- data/public/javascripts/tinymce/plugins/spellchecker/css/content.css +0 -1
- data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -435
- data/public/javascripts/tinymce/plugins/spellchecker/img/wline.gif +0 -0
- data/public/javascripts/tinymce/plugins/style/css/props.css +0 -13
- data/public/javascripts/tinymce/plugins/style/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/style/editor_plugin_src.js +0 -55
- data/public/javascripts/tinymce/plugins/style/js/props.js +0 -635
- data/public/javascripts/tinymce/plugins/style/langs/en_dlg.js +0 -70
- data/public/javascripts/tinymce/plugins/style/props.htm +0 -838
- data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -114
- data/public/javascripts/tinymce/plugins/table/cell.htm +0 -178
- data/public/javascripts/tinymce/plugins/table/css/cell.css +0 -17
- data/public/javascripts/tinymce/plugins/table/css/row.css +0 -25
- data/public/javascripts/tinymce/plugins/table/css/table.css +0 -13
- data/public/javascripts/tinymce/plugins/table/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/table/editor_plugin_src.js +0 -1198
- data/public/javascripts/tinymce/plugins/table/js/cell.js +0 -284
- data/public/javascripts/tinymce/plugins/table/js/merge_cells.js +0 -27
- data/public/javascripts/tinymce/plugins/table/js/row.js +0 -232
- data/public/javascripts/tinymce/plugins/table/js/table.js +0 -450
- data/public/javascripts/tinymce/plugins/table/langs/en_dlg.js +0 -74
- data/public/javascripts/tinymce/plugins/table/merge_cells.htm +0 -32
- data/public/javascripts/tinymce/plugins/table/row.htm +0 -157
- data/public/javascripts/tinymce/plugins/table/table.htm +0 -188
- data/public/javascripts/tinymce/plugins/template/blank.htm +0 -12
- data/public/javascripts/tinymce/plugins/template/css/template.css +0 -23
- data/public/javascripts/tinymce/plugins/template/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/template/editor_plugin_src.js +0 -159
- data/public/javascripts/tinymce/plugins/template/js/template.js +0 -106
- data/public/javascripts/tinymce/plugins/template/langs/en_dlg.js +0 -15
- data/public/javascripts/tinymce/plugins/template/template.htm +0 -31
- data/public/javascripts/tinymce/plugins/visualchars/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +0 -83
- data/public/javascripts/tinymce/plugins/wordcount/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +0 -114
- data/public/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +0 -142
- data/public/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +0 -142
- data/public/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +0 -149
- data/public/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +0 -142
- data/public/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -11
- data/public/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +0 -9
- data/public/javascripts/tinymce/plugins/xhtmlxtras/del.htm +0 -162
- data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -1
- data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
- data/public/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +0 -162
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -28
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -28
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -125
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +0 -28
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +0 -53
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -229
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +0 -53
- data/public/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -32
- data/public/javascripts/tinymce/themes/advanced/about.htm +0 -52
- data/public/javascripts/tinymce/themes/advanced/anchor.htm +0 -26
- data/public/javascripts/tinymce/themes/advanced/charmap.htm +0 -51
- data/public/javascripts/tinymce/themes/advanced/color_picker.htm +0 -74
- data/public/javascripts/tinymce/themes/advanced/editor_template.js +0 -1
- data/public/javascripts/tinymce/themes/advanced/editor_template_src.js +0 -1360
- data/public/javascripts/tinymce/themes/advanced/image.htm +0 -80
- data/public/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/trans.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/js/about.js +0 -73
- data/public/javascripts/tinymce/themes/advanced/js/anchor.js +0 -42
- data/public/javascripts/tinymce/themes/advanced/js/charmap.js +0 -355
- data/public/javascripts/tinymce/themes/advanced/js/color_picker.js +0 -329
- data/public/javascripts/tinymce/themes/advanced/js/image.js +0 -247
- data/public/javascripts/tinymce/themes/advanced/js/link.js +0 -153
- data/public/javascripts/tinymce/themes/advanced/js/source_editor.js +0 -56
- data/public/javascripts/tinymce/themes/advanced/langs/en.js +0 -68
- data/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +0 -54
- data/public/javascripts/tinymce/themes/advanced/link.htm +0 -57
- data/public/javascripts/tinymce/themes/advanced/shortcuts.htm +0 -47
- data/public/javascripts/tinymce/themes/advanced/skins/default/content.css +0 -47
- data/public/javascripts/tinymce/themes/advanced/skins/default/dialog.css +0 -117
- data/public/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/ui.css +0 -213
- data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +0 -23
- data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -105
- data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -101
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +0 -46
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -117
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +0 -216
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -8
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
- data/public/javascripts/tinymce/themes/advanced/source_editor.htm +0 -25
- data/public/javascripts/tinymce/themes/simple/editor_template.js +0 -1
- data/public/javascripts/tinymce/themes/simple/editor_template_src.js +0 -84
- data/public/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
- data/public/javascripts/tinymce/themes/simple/langs/en.js +0 -11
- data/public/javascripts/tinymce/themes/simple/skins/default/content.css +0 -25
- data/public/javascripts/tinymce/themes/simple/skins/default/ui.css +0 -32
- data/public/javascripts/tinymce/themes/simple/skins/o2k7/content.css +0 -17
- data/public/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +0 -35
- data/public/javascripts/tinymce/tiny_mce.js +0 -1
- data/public/javascripts/tinymce/tiny_mce_popup.js +0 -5
- data/public/javascripts/tinymce/tiny_mce_src.js +0 -15752
- data/public/javascripts/tinymce/utils/editable_selects.js +0 -70
- data/public/javascripts/tinymce/utils/form_utils.js +0 -210
- data/public/javascripts/tinymce/utils/mctabs.js +0 -162
- data/public/javascripts/tinymce/utils/validate.js +0 -252
@@ -1 +0,0 @@
|
|
1
|
-
(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length<d){for(var f=0;f<(d-g.length);f++){g="0"+g}}return g}a=a.replace("%D","%m/%d/%y");a=a.replace("%r","%I:%M:%S %p");a=a.replace("%Y",""+e.getFullYear());a=a.replace("%y",""+e.getYear());a=a.replace("%m",b(e.getMonth()+1,2));a=a.replace("%d",b(e.getDate(),2));a=a.replace("%H",""+b(e.getHours(),2));a=a.replace("%M",""+b(e.getMinutes(),2));a=a.replace("%S",""+b(e.getSeconds(),2));a=a.replace("%I",""+((e.getHours()+11)%12+1));a=a.replace("%p",""+(e.getHours()<12?"AM":"PM"));a=a.replace("%B",""+c.getLang("insertdatetime.months_long").split(",")[e.getMonth()]);a=a.replace("%b",""+c.getLang("insertdatetime.months_short").split(",")[e.getMonth()]);a=a.replace("%A",""+c.getLang("insertdatetime.day_long").split(",")[e.getDay()]);a=a.replace("%a",""+c.getLang("insertdatetime.day_short").split(",")[e.getDay()]);a=a.replace("%%","%");return a}});tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})();
|
@@ -1,83 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
(function() {
|
12
|
-
tinymce.create('tinymce.plugins.InsertDateTime', {
|
13
|
-
init : function(ed, url) {
|
14
|
-
var t = this;
|
15
|
-
|
16
|
-
t.editor = ed;
|
17
|
-
|
18
|
-
ed.addCommand('mceInsertDate', function() {
|
19
|
-
var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_dateFormat", ed.getLang('insertdatetime.date_fmt')));
|
20
|
-
|
21
|
-
ed.execCommand('mceInsertContent', false, str);
|
22
|
-
});
|
23
|
-
|
24
|
-
ed.addCommand('mceInsertTime', function() {
|
25
|
-
var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_timeFormat", ed.getLang('insertdatetime.time_fmt')));
|
26
|
-
|
27
|
-
ed.execCommand('mceInsertContent', false, str);
|
28
|
-
});
|
29
|
-
|
30
|
-
ed.addButton('insertdate', {title : 'insertdatetime.insertdate_desc', cmd : 'mceInsertDate'});
|
31
|
-
ed.addButton('inserttime', {title : 'insertdatetime.inserttime_desc', cmd : 'mceInsertTime'});
|
32
|
-
},
|
33
|
-
|
34
|
-
getInfo : function() {
|
35
|
-
return {
|
36
|
-
longname : 'Insert date/time',
|
37
|
-
author : 'Moxiecode Systems AB',
|
38
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
39
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',
|
40
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
41
|
-
};
|
42
|
-
},
|
43
|
-
|
44
|
-
// Private methods
|
45
|
-
|
46
|
-
_getDateTime : function(d, fmt) {
|
47
|
-
var ed = this.editor;
|
48
|
-
|
49
|
-
function addZeros(value, len) {
|
50
|
-
value = "" + value;
|
51
|
-
|
52
|
-
if (value.length < len) {
|
53
|
-
for (var i=0; i<(len-value.length); i++)
|
54
|
-
value = "0" + value;
|
55
|
-
}
|
56
|
-
|
57
|
-
return value;
|
58
|
-
};
|
59
|
-
|
60
|
-
fmt = fmt.replace("%D", "%m/%d/%y");
|
61
|
-
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
62
|
-
fmt = fmt.replace("%Y", "" + d.getFullYear());
|
63
|
-
fmt = fmt.replace("%y", "" + d.getYear());
|
64
|
-
fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
|
65
|
-
fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
|
66
|
-
fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
|
67
|
-
fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
|
68
|
-
fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
|
69
|
-
fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
|
70
|
-
fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
|
71
|
-
fmt = fmt.replace("%B", "" + ed.getLang("insertdatetime.months_long").split(',')[d.getMonth()]);
|
72
|
-
fmt = fmt.replace("%b", "" + ed.getLang("insertdatetime.months_short").split(',')[d.getMonth()]);
|
73
|
-
fmt = fmt.replace("%A", "" + ed.getLang("insertdatetime.day_long").split(',')[d.getDay()]);
|
74
|
-
fmt = fmt.replace("%a", "" + ed.getLang("insertdatetime.day_short").split(',')[d.getDay()]);
|
75
|
-
fmt = fmt.replace("%%", "%");
|
76
|
-
|
77
|
-
return fmt;
|
78
|
-
}
|
79
|
-
});
|
80
|
-
|
81
|
-
// Register plugin
|
82
|
-
tinymce.PluginManager.add('insertdatetime', tinymce.plugins.InsertDateTime);
|
83
|
-
})();
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){tinymce.create("tinymce.plugins.Layer",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertLayer",c._insertLayer,c);a.addCommand("mceMoveForward",function(){c._move(1)});a.addCommand("mceMoveBackward",function(){c._move(-1)});a.addCommand("mceMakeAbsolute",function(){c._toggleAbsolute()});a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});a.onInit.add(function(){if(tinymce.isIE){a.getDoc().execCommand("2D-Position",false,true)}});a.onNodeChange.add(c._nodeChange,c);a.onVisualAid.add(c._visualAid,c)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d;c=this._getParentLayer(e);d=b.dom.getParent(e,"DIV,P,IMG");if(!d){a.setDisabled("absolute",1);a.setDisabled("moveforward",1);a.setDisabled("movebackward",1)}else{a.setDisabled("absolute",0);a.setDisabled("moveforward",!c);a.setDisabled("movebackward",!c);a.setActive("absolute",c&&c.style.position.toLowerCase()=="absolute")}},_visualAid:function(a,c,b){var d=a.dom;tinymce.each(d.select("div,p",c),function(f){if(/^(absolute|relative|static)$/i.test(f.style.position)){if(b){d.addClass(f,"mceItemVisualAid")}else{d.removeClass(f,"mceItemVisualAid")}}})},_move:function(h){var b=this.editor,f,g=[],e=this._getParentLayer(b.selection.getNode()),c=-1,j=-1,a;a=[];tinymce.walk(b.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){a.push(d)}},"childNodes");for(f=0;f<a.length;f++){g[f]=a[f].style.zIndex?parseInt(a[f].style.zIndex):0;if(c<0&&a[f]==e){c=f}}if(h<0){for(f=0;f<g.length;f++){if(g[f]<g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{if(g[c]>0){a[c].style.zIndex=g[c]-1}}}else{for(f=0;f<g.length;f++){if(g[f]>g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{a[c].style.zIndex=g[c]+1}}b.execCommand("mceRepaint")},_getParentLayer:function(a){return this.editor.dom.getParent(a,function(b){return b.nodeType==1&&/^(absolute|relative|static)$/i.test(b.style.position)})},_insertLayer:function(){var a=this.editor,b=a.dom.getPos(a.dom.getParent(a.selection.getNode(),"*"));a.dom.add(a.getBody(),"div",{style:{position:"absolute",left:b.x,top:(b.y>20?b.y:20),width:100,height:100},"class":"mceItemVisualAid"},a.selection.getContent()||a.getLang("layer.content"))},_toggleAbsolute:function(){var a=this.editor,b=this._getParentLayer(a.selection.getNode());if(!b){b=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")}if(b){if(b.style.position.toLowerCase()=="absolute"){a.dom.setStyles(b,{position:"",left:"",top:"",width:"",height:""});a.dom.removeClass(b,"mceItemVisualAid")}else{if(b.style.left==""){b.style.left=20+"px"}if(b.style.top==""){b.style.top=20+"px"}if(b.style.width==""){b.style.width=b.width?(b.width+"px"):"100px"}if(b.style.height==""){b.style.height=b.height?(b.height+"px"):"100px"}b.style.position="absolute";a.dom.setAttrib(b,"data-mce-style","");a.addVisual(a.getBody())}a.execCommand("mceRepaint");a.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})();
|
@@ -1,214 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
(function() {
|
12
|
-
tinymce.create('tinymce.plugins.Layer', {
|
13
|
-
init : function(ed, url) {
|
14
|
-
var t = this;
|
15
|
-
|
16
|
-
t.editor = ed;
|
17
|
-
|
18
|
-
// Register commands
|
19
|
-
ed.addCommand('mceInsertLayer', t._insertLayer, t);
|
20
|
-
|
21
|
-
ed.addCommand('mceMoveForward', function() {
|
22
|
-
t._move(1);
|
23
|
-
});
|
24
|
-
|
25
|
-
ed.addCommand('mceMoveBackward', function() {
|
26
|
-
t._move(-1);
|
27
|
-
});
|
28
|
-
|
29
|
-
ed.addCommand('mceMakeAbsolute', function() {
|
30
|
-
t._toggleAbsolute();
|
31
|
-
});
|
32
|
-
|
33
|
-
// Register buttons
|
34
|
-
ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'});
|
35
|
-
ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'});
|
36
|
-
ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'});
|
37
|
-
ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'});
|
38
|
-
|
39
|
-
ed.onInit.add(function() {
|
40
|
-
if (tinymce.isIE)
|
41
|
-
ed.getDoc().execCommand('2D-Position', false, true);
|
42
|
-
});
|
43
|
-
|
44
|
-
ed.onNodeChange.add(t._nodeChange, t);
|
45
|
-
ed.onVisualAid.add(t._visualAid, t);
|
46
|
-
},
|
47
|
-
|
48
|
-
getInfo : function() {
|
49
|
-
return {
|
50
|
-
longname : 'Layer',
|
51
|
-
author : 'Moxiecode Systems AB',
|
52
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
53
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer',
|
54
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
55
|
-
};
|
56
|
-
},
|
57
|
-
|
58
|
-
// Private methods
|
59
|
-
|
60
|
-
_nodeChange : function(ed, cm, n) {
|
61
|
-
var le, p;
|
62
|
-
|
63
|
-
le = this._getParentLayer(n);
|
64
|
-
p = ed.dom.getParent(n, 'DIV,P,IMG');
|
65
|
-
|
66
|
-
if (!p) {
|
67
|
-
cm.setDisabled('absolute', 1);
|
68
|
-
cm.setDisabled('moveforward', 1);
|
69
|
-
cm.setDisabled('movebackward', 1);
|
70
|
-
} else {
|
71
|
-
cm.setDisabled('absolute', 0);
|
72
|
-
cm.setDisabled('moveforward', !le);
|
73
|
-
cm.setDisabled('movebackward', !le);
|
74
|
-
cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute");
|
75
|
-
}
|
76
|
-
},
|
77
|
-
|
78
|
-
// Private methods
|
79
|
-
|
80
|
-
_visualAid : function(ed, e, s) {
|
81
|
-
var dom = ed.dom;
|
82
|
-
|
83
|
-
tinymce.each(dom.select('div,p', e), function(e) {
|
84
|
-
if (/^(absolute|relative|static)$/i.test(e.style.position)) {
|
85
|
-
if (s)
|
86
|
-
dom.addClass(e, 'mceItemVisualAid');
|
87
|
-
else
|
88
|
-
dom.removeClass(e, 'mceItemVisualAid');
|
89
|
-
}
|
90
|
-
});
|
91
|
-
},
|
92
|
-
|
93
|
-
_move : function(d) {
|
94
|
-
var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl;
|
95
|
-
|
96
|
-
nl = [];
|
97
|
-
tinymce.walk(ed.getBody(), function(n) {
|
98
|
-
if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position))
|
99
|
-
nl.push(n);
|
100
|
-
}, 'childNodes');
|
101
|
-
|
102
|
-
// Find z-indexes
|
103
|
-
for (i=0; i<nl.length; i++) {
|
104
|
-
z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex) : 0;
|
105
|
-
|
106
|
-
if (ci < 0 && nl[i] == le)
|
107
|
-
ci = i;
|
108
|
-
}
|
109
|
-
|
110
|
-
if (d < 0) {
|
111
|
-
// Move back
|
112
|
-
|
113
|
-
// Try find a lower one
|
114
|
-
for (i=0; i<z.length; i++) {
|
115
|
-
if (z[i] < z[ci]) {
|
116
|
-
fi = i;
|
117
|
-
break;
|
118
|
-
}
|
119
|
-
}
|
120
|
-
|
121
|
-
if (fi > -1) {
|
122
|
-
nl[ci].style.zIndex = z[fi];
|
123
|
-
nl[fi].style.zIndex = z[ci];
|
124
|
-
} else {
|
125
|
-
if (z[ci] > 0)
|
126
|
-
nl[ci].style.zIndex = z[ci] - 1;
|
127
|
-
}
|
128
|
-
} else {
|
129
|
-
// Move forward
|
130
|
-
|
131
|
-
// Try find a higher one
|
132
|
-
for (i=0; i<z.length; i++) {
|
133
|
-
if (z[i] > z[ci]) {
|
134
|
-
fi = i;
|
135
|
-
break;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
if (fi > -1) {
|
140
|
-
nl[ci].style.zIndex = z[fi];
|
141
|
-
nl[fi].style.zIndex = z[ci];
|
142
|
-
} else
|
143
|
-
nl[ci].style.zIndex = z[ci] + 1;
|
144
|
-
}
|
145
|
-
|
146
|
-
ed.execCommand('mceRepaint');
|
147
|
-
},
|
148
|
-
|
149
|
-
_getParentLayer : function(n) {
|
150
|
-
return this.editor.dom.getParent(n, function(n) {
|
151
|
-
return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position);
|
152
|
-
});
|
153
|
-
},
|
154
|
-
|
155
|
-
_insertLayer : function() {
|
156
|
-
var ed = this.editor, p = ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(), '*'));
|
157
|
-
|
158
|
-
ed.dom.add(ed.getBody(), 'div', {
|
159
|
-
style : {
|
160
|
-
position : 'absolute',
|
161
|
-
left : p.x,
|
162
|
-
top : (p.y > 20 ? p.y : 20),
|
163
|
-
width : 100,
|
164
|
-
height : 100
|
165
|
-
},
|
166
|
-
'class' : 'mceItemVisualAid'
|
167
|
-
}, ed.selection.getContent() || ed.getLang('layer.content'));
|
168
|
-
},
|
169
|
-
|
170
|
-
_toggleAbsolute : function() {
|
171
|
-
var ed = this.editor, le = this._getParentLayer(ed.selection.getNode());
|
172
|
-
|
173
|
-
if (!le)
|
174
|
-
le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG');
|
175
|
-
|
176
|
-
if (le) {
|
177
|
-
if (le.style.position.toLowerCase() == "absolute") {
|
178
|
-
ed.dom.setStyles(le, {
|
179
|
-
position : '',
|
180
|
-
left : '',
|
181
|
-
top : '',
|
182
|
-
width : '',
|
183
|
-
height : ''
|
184
|
-
});
|
185
|
-
|
186
|
-
ed.dom.removeClass(le, 'mceItemVisualAid');
|
187
|
-
} else {
|
188
|
-
if (le.style.left == "")
|
189
|
-
le.style.left = 20 + 'px';
|
190
|
-
|
191
|
-
if (le.style.top == "")
|
192
|
-
le.style.top = 20 + 'px';
|
193
|
-
|
194
|
-
if (le.style.width == "")
|
195
|
-
le.style.width = le.width ? (le.width + 'px') : '100px';
|
196
|
-
|
197
|
-
if (le.style.height == "")
|
198
|
-
le.style.height = le.height ? (le.height + 'px') : '100px';
|
199
|
-
|
200
|
-
le.style.position = "absolute";
|
201
|
-
|
202
|
-
ed.dom.setAttrib(le, 'data-mce-style', '');
|
203
|
-
ed.addVisual(ed.getBody());
|
204
|
-
}
|
205
|
-
|
206
|
-
ed.execCommand('mceRepaint');
|
207
|
-
ed.nodeChanged();
|
208
|
-
}
|
209
|
-
}
|
210
|
-
});
|
211
|
-
|
212
|
-
// Register plugin
|
213
|
-
tinymce.PluginManager.add('layer', tinymce.plugins.Layer);
|
214
|
-
})();
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"full"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce);
|
@@ -1,139 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*
|
10
|
-
* This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
|
11
|
-
* attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
|
12
|
-
*
|
13
|
-
* However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
|
14
|
-
* not apart of the newer specifications for HTML and XHTML.
|
15
|
-
*/
|
16
|
-
|
17
|
-
(function(tinymce) {
|
18
|
-
// Override inline_styles setting to force TinyMCE to produce deprecated contents
|
19
|
-
tinymce.onAddEditor.addToTop(function(tinymce, editor) {
|
20
|
-
editor.settings.inline_styles = false;
|
21
|
-
});
|
22
|
-
|
23
|
-
// Create the legacy ouput plugin
|
24
|
-
tinymce.create('tinymce.plugins.LegacyOutput', {
|
25
|
-
init : function(editor) {
|
26
|
-
editor.onInit.add(function() {
|
27
|
-
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
|
28
|
-
fontSizes = tinymce.explode(editor.settings.font_size_style_values),
|
29
|
-
schema = editor.schema;
|
30
|
-
|
31
|
-
// Override some internal formats to produce legacy elements and attributes
|
32
|
-
editor.formatter.register({
|
33
|
-
// Change alignment formats to use the deprecated align attribute
|
34
|
-
alignleft : {selector : alignElements, attributes : {align : 'left'}},
|
35
|
-
aligncenter : {selector : alignElements, attributes : {align : 'center'}},
|
36
|
-
alignright : {selector : alignElements, attributes : {align : 'right'}},
|
37
|
-
alignfull : {selector : alignElements, attributes : {align : 'full'}},
|
38
|
-
|
39
|
-
// Change the basic formatting elements to use deprecated element types
|
40
|
-
bold : [
|
41
|
-
{inline : 'b', remove : 'all'},
|
42
|
-
{inline : 'strong', remove : 'all'},
|
43
|
-
{inline : 'span', styles : {fontWeight : 'bold'}}
|
44
|
-
],
|
45
|
-
italic : [
|
46
|
-
{inline : 'i', remove : 'all'},
|
47
|
-
{inline : 'em', remove : 'all'},
|
48
|
-
{inline : 'span', styles : {fontStyle : 'italic'}}
|
49
|
-
],
|
50
|
-
underline : [
|
51
|
-
{inline : 'u', remove : 'all'},
|
52
|
-
{inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
|
53
|
-
],
|
54
|
-
strikethrough : [
|
55
|
-
{inline : 'strike', remove : 'all'},
|
56
|
-
{inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
|
57
|
-
],
|
58
|
-
|
59
|
-
// Change font size and font family to use the deprecated font element
|
60
|
-
fontname : {inline : 'font', attributes : {face : '%value'}},
|
61
|
-
fontsize : {
|
62
|
-
inline : 'font',
|
63
|
-
attributes : {
|
64
|
-
size : function(vars) {
|
65
|
-
return tinymce.inArray(fontSizes, vars.value) + 1;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
},
|
69
|
-
|
70
|
-
// Setup font elements for colors as well
|
71
|
-
forecolor : {inline : 'font', styles : {color : '%value'}},
|
72
|
-
hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
|
73
|
-
});
|
74
|
-
|
75
|
-
// Check that deprecated elements are allowed if not add them
|
76
|
-
tinymce.each('b,i,u,strike'.split(','), function(name) {
|
77
|
-
schema.addValidElements(name + '[*]');
|
78
|
-
});
|
79
|
-
|
80
|
-
// Add font element if it's missing
|
81
|
-
if (!schema.getElementRule("font"))
|
82
|
-
schema.addValidElements("font[face|size|color|style]");
|
83
|
-
|
84
|
-
// Add the missing and depreacted align attribute for the serialization engine
|
85
|
-
tinymce.each(alignElements.split(','), function(name) {
|
86
|
-
var rule = schema.getElementRule(name), found;
|
87
|
-
|
88
|
-
if (rule) {
|
89
|
-
if (!rule.attributes.align) {
|
90
|
-
rule.attributes.align = {};
|
91
|
-
rule.attributesOrder.push('align');
|
92
|
-
}
|
93
|
-
}
|
94
|
-
});
|
95
|
-
|
96
|
-
// Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes
|
97
|
-
editor.onNodeChange.add(function(editor, control_manager) {
|
98
|
-
var control, fontElm, fontName, fontSize;
|
99
|
-
|
100
|
-
// Find font element get it's name and size
|
101
|
-
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
102
|
-
if (fontElm) {
|
103
|
-
fontName = fontElm.face;
|
104
|
-
fontSize = fontElm.size;
|
105
|
-
}
|
106
|
-
|
107
|
-
// Select/unselect the font name in droplist
|
108
|
-
if (control = control_manager.get('fontselect')) {
|
109
|
-
control.select(function(value) {
|
110
|
-
return value == fontName;
|
111
|
-
});
|
112
|
-
}
|
113
|
-
|
114
|
-
// Select/unselect the font size in droplist
|
115
|
-
if (control = control_manager.get('fontsizeselect')) {
|
116
|
-
control.select(function(value) {
|
117
|
-
var index = tinymce.inArray(fontSizes, value.fontSize);
|
118
|
-
|
119
|
-
return index + 1 == fontSize;
|
120
|
-
});
|
121
|
-
}
|
122
|
-
});
|
123
|
-
});
|
124
|
-
},
|
125
|
-
|
126
|
-
getInfo : function() {
|
127
|
-
return {
|
128
|
-
longname : 'LegacyOutput',
|
129
|
-
author : 'Moxiecode Systems AB',
|
130
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
131
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput',
|
132
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
133
|
-
};
|
134
|
-
}
|
135
|
-
});
|
136
|
-
|
137
|
-
// Register plugin
|
138
|
-
tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
|
139
|
-
})(tinymce);
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{if(v&&u.tagName==="P"&&t.tagName==="P"){return true}else{return false}}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(u,v){var s=false;function x(y){return y.keyCode===9&&(u.queryCommandState("InsertUnorderedList")||u.queryCommandState("InsertOrderedList"))}function w(y,A){var z=y.selection,B;if(A.keyCode===13){B=z.getStart();s=z.isCollapsed()&&B&&B.tagName==="LI"&&B.childNodes.length===0;return s}}function t(y,z){if(x(z)||w(y,z)){return r.cancel(z)}}this.ed=u;u.addCommand("Indent",this.indent,this);u.addCommand("Outdent",this.outdent,this);u.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);u.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);u.onInit.add(function(){u.editorCommands.addCommands({outdent:function(){var z=u.selection,A=u.dom;function y(B){B=A.getParent(B,A.isBlock);return B&&(parseInt(u.dom.getStyle(B,"margin-left")||0,10)+parseInt(u.dom.getStyle(B,"padding-left")||0,10))>0}return y(z.getStart())||y(z.getEnd())||u.queryCommandState("InsertOrderedList")||u.queryCommandState("InsertUnorderedList")}},"state")});u.onKeyUp.add(function(z,A){var B,y;if(x(A)){z.execCommand(A.shiftKey?"Outdent":"Indent",true,null);return r.cancel(A)}else{if(s&&w(z,A)){if(z.queryCommandState("InsertOrderedList")){z.execCommand("InsertOrderedList")}else{z.execCommand("InsertUnorderedList")}B=z.selection.getStart();if(B&&B.tagName==="LI"){B=z.dom.getParent(B,"ol,ul").nextSibling;if(B&&B.tagName==="P"){if(!B.firstChild){B.appendChild(z.getDoc().createTextNode(""))}y=z.dom.createRng();y.setStart(B.firstChild,1);y.setEnd(B.firstChild,1);z.selection.setRng(y)}}return r.cancel(A)}}});u.onKeyPress.add(t);u.onKeyDown.add(t)},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O,Q){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(M.tagName==="P"||G.length>1){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true);return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(Q,L,O){var t,P=Q,N,M;while(!I.isBlock(Q.parentNode)&&Q.parentNode!==I.getRoot()){Q=I.split(Q.parentNode,Q.previousSibling);Q=Q.nextSibling;P=Q}if(O){t=O.cloneNode(true);Q.parentNode.insertBefore(t,Q);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");Q.parentNode.insertBefore(t,Q)}while(P&&P!=L){N=P.nextSibling;t.appendChild(P);P=N}if(t.childNodes.length===0){t.innerHTML='<br _mce_bogus="1" />'}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(V){var U;if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(P(N,V)){I.addClass(V,"_mce_tagged_br");N=S(V)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D}}else{B={defaultAction:x}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true)})},outdent:function(){var v=this,u=v.ed,w=u.dom,s=[];function x(t){var z,y,A;if(!d(u,t,s)){if(w.getStyle(t,"margin-left")!==""||w.getStyle(t,"padding-left")!==""){return v.adjustPaddingFunction(false)(t)}A=w.getStyle(t,"text-align",true);if(A==="center"||A==="right"){w.setStyle(t,"text-align","left");return}t=c(t,w);z=t.parentNode;y=t.parentNode.parentNode;if(y.tagName==="P"){w.split(y,t.parentNode)}else{w.split(z,t);if(y.tagName==="LI"){w.split(y,t)}else{if(!w.is(y,"ol,ul")){w.rename(t,"p")}}}s.push(t)}}this.process({LI:x,defaultAction:this.adjustPaddingFunction(false)});e(s,m)},process:function(x){var B=this,v=B.ed.selection,y=B.ed.dom,A,s;function w(t){y.removeClass(t,"_mce_act_on");if(!t||t.nodeType!==1){return}t=k(t,y);var C=x[t.tagName];if(!C){C=x.defaultAction}C(t)}function u(t){B.splitSafeEach(t.childNodes,w)}function z(t,C){return C>=0&&t.hasChildNodes()&&C<t.childNodes.length&&t.childNodes[C].tagName==="BR"}A=v.getSelectedBlocks();if(A.length===0){A=[y.getRoot()]}s=v.getRng(true);if(!s.collapsed){if(z(s.endContainer,s.endOffset-1)){s.setEnd(s.endContainer,s.endOffset-1);v.setRng(s)}if(z(s.startContainer,s.startOffset)){s.setStart(s.startContainer,s.startOffset+1);v.setRng(s)}}g=v.getBookmark();x.OL=x.UL=u;B.splitSafeEach(A,w);v.moveToBookmark(g);g=null;B.ed.execCommand("mceRepaint")},splitSafeEach:function(t,s){if(tinymce.isGecko&&(/Firefox\/[12]\.[0-9]/.test(navigator.userAgent)||/Firefox\/3\.[0-4]/.test(navigator.userAgent))){this.classBasedEach(t,s)}else{e(t,s)}},classBasedEach:function(v,u){var w=this.ed.dom,s,t;e(v,function(x){w.addClass(x,"_mce_act_on")});s=w.select("._mce_act_on");while(s.length>0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}());
|