You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
4.5 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.onReady(function() {
  16. Ext.QuickTips.init();
  17. // create some portlet tools using built in Ext tool ids
  18. var tools = [{
  19. id:'gear',
  20. handler: function(){
  21. Ext.Msg.alert('Message', 'The Settings tool was clicked.');
  22. }
  23. },{
  24. id:'close',
  25. handler: function(e, target, panel){
  26. panel.ownerCt.remove(panel, true);
  27. }
  28. }];
  29. var viewport = new Ext.Viewport({
  30. layout:'fit',
  31. items:[{
  32. xtype: 'grouptabpanel',
  33. tabWidth: 130,
  34. activeGroup: 0,
  35. items: [{
  36. mainItem: 1,
  37. items: [{
  38. title: 'Tickets',
  39. layout: 'fit',
  40. iconCls: 'x-icon-tickets',
  41. tabTip: 'Tickets tabtip',
  42. style: 'padding: 10px;',
  43. items: [new SampleGrid([0,1,2,3,4])]
  44. },
  45. {
  46. xtype: 'portal',
  47. title: 'Dashboard',
  48. tabTip: 'Dashboard tabtip',
  49. items:[{
  50. columnWidth:.33,
  51. style:'padding:10px 0 10px 10px',
  52. items:[{
  53. title: 'Grid in a Portlet',
  54. layout:'fit',
  55. tools: tools,
  56. items: new SampleGrid([0, 2, 3])
  57. },{
  58. title: 'Another Panel 1',
  59. tools: tools,
  60. html: Ext.example.shortBogusMarkup
  61. }]
  62. },{
  63. columnWidth:.33,
  64. style:'padding:10px 0 10px 10px',
  65. items:[{
  66. title: 'Panel 2',
  67. tools: tools,
  68. html: Ext.example.shortBogusMarkup
  69. },{
  70. title: 'Another Panel 2',
  71. tools: tools,
  72. html: Ext.example.shortBogusMarkup
  73. }]
  74. },{
  75. columnWidth:.33,
  76. style:'padding:10px',
  77. items:[{
  78. title: 'Panel 3',
  79. tools: tools,
  80. html: Ext.example.shortBogusMarkup
  81. },{
  82. title: 'Another Panel 3',
  83. tools: tools,
  84. html: Ext.example.shortBogusMarkup
  85. }]
  86. }]
  87. }, {
  88. title: 'Subscriptions',
  89. iconCls: 'x-icon-subscriptions',
  90. tabTip: 'Subscriptions tabtip',
  91. style: 'padding: 10px;',
  92. layout: 'fit',
  93. items: [{
  94. xtype: 'tabpanel',
  95. activeTab: 1,
  96. items: [{
  97. title: 'Nested Tabs',
  98. html: Ext.example.shortBogusMarkup
  99. }]
  100. }]
  101. }, {
  102. title: 'Users',
  103. iconCls: 'x-icon-users',
  104. tabTip: 'Users tabtip',
  105. style: 'padding: 10px;',
  106. html: Ext.example.shortBogusMarkup
  107. }]
  108. }, {
  109. expanded: true,
  110. items: [{
  111. title: 'Configuration',
  112. iconCls: 'x-icon-configuration',
  113. tabTip: 'Configuration tabtip',
  114. style: 'padding: 10px;',
  115. html: Ext.example.shortBogusMarkup
  116. }, {
  117. title: 'Email Templates',
  118. iconCls: 'x-icon-templates',
  119. tabTip: 'Templates tabtip',
  120. style: 'padding: 10px;',
  121. html: Ext.example.shortBogusMarkup
  122. }]
  123. }]
  124. }]
  125. });
  126. });