/* Info screen */ (function (window){ var FWDMInfo = function(prt, warningIconPath){ var _s = this; var prototype = FWDMInfo.prototype; _s.textHolder_do = null; _s.img_do; _s.warningIconPath_str = warningIconPath; _s.show_to = null; _s.isShowed_bl = false; _s.isShowedOnce_bl = false; _s.allowToRemove_bl = true; //#################################// /* init */ //#################################// _s.init = function(){ _s.setResizableSizeAfterParent(); _s.getStyle().width = "80%"; _s.textHolder_do = new FWDMDisplayObject("div"); if(!FWDMUtils.isIEAndLessThen9) _s.textHolder_do.getStyle().font = "Arial"; _s.textHolder_do.getStyle().wordWrap = "break-word"; _s.textHolder_do.getStyle().padding = "10px"; _s.textHolder_do.getStyle().paddingLeft = "42px"; _s.textHolder_do.getStyle().lineHeight = "18px"; _s.textHolder_do.setBkColor("#EEEEEE"); var img_img = new Image(); img_img.src = _s.warningIconPath_str; _s.img_do = new FWDMDisplayObject("img"); _s.img_do.setScreen(img_img); _s.img_do.setWidth(28); _s.img_do.setHeight(28); _s.addChild(_s.textHolder_do); _s.addChild(_s.img_do); }; _s.showText = function(txt){ if(!_s.isShowedOnce_bl){ if(_s.screen.addEventListener){ _s.screen.addEventListener("click", _s.closeWindow); }else if(_s.screen.attachEvent){ _s.screen.attachEvent("onclick", _s.closeWindow); } _s.isShowedOnce_bl = true; } //_s.setX(-800); //if(_s.allowToRemove_bl){ // _s.textHolder_do.setInnerHTML(txt + "
Click or tap to close _s window."); // }else{ _s.textHolder_do.setInnerHTML(txt); //} clearTimeout(_s.show_to); _s.show(); }; _s.show = function(){ _s.isShowed_bl = true; _s.setVisible(true); setTimeout(function(){ _s.positionAndResize(); }, 60); }; _s.positionAndResize = function(){ _s.setHeight(_s.textHolder_do.getHeight()); _s.img_do.setX(6); _s.img_do.setY(parseInt((_s.h - _s.img_do.h)/2)); }; _s.closeWindow = function(){ if(!_s.allowToRemove_bl) return; _s.isShowed_bl = false; clearTimeout(_s.show_to); try{prt.main_do.removeChild(_s);}catch(e){} }; _s.init(); }; /* set prototype */ FWDMInfo.setPrototype = function(){ FWDMInfo.prototype = new FWDMDisplayObject("div", "relative"); }; FWDMInfo.prototype = null; window.FWDMInfo = FWDMInfo; }(window));