SecoWindow2

goodboyy 2010-12-15 10:16:35
SecoWindow.prototype.isIE8 = function() {
if(typeof(window.clientInformation) == 'undefined'){
return false;
}else{
var version = window.clientInformation.appVersion;
if(version.indexOf('MSIE 8.0;')>0){
return true;
}else{
return false;
}
}
}

SecoWindow.prototype.setFFFeature = function(width, height) {
var left = (screen.availWidth - width) / 2;
var top = (screen.availHeight - height) / 2;
this.ffFeature = "height="
+ height
+ ", width="
+ width
+ ", top="
+ top
+ ", left="
+ left
+ ", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no, dialog=yes";
}

SecoWindow.prototype.resize = function(width, height) {
var left = (screen.availWidth - width) / 2;
var top = (screen.availHeight - height) / 2;
this.ieFeature = "dialogHeight:"
+ height
+ "px; dialogWidth:"
+ width
+ "px; dialogTop:"
+ top
+ "px; dialogLeft:"
+ left
+ "px; toolbar:no; menubar:no; scrollbars:no; resizable:no; location:no;status:no";
this.ffFeature = "height="
+ height
+ ", width="
+ width
+ ", top="
+ top
+ ", left="
+ left
+ ", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no, dialog=yes";

var time = new Date();
this.url = this.defaultURL + "?rand=" + time.getTime();
}

SecoWindow.prototype.open = function() {
var params = Ext.urlDecode(window.location.search.substring(1));
var lang="";
if(params.lang){
lang="&charset=utf-8&lang="+params.lang;
}
var a = opm.deploy.cp.get('switch_style_opm');
Ext.util.CSS.swapStyleSheet('window', '../../resources/css/' + a + '.css');
if (this.title) {
this.paras = this.paras + "&title=" +this.title+"&style="+a;
}
if (this.paras) {
this.url = this.url + "&" + this.paras+lang+"&pageSize="+secospace_grid_page_limit;
}

if (this.isIE) {
if (!this.obj) {
this.obj = new Object();
}
window.showModalDialog(encodeURI(this.url), this.obj, this.ieFeature);
} else {
var win=window.open(encodeURI(this.url), "policyWin", this.ffFeature);
if(win) win.focus();
}
}

getWinGrid = function(id){
var grid = Ext.getCmp(id);
return grid;
}
...全文
43 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

678

社区成员

发帖
与我相关
我的任务
社区描述
智能路由器通常具有独立的操作系统,包括OpenWRT、eCos、VxWorks等,可以由用户自行安装各种应用,实现网络和设备的智能化管理。
linuxpython 技术论坛(原bbs)
社区管理员
  • 智能路由器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧