src/pyams_skin/resources/js/ext/tinymce/dev/classes/WindowManager.min.js
changeset 81 472bd9195a15
equal deleted inserted replaced
80:181b3a0ee15a 81:472bd9195a15
       
     1 define("tinymce/WindowManager",["tinymce/ui/Window","tinymce/ui/MessageBox"],function(b,a){return function(e){var d=this,f=[];function c(){if(f.length){return f[f.length-1]}}d.windows=f;e.on("remove",function(){var g=f.length;while(g--){f[g].close()}});d.open=function(g,i){var h;e.editorManager.setActive(e);g.title=g.title||" ";g.url=g.url||g.file;if(g.url){g.width=parseInt(g.width||320,10);g.height=parseInt(g.height||240,10)}if(g.body){g.items={defaults:g.defaults,type:g.bodyType||"form",items:g.body}}if(!g.url&&!g.buttons){g.buttons=[{text:"Ok",subtype:"primary",onclick:function(){h.find("form")[0].submit()}},{text:"Cancel",onclick:function(){h.close()}}]}h=new b(g);f.push(h);h.on("close",function(){var j=f.length;while(j--){if(f[j]===h){f.splice(j,1)}}if(!f.length){e.focus()}});if(g.data){h.on("postRender",function(){this.find("*").each(function(k){var j=k.name();if(j in g.data){k.value(g.data[j])}})})}h.features=g||{};h.params=i||{};if(f.length===1){e.nodeChanged()}return h.renderTo().reflow()};d.alert=function(h,i,g){a.alert(h,function(){if(i){i.call(g||this)}else{e.focus()}})};d.confirm=function(h,i,g){a.confirm(h,function(j){i.call(g||this,j)})};d.close=function(){if(c()){c().close()}};d.getParams=function(){return c()?c().params:null};d.setParams=function(g){if(c()){c().params=g}};d.getWindows=function(){return f}}});