Web UI for ARGUS server
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.

116 lines
3.6 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>The source code</title>
  5. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  6. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  7. </head>
  8. <body onload="prettyPrint();">
  9. <pre class="prettyprint lang-js">/*!
  10. * Ext JS Library 3.3.1
  11. * Copyright(c) 2006-2010 Sencha Inc.
  12. * licensing@sencha.com
  13. * http://www.sencha.com/license
  14. */
  15. <div id="cls-Ext.ButtonGroup"></div>/**
  16. * @class Ext.ButtonGroup
  17. * @extends Ext.Panel
  18. * Container for a group of buttons. Example usage:
  19. * <pre><code>
  20. var p = new Ext.Panel({
  21. title: 'Panel with Button Group',
  22. width: 300,
  23. height:200,
  24. renderTo: document.body,
  25. html: 'whatever',
  26. tbar: [{
  27. xtype: 'buttongroup',
  28. {@link #columns}: 3,
  29. title: 'Clipboard',
  30. items: [{
  31. text: 'Paste',
  32. scale: 'large',
  33. rowspan: 3, iconCls: 'add',
  34. iconAlign: 'top',
  35. cls: 'x-btn-as-arrow'
  36. },{
  37. xtype:'splitbutton',
  38. text: 'Menu Button',
  39. scale: 'large',
  40. rowspan: 3,
  41. iconCls: 'add',
  42. iconAlign: 'top',
  43. arrowAlign:'bottom',
  44. menu: [{text: 'Menu Item 1'}]
  45. },{
  46. xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
  47. },{
  48. text: 'Copy', iconCls: 'add16'
  49. },{
  50. text: 'Format', iconCls: 'add16'
  51. }]
  52. }]
  53. });
  54. * </code></pre>
  55. * @constructor
  56. * Create a new ButtonGroup.
  57. * @param {Object} config The config object
  58. * @xtype buttongroup
  59. */
  60. Ext.ButtonGroup = Ext.extend(Ext.Panel, {
  61. <div id="cfg-Ext.ButtonGroup-columns"></div>/**
  62. * @cfg {Number} columns The <tt>columns</tt> configuration property passed to the
  63. * {@link #layout configured layout manager}. See {@link Ext.layout.TableLayout#columns}.
  64. */
  65. <div id="cfg-Ext.ButtonGroup-baseCls"></div>/**
  66. * @cfg {String} baseCls Defaults to <tt>'x-btn-group'</tt>. See {@link Ext.Panel#baseCls}.
  67. */
  68. baseCls: 'x-btn-group',
  69. <div id="cfg-Ext.ButtonGroup-layout"></div>/**
  70. * @cfg {String} layout Defaults to <tt>'table'</tt>. See {@link Ext.Container#layout}.
  71. */
  72. layout:'table',
  73. defaultType: 'button',
  74. <div id="cfg-Ext.ButtonGroup-frame"></div>/**
  75. * @cfg {Boolean} frame Defaults to <tt>true</tt>. See {@link Ext.Panel#frame}.
  76. */
  77. frame: true,
  78. internalDefaults: {removeMode: 'container', hideParent: true},
  79. initComponent : function(){
  80. this.layoutConfig = this.layoutConfig || {};
  81. Ext.applyIf(this.layoutConfig, {
  82. columns : this.columns
  83. });
  84. if(!this.title){
  85. this.addClass('x-btn-group-notitle');
  86. }
  87. this.on('afterlayout', this.onAfterLayout, this);
  88. Ext.ButtonGroup.superclass.initComponent.call(this);
  89. },
  90. applyDefaults : function(c){
  91. c = Ext.ButtonGroup.superclass.applyDefaults.call(this, c);
  92. var d = this.internalDefaults;
  93. if(c.events){
  94. Ext.applyIf(c.initialConfig, d);
  95. Ext.apply(c, d);
  96. }else{
  97. Ext.applyIf(c, d);
  98. }
  99. return c;
  100. },
  101. onAfterLayout : function(){
  102. var bodyWidth = this.body.getFrameWidth('lr') + this.body.dom.firstChild.offsetWidth;
  103. this.body.setWidth(bodyWidth);
  104. this.el.setWidth(bodyWidth + this.getFrameWidth());
  105. }
  106. <div id="cfg-Ext.ButtonGroup-tools"></div>/**
  107. * @cfg {Array} tools @hide
  108. */
  109. });
  110. Ext.reg('buttongroup', Ext.ButtonGroup);
  111. </pre>
  112. </body>
  113. </html>