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.

55 lines
2.1 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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-method-constructor'><span id='Ext-menu-Separator'>/**
  19. </span></span> * @class Ext.menu.Separator
  20. * @extends Ext.menu.BaseItem
  21. * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
  22. * add one of these by using &quot;-&quot; in you call to add() or in your items config rather than creating one directly.
  23. * @constructor
  24. * @param {Object} config Configuration options
  25. * @xtype menuseparator
  26. */
  27. Ext.menu.Separator = Ext.extend(Ext.menu.BaseItem, {
  28. <span id='Ext-menu-Separator-cfg-itemCls'> /**
  29. </span> * @cfg {String} itemCls The default CSS class to use for separators (defaults to &quot;x-menu-sep&quot;)
  30. */
  31. itemCls : &quot;x-menu-sep&quot;,
  32. <span id='Ext-menu-Separator-cfg-hideOnClick'> /**
  33. </span> * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
  34. */
  35. hideOnClick : false,
  36. <span id='Ext-menu-Separator-cfg-activeClass'> /**
  37. </span> * @cfg {String} activeClass
  38. * @hide
  39. */
  40. activeClass: '',
  41. <span id='Ext-menu-Separator-method-onRender'> // private
  42. </span> onRender : function(li){
  43. var s = document.createElement(&quot;span&quot;);
  44. s.className = this.itemCls;
  45. s.innerHTML = &quot;&amp;#160;&quot;;
  46. this.el = s;
  47. li.addClass(&quot;x-menu-sep-li&quot;);
  48. Ext.menu.Separator.superclass.onRender.apply(this, arguments);
  49. }
  50. });
  51. Ext.reg('menuseparator', Ext.menu.Separator);</pre>
  52. </body>
  53. </html>