33 lines
No EOL
1.4 KiB
HTML
33 lines
No EOL
1.4 KiB
HTML
<html><head><title>TextItem.js</title><link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/></head><body><h1>TextItem.js</h1><pre class="highlighted"><code><i>/**
|
|
* @class Ext.menu.TextItem
|
|
* @extends Ext.menu.BaseItem
|
|
* Adds a static text string to a menu, usually used as either a heading or group separator.
|
|
* @constructor
|
|
* Creates a <b>new</b> TextItem
|
|
* @param {String} text The text to display
|
|
*/</i>
|
|
Ext.menu.TextItem = <b>function</b>(text){
|
|
<b>this</b>.text = text;
|
|
Ext.menu.TextItem.superclass.constructor.call(<b>this</b>);
|
|
};
|
|
|
|
Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, {
|
|
<i>/**
|
|
* @cfg {Boolean} hideOnClick True to hide the containing menu after <b>this</b> item is clicked (defaults to false)
|
|
*/</i>
|
|
hideOnClick : false,
|
|
<i>/**
|
|
* @cfg {String} itemCls The <b>default</b> CSS class to use <b>for</b> text items (defaults to "x-menu-text")
|
|
*/</i>
|
|
itemCls : "x-menu-text",
|
|
|
|
<i>// private</i>
|
|
onRender : <b>function</b>(){
|
|
<b>var</b> s = document.createElement("span");
|
|
s.className = <b>this</b>.itemCls;
|
|
s.innerHTML = <b>this</b>.text;
|
|
<b>this</b>.el = s;
|
|
Ext.menu.TextItem.superclass.onRender.apply(<b>this</b>, arguments);
|
|
}
|
|
});</code></pre><hr><div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright © 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
|
|
</body></html> |