From 29da6414db77512106250b9832a0b4a0168bd7eb Mon Sep 17 00:00:00 2001 From: alecpl Date: Mon, 27 Apr 2009 07:36:26 +0000 Subject: - Updated TinyMCE to 3.2.3 version --- program/js/tiny_mce/plugins/xhtmlxtras/abbr.htm | 1 - program/js/tiny_mce/plugins/xhtmlxtras/acronym.htm | 1 - .../js/tiny_mce/plugins/xhtmlxtras/attributes.htm | 5 ++-- program/js/tiny_mce/plugins/xhtmlxtras/cite.htm | 1 - program/js/tiny_mce/plugins/xhtmlxtras/del.htm | 3 +-- .../tiny_mce/plugins/xhtmlxtras/editor_plugin.js | 2 +- .../plugins/xhtmlxtras/editor_plugin_src.js | 18 +++++++------ program/js/tiny_mce/plugins/xhtmlxtras/ins.htm | 3 +-- program/js/tiny_mce/plugins/xhtmlxtras/js/del.js | 12 ++++++++- .../plugins/xhtmlxtras/js/element_common.js | 30 ++++++++++++++-------- program/js/tiny_mce/plugins/xhtmlxtras/js/ins.js | 12 ++++++++- 11 files changed, 57 insertions(+), 31 deletions(-) (limited to 'program/js/tiny_mce/plugins/xhtmlxtras') diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/abbr.htm b/program/js/tiny_mce/plugins/xhtmlxtras/abbr.htm index 580028432..3928a17e1 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/abbr.htm +++ b/program/js/tiny_mce/plugins/xhtmlxtras/abbr.htm @@ -9,7 +9,6 @@ -
diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/acronym.htm b/program/js/tiny_mce/plugins/xhtmlxtras/acronym.htm index 54e4c9d9e..4d4ebaac0 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/acronym.htm +++ b/program/js/tiny_mce/plugins/xhtmlxtras/acronym.htm @@ -9,7 +9,6 @@ - diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/attributes.htm b/program/js/tiny_mce/plugins/xhtmlxtras/attributes.htm index cfbb409ab..322b468e3 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/attributes.htm +++ b/program/js/tiny_mce/plugins/xhtmlxtras/attributes.htm @@ -8,7 +8,6 @@ - @@ -36,12 +35,12 @@ - : + : diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/cite.htm b/program/js/tiny_mce/plugins/xhtmlxtras/cite.htm index 7d9eaba4d..cdfaf4e85 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/cite.htm +++ b/program/js/tiny_mce/plugins/xhtmlxtras/cite.htm @@ -9,7 +9,6 @@ - diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/del.htm b/program/js/tiny_mce/plugins/xhtmlxtras/del.htm index d03c4568a..f45676e3d 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/del.htm +++ b/program/js/tiny_mce/plugins/xhtmlxtras/del.htm @@ -9,7 +9,6 @@ - @@ -31,7 +30,7 @@ - +
diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js index 6a3270d35..8c7f48e69 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +++ b/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){ed.addCommand('mceCite',function(){ed.windowManager.open({file:url+'/cite.htm',width:350+parseInt(ed.getLang('xhtmlxtras.cite_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.cite_delta_height',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAcronym',function(){ed.windowManager.open({file:url+'/acronym.htm',width:350+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAbbr',function(){ed.windowManager.open({file:url+'/abbr.htm',width:350+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceDel',function(){ed.windowManager.open({file:url+'/del.htm',width:340+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceIns',function(){ed.windowManager.open({file:url+'/ins.htm',width:340+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});ed.addButton('cite',{title:'xhtmlxtras.cite_desc',cmd:'mceCite'});ed.addButton('acronym',{title:'xhtmlxtras.acronym_desc',cmd:'mceAcronym'});ed.addButton('abbr',{title:'xhtmlxtras.abbr_desc',cmd:'mceAbbr'});ed.addButton('del',{title:'xhtmlxtras.del_desc',cmd:'mceDel'});ed.addButton('ins',{title:'xhtmlxtras.ins_desc',cmd:'mceIns'});ed.addButton('attribs',{title:'xhtmlxtras.attribs_desc',cmd:'mceAttributes'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/]+)>/gi,'');o.content=o.content.replace(/<\/abbr>/gi,'');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}ed.onNodeChange.add(function(ed,cm,n,co){n=ed.dom.getParent(n,'CITE,ACRONYM,ABBR,DEL,INS');cm.setDisabled('cite',co);cm.setDisabled('acronym',co);cm.setDisabled('abbr',co);cm.setDisabled('del',co);cm.setDisabled('ins',co);cm.setDisabled('attribs',n&&n.nodeName=='BODY');if(n){cm.setDisabled(n.nodeName.toLowerCase(),0);cm.setActive(n.nodeName.toLowerCase(),1);}else{cm.setActive('cite',0);cm.setActive('acronym',0);cm.setActive('abbr',0);cm.setActive('del',0);cm.setActive('ins',0);}});},getInfo:function(){return{longname:'XHTML Xtras Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('xhtmlxtras',tinymce.plugins.XHTMLXtrasPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(b,c){b.addCommand("mceCite",function(){b.windowManager.open({file:c+"/cite.htm",width:350+parseInt(b.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:c})});b.addCommand("mceAcronym",function(){b.windowManager.open({file:c+"/acronym.htm",width:350+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAbbr",function(){b.windowManager.open({file:c+"/abbr.htm",width:350+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceDel",function(){b.windowManager.open({file:c+"/del.htm",width:340+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceIns",function(){b.windowManager.open({file:c+"/ins.htm",width:340+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAttributes",function(){b.windowManager.open({file:c+"/attributes.htm",width:380,height:370,inline:1},{plugin_url:c})});b.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});b.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});b.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});b.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});b.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});b.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});if(tinymce.isIE){function a(d,e){if(e.set){e.content=e.content.replace(/]+)>/gi,"");e.content=e.content.replace(/<\/abbr>/gi,"")}}b.onBeforeSetContent.add(a);b.onPostProcess.add(a)}b.onNodeChange.add(function(e,d,g,f){g=e.dom.getParent(g,"CITE,ACRONYM,ABBR,DEL,INS");d.setDisabled("cite",f);d.setDisabled("acronym",f);d.setDisabled("abbr",f);d.setDisabled("del",f);d.setDisabled("ins",f);d.setDisabled("attribs",g&&g.nodeName=="BODY");d.setActive("cite",0);d.setActive("acronym",0);d.setActive("abbr",0);d.setActive("del",0);d.setActive("ins",0);if(g){do{d.setDisabled(g.nodeName.toLowerCase(),0);d.setActive(g.nodeName.toLowerCase(),1)}while(g=g.parentNode)}})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js index 143ed9216..bef06f2d2 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js @@ -104,16 +104,18 @@ cm.setDisabled('del', co); cm.setDisabled('ins', co); cm.setDisabled('attribs', n && n.nodeName == 'BODY'); + cm.setActive('cite', 0); + cm.setActive('acronym', 0); + cm.setActive('abbr', 0); + cm.setActive('del', 0); + cm.setActive('ins', 0); + // Activate all if (n) { - cm.setDisabled(n.nodeName.toLowerCase(), 0); - cm.setActive(n.nodeName.toLowerCase(), 1); - } else { - cm.setActive('cite', 0); - cm.setActive('acronym', 0); - cm.setActive('abbr', 0); - cm.setActive('del', 0); - cm.setActive('ins', 0); + do { + cm.setDisabled(n.nodeName.toLowerCase(), 0); + cm.setActive(n.nodeName.toLowerCase(), 1); + } while (n = n.parentNode); } }); }, diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/ins.htm b/program/js/tiny_mce/plugins/xhtmlxtras/ins.htm index c0f056ff3..9fa21c433 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/ins.htm +++ b/program/js/tiny_mce/plugins/xhtmlxtras/ins.htm @@ -9,7 +9,6 @@ - @@ -31,7 +30,7 @@ - +
diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js b/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js index 005a619c7..7049f2beb 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js +++ b/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -27,7 +27,7 @@ function insertDel() { if (elm == null) { var s = SXE.inst.selection.getContent(); if(s.length > 0) { - tinyMCEPopup.execCommand('mceInsertContent', false, '' + s + ''); + insertInlineElement('del'); var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';}); for (var i=0; i' + s + ''; - - tinyMCEPopup.execCommand('mceInsertContent', false, h); - - var elementArray = tinymce.grep(SXE.inst.dom.select(element_name), function(n) {return n.id == '#sxe_temp_' + element_name + '#';}); + insertInlineElement(element_name); + var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); for (var i=0; i 0) { - tinyMCEPopup.execCommand('mceInsertContent', false, '' + s + ''); + insertInlineElement('INS'); var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';}); for (var i=0; i