WordPress/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js

1 line
1008 B
JavaScript

tinymce.WPWindowManager=tinymce.InlineWindowManager=function(a){this.parent=a.windowManager,this.editor=a,tinymce.extend(this,this.parent),this.open=function(b,c){var d,e=this;return b.wpDialog?(b.id&&(e.element=d=jQuery("#"+b.id),d.length&&(window&&window.console&&window.console.log("tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML."),e.features=b,e.params=c,e.windows.push(d),a.nodeChanged(),d.data("wpdialog")||d.wpdialog({title:b.title,width:b.width,height:b.height,modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),d.wpdialog("open"),d.on("wpdialogclose",function(){for(var a=e.windows.length;a--&&a>-1;)e.windows[a]===e.element&&e.windows.splice(a,1)}))),void 0):this.parent.open(b,c)},this.close=function(){return this.features.wpDialog?(this.element.wpdialog("close"),void 0):this.parent.close.apply(this,arguments)}},tinymce.PluginManager.add("wpdialogs",function(a){a.on("init",function(){a.windowManager=new tinymce.WPWindowManager(a)})});