/**
* the configurations of js
*/
window.jsapp = {
// context path for js
ctxPath : '/lrs',
dateFormat : 'Ymd',
timestampFormat : 'Y-m-d H:i:s',
defaultQueryButtonKey : '[Q]',
defaultResetButtonKey : '[R]',
defaultSaveButtonKey : '[S]',
xlsExportLimit : 65535,
popwin_width_normal:'900',
popwin_height_normal:'550',
popwin_width_min:'400',
popwin_height_min:'300'
};
// blank image url
if(window.Ext){
Ext.BLANK_IMAGE_URL = jsapp.ctxPath+'/res/extjs3/resources/images/default/s.gif';
// change date format
if(Ext.DatePicker){
Ext.apply(Ext.DatePicker.prototype, {
format : jsapp.dateFormat
});
}
// change date format
if(Ext.grid.DateColumn){
Ext.apply(Ext.grid.DateColumn.prototype, {
format : jsapp.dateFormat
});
}
// change date format
if(Ext.form.DateField){
Ext.apply(Ext.form.DateField.prototype, {
format : jsapp.dateFormat
});
}
// change date format
if(Ext.data.Field){
Ext.apply(Ext.data.Field.prototype, {
dateFormat : jsapp.dateFormat
});
}
// FileUploadField default property
if(Ext.form.FileUploadField){
Ext.apply(Ext.form.FileUploadField.prototype, {
buttonText : '浏览'
});
}
if(Ext.form.FileUploadField){
Ext.apply(Ext.form.FileUploadField.prototype, {
buttonCfg : {
icon:jsapp.ctxPath+'/res/images/icons/find.gif'
}
});
}
if(Ext.grid.GridView){
Ext.apply(Ext.grid.GridView.prototype, {
forceFit:true
});
}
/* lrs config */
if(Ext.grid.GridPanel){
Ext.apply(Ext.grid.GridPanel.prototype, {
columnLines:true
});
}
}
// rewrite Date.toString()
Date.prototype.toString = function(){
return this.dateFormat(jsapp.dateFormat);
}