-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-grid.column.Action'>/**
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-grid-column-Action'>/**
</span> * @class Ext.grid.column.Action
* @extends Ext.grid.column.Column
* <p>A Grid header type which renders an icon, or a series of icons in a grid cell, and offers a scoped click
alias: ['widget.actioncolumn'],
alternateClassName: 'Ext.grid.ActionColumn',
-<span id='Ext-grid.column.Action-cfg-icon'> /**
+<span id='Ext-grid-column-Action-cfg-icon'> /**
</span> * @cfg {String} icon
* The URL of an image to display as the clickable element in the column.
* Optional - defaults to <code>{@link Ext#BLANK_IMAGE_URL Ext.BLANK_IMAGE_URL}</code>.
*/
-<span id='Ext-grid.column.Action-cfg-iconCls'> /**
+<span id='Ext-grid-column-Action-cfg-iconCls'> /**
</span> * @cfg {String} iconCls
* A CSS class to apply to the icon image. To determine the class dynamically, configure the Column with a <code>{@link #getClass}</code> function.
*/
-<span id='Ext-grid.column.Action-cfg-handler'> /**
+<span id='Ext-grid-column-Action-cfg-handler'> /**
</span> * @cfg {Function} handler A function called when the icon is clicked.
* The handler is passed the following parameters:<div class="mdetail-params"><ul>
* <li><code>view</code> : TableView<div class="sub-desc">The owning TableView.</div></li>
* <li><code>e</code> : Event<div class="sub-desc">The click event.</div></li>
* </ul></div>
*/
-<span id='Ext-grid.column.Action-cfg-scope'> /**
+<span id='Ext-grid-column-Action-cfg-scope'> /**
</span> * @cfg {Object} scope The scope (<tt><b>this</b></tt> reference) in which the <code>{@link #handler}</code>
* and <code>{@link #getClass}</code> fuctions are executed. Defaults to this Column.
*/
-<span id='Ext-grid.column.Action-cfg-tooltip'> /**
+<span id='Ext-grid-column-Action-cfg-tooltip'> /**
</span> * @cfg {String} tooltip A tooltip message to be displayed on hover. {@link Ext.tip.QuickTipManager#init Ext.tip.QuickTipManager} must have
* been initialized.
*/
-<span id='Ext-grid.column.Action-cfg-stopSelection'> /**
+<span id='Ext-grid-column-Action-cfg-stopSelection'> /**
</span> * @cfg {Boolean} stopSelection Defaults to <code>true</code>. Prevent grid <i>row</i> selection upon mousedown.
*/
-<span id='Ext-grid.column.Action-cfg-getClass'> /**
+<span id='Ext-grid-column-Action-cfg-getClass'> /**
</span> * @cfg {Function} getClass A function which returns the CSS class to apply to the icon image.
* The function is passed the following parameters:<ul>
* <li><b>v</b> : Object<p class="sub-desc">The value of the column's configured field (if any).</p></li>
* <li><b>store</b> : Ext.data.Store<p class="sub-desc">The Store which is providing the data Model.</p></li>
* </ul>
*/
-<span id='Ext-grid.column.Action-cfg-items'> /**
+<span id='Ext-grid-column-Action-cfg-items'> /**
</span> * @cfg {Array} items An Array which may contain multiple icon definitions, each element of which may contain:
* <div class="mdetail-params"><ul>
* <li><code>icon</code> : String<div class="sub-desc">The url of an image to display as the clickable element
actionIdRe: /x-action-col-(\d+)/,
-<span id='Ext-grid.column.Action-cfg-altText'> /**
+<span id='Ext-grid-column-Action-cfg-altText'> /**
</span> * @cfg {String} altText The alt text to use for the image element. Defaults to <tt>''</tt>.
*/
altText: '',
// This is a Container. Delete the items config to be reinstated after construction.
delete cfg.items;
- this.callParent([cfg]);
+ me.callParent([cfg]);
// Items is an array property of ActionColumns
me.items = items;
return this.callParent(arguments);
},
-<span id='Ext-grid.column.Action-method-processEvent'> /**
+<span id='Ext-grid-column-Action-method-processEvent'> /**
</span> * @private
* Process and refire events routed from the GridView's processEvent method.
* Also fires any configured click handlers. By default, cancels the mousedown event to prevent selection.
* Returns the event handler's status to allow canceling of GridView's bubbling process.
*/
processEvent : function(type, view, cell, recordIndex, cellIndex, e){
- var m = e.getTarget().className.match(this.actionIdRe),
+ var me = this,
+ match = e.getTarget().className.match(me.actionIdRe),
item, fn;
- if (m && (item = this.items[parseInt(m[1], 10)])) {
- if (type == 'click') {
- fn = item.handler;
- if (fn || this.handler) {
- fn.call(item.scope||this.scope||this, view, recordIndex, cellIndex, item, e);
+ if (match) {
+ item = me.items[parseInt(match[1], 10)];
+ if (item) {
+ if (type == 'click') {
+ fn = item.handler || me.handler;
+ if (fn) {
+ fn.call(item.scope || me.scope || me, view, recordIndex, cellIndex, item, e);
+ }
+ } else if (type == 'mousedown' && item.stopSelection !== false) {
+ return false;
}
- } else if ((type == 'mousedown') && (item.stopSelection !== false)) {
- return false;
}
}
- return this.callParent(arguments);
+ return me.callParent(arguments);
},
cascade: function(fn, scope) {
getRefItems: function() {
return [];
}
-});</pre></pre></body></html>
\ No newline at end of file
+});</pre>
+</body>
+</html>