Changeset 5869 for trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons
- Timestamp:
- 12/29/09 08:16:25 (2 years ago)
- Location:
- trunk/TinyMCEPlugin
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons (modified) (1 prop)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/attach_error_autoinc.htm (modified) (1 prop)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin.js (modified) (1 diff)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin_src.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/TinyMCEPlugin
- Property svn:mergeinfo changed
/branches/Release01x00/TinyMCEPlugin merged: 5747,5860,5866
- Property svn:mergeinfo changed
-
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons
- Property svn:mergeinfo changed
/branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons merged: 5747,5860
- Property svn:mergeinfo changed
-
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/attach_error_autoinc.htm
- Property svn:mergeinfo changed
-
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin.js
r5710 r5869 3 3 return;ed.windowManager.open({location:false,menubar:false,toolbar:false,status:false,url:url+'/colours.htm',width:240,height:140,movable:true,popup_css:false,inline:true},{plugin_url:url});});ed.addButton('colour',{title:'foswikibuttons.colour_desc',cmd:'foswikibuttonsColour',image:url+'/img/colour.gif'});ed.addCommand('foswikibuttonsAttach',function(){var htmpath='/attach.htm',htmheight=250;if(null!==FoswikiTiny.foswikiVars.TOPIC.match(/(X{10}|AUTOINC[0-9]+)/)){htmpath='/attach_error_autoinc.htm',htmheight=125;} 4 4 ed.windowManager.open({location:false,menubar:false,toolbar:false,status:false,url:url+htmpath,width:350,height:htmheight,movable:true,inline:true},{plugin_url:url});});ed.addButton('attach',{title:'foswikibuttons.attach_desc',cmd:'foswikibuttonsAttach',image:url+'/img/attach.gif'});ed.addCommand('foswikibuttonsHide',function(){if(FoswikiTiny.saveEnabled){if(ed.getParam('fullscreen_is_enabled')){ed.onGetContent.add(function(){tinymce.DOM.win.setTimeout(function(){var e=tinyMCE.activeEditor;tinyMCE.execCommand("mceToggleEditor",true,e.id);FoswikiTiny.switchToRaw(e);},10);});ed.execCommand('mceFullScreen');} 5 else{tinyMCE.execCommand("mceToggleEditor",true,ed.id);FoswikiTiny.switchToRaw(ed);}}});ed.addButton('hide',{title:'foswikibuttons.hide_desc',cmd:'foswikibuttonsHide',image:url+'/img/hide.gif'});ed.addCommand('foswikibuttonsFormat',function(ui,fn){var format=null;for(var i=0;i<ed.fw_formats.length;i++){if(ed.fw_formats[i].name==fn){format=ed.fw_formats[i];break;}} 6 if(format.el!=null){var fmt=format.el;if(fmt.length) 7 fmt='<'+fmt+'>';ed.execCommand('FormatBlock',false,fmt);if(format.el==''){var elm=ed.selection.getNode();ed.execCommand('removeformat',false,elm);}} 8 if(format.style!=null){ed.execCommand('mceSetCSSClass',false,format.style);} 5 else{tinyMCE.execCommand("mceToggleEditor",true,ed.id);FoswikiTiny.switchToRaw(ed);}}});ed.addButton('hide',{title:'foswikibuttons.hide_desc',cmd:'foswikibuttonsHide',image:url+'/img/hide.gif'});ed.addCommand('foswikibuttonsFormat',function(ui,fn){var format=null;for(var i=0;i<ed.fw_formats.length;i++){if(ed.fw_formats[i].name===fn){format=ed.fw_formats[i];break;}} 6 if(format.el!==null){var fmt=format.el;ed.execCommand('FormatBlock',false,fmt);} 7 if(format.style!==null){ed.execCommand('mceSetCSSClass',false,format.style);} 9 8 ed.nodeChanged();});ed.onNodeChange.add(this._nodeChange,this);},getInfo:function(){return{longname:'Foswiki Buttons Plugin',author:'Crawford Currie',authorurl:'http://c-dot.co.uk',infourl:'http://c-dot.co.uk',version:2};},createControl:function(n,cm){if(n=='foswikiformat'){var ed=tinyMCE.activeEditor;var m=cm.createListBox(ed.id+'_'+n,{title:'Format',onselect:function(format){ed.execCommand('foswikibuttonsFormat',false,format);}});var formats=ed.getParam("foswikibuttons_formats");for(var i=0;i<formats.length;i++){m.add(formats[i].name,formats[i].name);} 10 9 m.selectByIndex(0);ed.fw_lb=m;return m;} -
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin_src.js
r5710 r5869 133 133 var format = null; 134 134 for (var i = 0; i < ed.fw_formats.length; i++) { 135 if (ed.fw_formats[i].name == fn) {135 if (ed.fw_formats[i].name === fn) { 136 136 format = ed.fw_formats[i]; 137 137 break; 138 138 } 139 139 } 140 if (format.el != null) { 141 var fmt = format.el; 142 if (fmt.length) 143 fmt = '<' + fmt + '>'; 144 // SMELL: MIDAS command 145 ed.execCommand('FormatBlock', false, fmt); 146 if (format.el == '') { 140 if (format.el !== null) { 141 ed.execCommand('FormatBlock', false, format.el); 142 /* Item2447: We apply a <div> instead of null element 143 if (format.el === '') { 147 144 var elm = ed.selection.getNode(); 148 145 // SMELL: MIDAS command 149 146 ed.execCommand('removeformat', false, elm); 150 } 151 } 152 if (format.style != null) {147 }*/ 148 } 149 if (format.style !== null) { 153 150 // element is additionally styled 154 151 ed.execCommand('mceSetCSSClass', false,
Note: See TracChangeset
for help on using the changeset viewer.
