var WebPopWin = function(){ //窗体列表变量 this.WinList = new Array(); //事件变量 this.Evt = null; //计时器变量 this.Interval =null; //数据加载完成变量 this.Complete = false; //蒙版对象变量 this.MarkWin = null; //数据加载条变量 this.DataLoadingBar = null; //配置蒙版层的颜色变量 this.TheMaskBg = 0; this.isEditManage = false; //系统初始化------------------------------------------------------------------------------ this.Loaded = 0; this.SystemLoading = function(){ this.Complete = false; this.Mark(true); var conWin = this.GetWinBox(); conWin.id = "SystemLoadingID"; var curr = document.createElement("div"); curr.className = "inDiv"; curr.innerHTML = "
"; //alert(conWin.firstChild.className); //conWin.firstChild.firstChild.nextSibling.firstChild.firstChild.appendChild(curr); conWin.firstChild.firstChild.nextSibling.appendChild(curr); document.body.appendChild(conWin); this.Resize(conWin); this.WinList[this.WinList.length] = conWin; //设置进度信息 this.Interval = setInterval("popwin.SetLoadingBar()",50); } //系统加载完成 this.SystemLoaded = function(){ this.SetLoadingInfo(90); window.clearInterval(this.Interval); this.Interval = null; this.Interval = setInterval("parent.popwin.SetLoadingBar()",1); } //系统重新加载 this.ResetSystemLoading = function(){ window.clearInterval(this.Interval); this.Interval = null; this.Loaded = 0; } //设置进度条 this.SetLoadingInfo = function(percent){ var objBar = $getbyid("loadingBar"); var objText = $getbyid("loadingText"); if(objBar != null && objText != null){ objBar.style.width = percent + "%"; objText.innerHTML = percent + "%"; } } this.pageIsLoad = false; this.SetLoadingBar = function(){ if(this.Complete==false && this.Loaded<90) this.Loaded += 1; if(this.Complete) this.Loaded += 8; if(!this.pageIsLoad&&this.Complete){ this.SystemLoaded(); this.pageIsLoad = true; } if(this.Loaded%8==0) this.SetLoadingInfo(this.Loaded); if(this.Loaded>100) { this.SetLoadingInfo(100); defaultPage = false; //加载完毕 window.clearInterval(this.Interval); this.Interval = null; this.Loaded = 0; this.Close(); } } //页面加载------------------------------------------------------------------------------ this.Goto = function(url){ //this.Mark(true); popwin.Complete = false; var urlID = url.substring(0,url.indexOf('.')); if($getbyid("frame_main")==null||$getbyid("frame_main").contentWindow==null||$getbyid("frame_main").contentWindow=="undefined") parent.window.location = url; else{ if(ChkFeature(urlID)){ if(!defaultPage) this.DataLoading("页面加载中..."); $getbyid("frame_main").style.height = $getbyid("inBody").style.height = "500px"; try{ divHeight(); }catch(e){} $getbyid("frame_main").src = url; } } } this.pageHeight = 0; this.PageLoaded = function(h){ if(h!=null) this.pageHeight = h; this.CloseDataLoading(); } //监测页面数据更新------------------------------------------------------------------------------ this.loadingDiv = null; this.SubPageResize = function(item){ if(this.Interval!=null) window.clearInterval(this.Interval); this.pageHeight = 0; if(item!=null&&item!="undefined"){ this.DataLoading(); this.loadingDiv = item; parent.Edited = true; this.Interval = setInterval("popwin.SetPageWH()",300); } } this.SetPageWH =function(){ if(this.loadingDiv!=null&&this.loadingDiv.style.display == "none"){ var iframe = null; try{ //iframe = this.WinList[this.WinList.length-1].firstChild.firstChild.nextSibling.firstChild.firstChild.firstChild; iframe = this.WinList[this.WinList.length-1].firstChild.firstChild.nextSibling.firstChild; }catch(e){} if(iframe!=null&&iframe!="undefined"&&iframe.contentWindow.$!=null&&iframe.contentWindow.$!="undefined"&&iframe.contentWindow.$getbyid(this.loadingDiv.id)!=null&&iframe.contentWindow.$getbyid(this.loadingDiv.id)!="undefined"){ var cls = iframe.contentWindow.$getbyid(this.loadingDiv.id).className; if(cls == "erro_ok"|| cls == "erro"){ window.clearInterval(this.Interval); this.CloseDataLoading(); this.SetWinWH(); }else{ window.clearInterval(this.Interval); this.Interval = null; this.loadingDiv = null; if(this.WinList.length==0||(this.WinList.length>0&&this.WinList[this.WinList.length-1].id!="onlineEditObj")) this.Close(); } }else{ window.clearInterval(this.Interval); this.Interval = null; this.loadingDiv = null; if(this.WinList.length==0||(this.WinList.length>0&&this.WinList[this.WinList.length-1].id!="onlineEditObj")) this.Close(); } try{ ListenChkPop(); }catch(e){} } } //数据加载条对象 this.DataLoading = function(loadingTxt){ if(loadingTxt == null) loadingTxt = "数据正在加载中..."; if(this.DataLoadingBar == null){ this.DataLoadingBar = document.createElement("div"); this.DataLoadingBar.className = "loadding"; this.DataLoadingBar.innerHTML = "由于您长时间没有进行页面操作,为了您的系统安全,请重新登录。
" +"" +"