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

Ajax

开发平台:

JavaScript

  1. /*
  2.  * qWikiOffice Desktop 0.7
  3.  * Copyright(c) 2007-2008, Integrated Technologies, Inc.
  4.  * licensing@qwikioffice.com
  5.  * 
  6.  * http://www.qwikioffice.com/license
  7.  */
  8. /* Override the module code here.
  9.  * This code will be Loaded on Demand.
  10.  */
  11. Ext.override(QoDesk.LayoutWindow, {
  12. createWindow : function(){
  13. var desktop = this.app.getDesktop();
  14. var win = desktop.getWindow('layout-win');
  15. if(!win){
  16. var winWidth = desktop.getWinWidth() / 1.1;
  17. var winHeight = desktop.getWinHeight() / 1.1;
  18. win = desktop.createWindow({
  19. id: 'layout-win',
  20. title:'Layout Window',
  21. width:winWidth,
  22. height:winHeight,
  23. x:desktop.getWinX(winWidth),
  24. y:desktop.getWinY(winHeight),
  25. iconCls: 'layout-icon',
  26. shim:false,
  27. animCollapse:false,
  28. constrainHeader:true,
  29. minimizable:true,
  30.      maximizable:true,
  31. layout: 'border',
  32. tbar:[{
  33. text: 'Button1'
  34. },{
  35. text: 'Button2'
  36. }],
  37. items:[/*{
  38. region:'north',
  39. border:false,
  40. elements:'body',
  41. height:30
  42. },*/{
  43. region:'west',
  44. autoScroll:true,
  45. collapsible:true,
  46. cmargins:'0 0 0 0',
  47. margins:'0 0 0 0',
  48. split:true,
  49. title:'Panel',
  50. width:parseFloat(winWidth*0.3) < 201 ? parseFloat(winWidth*0.3) : 200
  51. },{
  52. region:'center',
  53. border:false,
  54. layout:'border',
  55. margins:'0 0 0 0',
  56. items:[{
  57. region:'north',
  58. elements:'body',
  59. title:'Panel',
  60. height:winHeight*0.3,
  61. split:true
  62. },{
  63. autoScroll:true,
  64. elements:'body',
  65. region:'center',
  66. id:'Details',
  67. title:'Preview Panel'
  68. }]
  69. }/*,{
  70. region:'south',
  71. border:false,
  72. elements:'body',
  73. height:25
  74. }*/],
  75. taskbuttonTooltip: '<b>Layout Window</b><br />A window with a layout'
  76. });
  77. }
  78. win.show();
  79. }
  80. });