首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

extjs 解决combox和datefield 上拉部份被其他层遮盖的有关问题

2012-11-22 
extjs 解决combox和datefield 下拉部份被其他层遮盖的问题在我们使用combox和datefield 的时候,常遇到弹出

extjs 解决combox和datefield 下拉部份被其他层遮盖的问题

在我们使用combox和datefield 的时候,常遇到弹出的window或者是在页面中使用了蒙版的时候会被其他的div给遮盖住,以下就是我在项目中使用的一个办法:
1,先添加
Ext.WindowMgr.zseed=50000;
2,解决combox的问题

?

Ext.form.ComboBox.prototype.initComponent = Ext.form.ComboBox.prototype.initComponent.createSequence( function(){    this.on('render', function(){            var zindex = Ext.WindowMgr.zseed + 5000;            this.on('expand', function(){                    this.list.setStyle("z-index", zindex.toString() );                },                this,                {single: true}            );        },        this,        {single: true}    );});
3,解决DateField的问题

?

Ext.form.DateField.prototype.onTriggerClick=function(){    if(this.disabled){        return;    }    if(this.menu == null){        this.menu = new Ext.menu.DateMenu();    }    Ext.apply(this.menu.picker,  {        minDate : this.minValue,        maxDate : this.maxValue,        disabledDatesRE : this.ddMatch,        disabledDatesText : this.disabledDatesText,        disabledDays : this.disabledDays,        disabledDaysText : this.disabledDaysText,        format : this.format,        showToday : this.showToday,        minText : String.format(this.minText, this.formatDate(this.minValue)),        maxText : String.format(this.maxText, this.formatDate(this.maxValue))    });    this.menu.on(Ext.apply({}, this.menuListeners, {        scope:this    }));    this.menu.picker.setValue(this.getValue() || new Date());    this.menu.show(this.el, "tl-bl?");    //    var zindex = Ext.WindowMgr.zseed + 5000;    this.menu.el.setStyle("z-index", zindex.toString() );    //}

?

热点排行