SecoWindow2
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;
}