Web Interface For Lite Argus Control modules
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.

115 lines
3.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*!
  2. * Ext JS Library 3.3.1
  3. * Copyright(c) 2006-2010 Sencha Inc.
  4. * licensing@sencha.com
  5. * http://www.sencha.com/license
  6. */
  7. Ext.onReady(function(){
  8. // NOTE: This is an example showing simple state management. During development,
  9. // it is generally best to disable state management as dynamically-generated ids
  10. // can change across page loads, leading to unpredictable results. The developer
  11. // should ensure that stable state ids are set for stateful components in real apps.
  12. Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
  13. // create some portlet tools using built in Ext tool ids
  14. var tools = [{
  15. id:'gear',
  16. handler: function(){
  17. Ext.Msg.alert('Message', 'The Settings tool was clicked.');
  18. }
  19. },{
  20. id:'close',
  21. handler: function(e, target, panel){
  22. panel.ownerCt.remove(panel, true);
  23. }
  24. }];
  25. var viewport = new Ext.Viewport({
  26. layout:'border',
  27. items:[{
  28. region:'west',
  29. id:'west-panel',
  30. title:'West',
  31. split:true,
  32. width: 200,
  33. minSize: 175,
  34. maxSize: 400,
  35. collapsible: true,
  36. margins:'35 0 5 5',
  37. cmargins:'35 5 5 5',
  38. layout:'accordion',
  39. layoutConfig:{
  40. animate:true
  41. },
  42. items: [{
  43. html: Ext.example.shortBogusMarkup,
  44. title:'Navigation',
  45. autoScroll:true,
  46. border:false,
  47. iconCls:'nav'
  48. },{
  49. title:'Settings',
  50. html: Ext.example.shortBogusMarkup,
  51. border:false,
  52. autoScroll:true,
  53. iconCls:'settings'
  54. }]
  55. },{
  56. xtype:'portal',
  57. region:'center',
  58. margins:'35 5 5 0',
  59. items:[{
  60. columnWidth:.33,
  61. style:'padding:10px 0 10px 10px',
  62. items:[{
  63. title: 'Grid in a Portlet',
  64. layout:'fit',
  65. tools: tools,
  66. items: new SampleGrid([0, 2, 3])
  67. },{
  68. title: 'Another Panel 1',
  69. tools: tools,
  70. html: Ext.example.shortBogusMarkup
  71. }]
  72. },{
  73. columnWidth:.33,
  74. style:'padding:10px 0 10px 10px',
  75. items:[{
  76. title: 'Panel 2',
  77. tools: tools,
  78. html: Ext.example.shortBogusMarkup
  79. },{
  80. title: 'Another Panel 2',
  81. tools: tools,
  82. html: Ext.example.shortBogusMarkup
  83. }]
  84. },{
  85. columnWidth:.33,
  86. style:'padding:10px',
  87. items:[{
  88. title: 'Panel 3',
  89. tools: tools,
  90. html: Ext.example.shortBogusMarkup
  91. },{
  92. title: 'Another Panel 3',
  93. tools: tools,
  94. html: Ext.example.shortBogusMarkup
  95. }]
  96. }]
  97. /*
  98. * Uncomment this block to test handling of the drop event. You could use this
  99. * to save portlet position state for example. The event arg e is the custom
  100. * event defined in Ext.ux.Portal.DropZone.
  101. */
  102. // ,listeners: {
  103. // 'drop': function(e){
  104. // Ext.Msg.alert('Portlet Dropped', e.panel.title + '<br />Column: ' +
  105. // e.columnIndex + '<br />Position: ' + e.position);
  106. // }
  107. // }
  108. }]
  109. });
  110. });