src/pyams_skin/resources/js/ext/tinymce/dev/plugins/compat3x/plugin.min.js
changeset 565 318533413200
parent 564 a1c75f3e0bc7
child 566 a1707c607eec
equal deleted inserted replaced
564:a1c75f3e0bc7 565:318533413200
     1 (function(f){var c;function e(){}function b(g){if(!c&&window&&window.console){c=true;console.log("Deprecated TinyMCE API call: "+g)}}function a(h,g,j,i){h=h||this;if(!g){this.add=this.addToTop=this.remove=this.dispatch=e;return}this.add=function(n,l,k){b("<target>.on"+g+".add(..)");function m(q){var p=[];if(typeof j=="string"){j=j.split(" ")}if(j&&typeof j!="function"){for(var o=0;o<j.length;o++){p.push(q[j[o]])}}if(typeof j=="function"){p=j(g,q,h);if(!p){return}}if(!j){p=[q]}p.unshift(i||h);if(n.apply(l||i||h,p)===false){q.stopImmediatePropagation()}}h.on(g,m,k);return m};this.addToTop=function(l,k){this.add(l,k,true)};this.remove=function(k){return h.off(g,k)};this.dispatch=function(){h.fire(g);return true}}f.util.Dispatcher=a;f.onBeforeUnload=new a(f,"BeforeUnload");f.onAddEditor=new a(f,"AddEditor","editor");f.onRemoveEditor=new a(f,"RemoveEditor","editor");f.util.Cookie={get:e,getHash:e,remove:e,set:e,setHash:e};function d(i){function g(m,n){f.each(m.split(" "),function(o){i["on"+o]=new a(i,o,n)})}function k(m,n,o){return[n.level,o]}function h(m){return function(n,o){if((!o.selection&&!m)||o.selection==m){return[o]}}}if(i.controlManager){return}function l(){var o={},m="add addMenu addSeparator collapse createMenu destroy displayColor expand focus getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex setActive setAriaProperty setColor setDisabled setSelected setState showMenu update";b("editor.controlManager.*");function n(){return l()}f.each(m.split(" "),function(p){o[p]=n});return o}i.controlManager={buttons:{},setDisabled:function(m,n){b("controlManager.setDisabled(..)");if(this.buttons[m]){this.buttons[m].disabled(n)}},setActive:function(m,n){b("controlManager.setActive(..)");if(this.buttons[m]){this.buttons[m].active(n)}},onAdd:new a(),onPostRender:new a(),add:function(m){return m},createButton:l,createColorSplitButton:l,createControl:l,createDropMenu:l,createListBox:l,createMenuButton:l,createSeparator:l,createSplitButton:l,createToolbar:l,createToolbarGroup:l,destroy:e,get:e,setControlType:l};g("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor");g("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset");g("BeforeExecCommand ExecCommand","command ui value args");g("PreProcess PostProcess LoadContent SaveContent Change");g("BeforeSetContent BeforeGetContent SetContent GetContent",h(false));g("SetProgressState","state time");g("VisualAid","element hasVisual");g("Undo Redo",k);g("NodeChange",function(m,n){return[i.controlManager,n.element,i.selection.isCollapsed(),n]});var j=i.addButton;i.addButton=function(n,p){var q;function m(){i.controlManager.buttons[n]=this;if(q){return q.call(this)}}for(var o in p){if(o.toLowerCase()==="onpostrender"){q=p[o];p.onPostRender=m}}if(!q){p.onPostRender=m}if(p.title){p.title=f.i18n.translate((i.settings.language||"en")+"."+p.title)}return j.call(this,n,p)};i.on("init",function(){var n=i.undoManager,m=i.selection;n.onUndo=new a(i,"Undo",k,null,n);n.onRedo=new a(i,"Redo",k,null,n);n.onBeforeAdd=new a(i,"BeforeAddUndo",null,n);n.onAdd=new a(i,"AddUndo",null,n);m.onBeforeGetContent=new a(i,"BeforeGetContent",h(true),m);m.onGetContent=new a(i,"GetContent",h(true),m);m.onBeforeSetContent=new a(i,"BeforeSetContent",h(true),m);m.onSetContent=new a(i,"SetContent",h(true),m)});i.on("BeforeRenderUI",function(){var m=i.windowManager;m.onOpen=new a();m.onClose=new a();m.createInstance=function(p,o,n,t,s,r){b("windowManager.createInstance(..)");var q=f.resolve(p);return new q(o,n,t,s,r)}})}f.on("SetupEditor",d);f.PluginManager.add("compat3x",d);f.addI18n=function(i,j){var g=f.util.I18n,h=f.each;if(typeof i=="string"&&i.indexOf(".")===-1){g.add(i,j);return}if(!f.is(i,"string")){h(i,function(l,k){h(l,function(n,m){h(n,function(q,p){if(m==="common"){g.data[k+"."+p]=q}else{g.data[k+"."+m+"."+p]=q}})})})}else{h(j,function(m,l){g.data[i+"."+l]=m})}}})(tinymce);