KISSY.Editor.add("overlay",function(){var b=KISSY,e=b.UIBase,a=b.Editor;if(a.Overlay)b.log("ke overlay attach more");else{var g=e.create(b.Overlay,[a.UIBase.Focus],{syncUI:function(){a.Utils.preventFocus(this.get("contentEl"))}},{ATTRS:{zIndex:{value:a.baseZIndex(a.zIndexManager.OVERLAY)}}}),f=e.create(b.Dialog,[a.UIBase.Focus],{show:function(){this.center();var d=this.get("y");if(d-b.DOM.scrollTop()>200){d=b.DOM.scrollTop()+200;this.set("y",d)}f.superclass.show.call(this)}},{ATTRS:{constrain:{value:true},
zIndex:{value:a.baseZIndex(a.zIndexManager.OVERLAY)}}});a.Overlay=g;a.Dialog=f;var c;a.Overlay.loading=function(){c||(c=new a.Overlay({x:0,focus4e:false,width:b.UA.ie==6?b.DOM.docWidth():"100%",y:0,zIndex:a.baseZIndex(a.zIndexManager.LOADING),elCls:"ke-global-loading"}));c.set("height",b.DOM.docHeight());c.show();c.loading()};a.Overlay.unloading=function(){c&&c.hide()}}});
