Separator.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext-menu-Separator'>/**
  19. </span> * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
  20. * add one of these by using &quot;-&quot; in your call to add() or in your items config rather than creating one directly.
  21. *
  22. * @example
  23. * Ext.create('Ext.menu.Menu', {
  24. * width: 100,
  25. * height: 100,
  26. * floating: false, // usually you want this set to True (default)
  27. * renderTo: Ext.getBody(), // usually rendered by it's containing component
  28. * items: [{
  29. * text: 'icon item',
  30. * iconCls: 'add16'
  31. * },{
  32. * xtype: 'menuseparator'
  33. * },{
  34. * text: 'separator above'
  35. * },{
  36. * text: 'regular item'
  37. * }]
  38. * });
  39. */
  40. Ext.define('Ext.menu.Separator', {
  41. extend: 'Ext.menu.Item',
  42. alias: 'widget.menuseparator',
  43. <span id='Ext-menu-Separator-cfg-activeCls'> /**
  44. </span> * @cfg {String} activeCls
  45. * @private
  46. */
  47. <span id='Ext-menu-Separator-cfg-canActivate'> /**
  48. </span> * @cfg {Boolean} canActivate
  49. * @private
  50. */
  51. canActivate: false,
  52. <span id='Ext-menu-Separator-cfg-clickHideDelay'> /**
  53. </span> * @cfg {Boolean} clickHideDelay
  54. * @private
  55. */
  56. <span id='Ext-menu-Separator-cfg-destroyMenu'> /**
  57. </span> * @cfg {Boolean} destroyMenu
  58. * @private
  59. */
  60. <span id='Ext-menu-Separator-cfg-disabledCls'> /**
  61. </span> * @cfg {Boolean} disabledCls
  62. * @private
  63. */
  64. focusable: false,
  65. <span id='Ext-menu-Separator-cfg-href'> /**
  66. </span> * @cfg {String} href
  67. * @private
  68. */
  69. <span id='Ext-menu-Separator-cfg-hrefTarget'> /**
  70. </span> * @cfg {String} hrefTarget
  71. * @private
  72. */
  73. <span id='Ext-menu-Separator-cfg-hideOnClick'> /**
  74. </span> * @cfg {Boolean} hideOnClick
  75. * @private
  76. */
  77. hideOnClick: false,
  78. <span id='Ext-menu-Separator-cfg-icon'> /**
  79. </span> * @cfg {String} icon
  80. * @private
  81. */
  82. <span id='Ext-menu-Separator-cfg-iconCls'> /**
  83. </span> * @cfg {String} iconCls
  84. * @private
  85. */
  86. <span id='Ext-menu-Separator-cfg-menu'> /**
  87. </span> * @cfg {Object} menu
  88. * @private
  89. */
  90. <span id='Ext-menu-Separator-cfg-menuAlign'> /**
  91. </span> * @cfg {String} menuAlign
  92. * @private
  93. */
  94. <span id='Ext-menu-Separator-cfg-menuExpandDelay'> /**
  95. </span> * @cfg {Number} menuExpandDelay
  96. * @private
  97. */
  98. <span id='Ext-menu-Separator-cfg-menuHideDelay'> /**
  99. </span> * @cfg {Number} menuHideDelay
  100. * @private
  101. */
  102. <span id='Ext-menu-Separator-cfg-plain'> /**
  103. </span> * @cfg {Boolean} plain
  104. * @private
  105. */
  106. plain: true,
  107. <span id='Ext-menu-Separator-cfg-separatorCls'> /**
  108. </span> * @cfg {String} separatorCls
  109. * The CSS class used by the separator item to show the incised line.
  110. */
  111. separatorCls: Ext.baseCSSPrefix + 'menu-item-separator',
  112. <span id='Ext-menu-Separator-cfg-text'> /**
  113. </span> * @cfg {String} text
  114. * @private
  115. */
  116. text: '&amp;#160;',
  117. beforeRender: function(ct, pos) {
  118. var me = this;
  119. me.callParent();
  120. me.addCls(me.separatorCls);
  121. }
  122. });</pre>
  123. </body>
  124. </html>