采用Window对象shim属性解决IE下flash位于弹出窗口之上遮住窗口问题——此方法对firefox暂未解决

Ext.useShims = true;  //指明浏览器中运用垫片效果
Ext.onReady(function() {
     ......
        // 查询窗口对象变量
 var searchWin;
 // 查询按钮
 function doSearch_pic_panel() {
                 searchWin = Ext.getCmp('search-window');  //避免出现显示两个窗口的问题
  if (!searchWin) {
   searchWin = new Ext.Window({
    id:'search-window',
    title : '请输入查询条件',
    layout : 'fit',
    width : 400,
    height : 300,
    closeAction : 'hide',
    plain : true,
    floating:true,
    shim:true,
    items:searchFormPanel_pic_panel,
    buttons : [{
     text : '查询',
     handler : function() {
              //查询处理方法
                                                           ......
                                                        //隐藏查询窗口
       searchWin.hide();
      }
     }
    }, {
     text : '关闭',
     handler : function() {
      searchWin.hide();
     }
    }]
   });
   searchWin.on("move",function(compent){ //解决移动的时候底部的遮罩层与窗口left和top不对齐,宽度和高度与窗口不统一问题
    //alert(11);
    var win = Ext.getCmp('search-window');
    if(win){
     if(win.el.shim){
      win.el.shim.setLeftTop(win.el.getLeft(true), win.el.getTop(true));
         win.el.shim.setHeight(win.el.getHeight());
         win.el.shim.setWidth(win.el.getWidth());
     }
    }
   });
  }
  if(!searchWin.isVisible()){ //避免出现显示两个窗口的问题
   searchWin.show();
   searchWin.el.shim.setLeftTop(searchWin.el.getLeft(true), searchWin.el.getTop(true));
  }
 }
  ......
});

你可能感兴趣的:(function,浏览器,IE,Flash,layout,firefox)