tab-win-override.js
上传用户:snow1005
上传日期:2015-11-10
资源大小:3151k
文件大小:2k
源码类别:

Ajax

开发平台:

JavaScript

  1. /* Override the module code here.
  2.  * This code will be Loaded on Demand.
  3.  */
  4. Ext.override(QoDesk.TabWindow, {
  5. createWindow : function(){
  6.         var desktop = this.app.getDesktop();
  7.         var win = desktop.getWindow(this.moduleId);
  8.         
  9.         if(!win){
  10.          var winWidth = desktop.getWinWidth() / 1.1;
  11. var winHeight = desktop.getWinHeight() / 1.1;
  12.             win = desktop.createWindow({
  13.                 id: this.moduleId,
  14.                 title: 'Tab Window',
  15.                 width: winWidth,
  16.                 height: winHeight,
  17.                 iconCls: 'tab-icon',
  18.                 shim: false,
  19.                 constrainHeader: true,
  20.                 layout: 'fit',
  21.                 items:
  22.                     new Ext.TabPanel({
  23.                         activeTab:0,
  24.                         items: [{
  25.                          autoScroll: true,
  26.                             title: 'Tab 1',
  27.                             header: false,
  28.                             html: '<p>Something useful would be in here.</p>',
  29.                  border: false
  30.                         },{
  31.                             title: 'Tab 2',
  32.                             header:false,
  33.                             html: '<p>Something useful would be in here.</p>',
  34.                             border: false
  35.                         },{
  36.                             title: 'Tab 3',
  37.                             header:false,
  38.                             html: '<p>Something useful would be in here.</p>',
  39.                             border:false
  40.                         }]
  41.                     }),
  42.                     taskbuttonTooltip: '<b>Tab Window</b><br />A window with tabs'
  43.             });
  44.         }
  45.         win.show();
  46.     }
  47. });