-<!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-view.AbstractView'>/**
+<!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-view-AbstractView'>/**
</span> * @class Ext.view.AbstractView
* @extends Ext.Component
* This is an abstract superclass and should not be used directly. Please see {@link Ext.view.View}.
}
},
-<span id='Ext-view.AbstractView-cfg-tpl'> /**
+<span id='Ext-view-AbstractView-cfg-tpl'> /**
</span> * @cfg {String/Array/Ext.XTemplate} tpl
* @required
* The HTML fragment or an array of fragments that will make up the template used by this DataView. This should
* be specified in the same format expected by the constructor of {@link Ext.XTemplate}.
*/
-<span id='Ext-view.AbstractView-cfg-store'> /**
+<span id='Ext-view-AbstractView-cfg-store'> /**
</span> * @cfg {Ext.data.Store} store
* @required
* The {@link Ext.data.Store} to bind this DataView to.
*/
-<span id='Ext-view.AbstractView-cfg-itemSelector'> /**
+<span id='Ext-view-AbstractView-cfg-itemSelector'> /**
</span> * @cfg {String} itemSelector
* @required
* <b>This is a required setting</b>. A simple CSS selector (e.g. <tt>div.some-class</tt> or
* only be one root level element that matches the selector for each record.
*/
-<span id='Ext-view.AbstractView-cfg-itemCls'> /**
+<span id='Ext-view-AbstractView-cfg-itemCls'> /**
</span> * @cfg {String} itemCls
* Specifies the class to be assigned to each element in the view when used in conjunction with the
* {@link #itemTpl} configuration.
*/
itemCls: Ext.baseCSSPrefix + 'dataview-item',
-<span id='Ext-view.AbstractView-cfg-itemTpl'> /**
+<span id='Ext-view-AbstractView-cfg-itemTpl'> /**
</span> * @cfg {String/Array/Ext.XTemplate} itemTpl
* The inner portion of the item template to be rendered. Follows an XTemplate
* structure and will be placed inside of a tpl.
*/
-<span id='Ext-view.AbstractView-cfg-overItemCls'> /**
+<span id='Ext-view-AbstractView-cfg-overItemCls'> /**
</span> * @cfg {String} overItemCls
* A CSS class to apply to each item in the view on mouseover (defaults to undefined).
* Ensure {@link #trackOver} is set to `true` to make use of this.
*/
-<span id='Ext-view.AbstractView-cfg-loadingText'> /**
+<span id='Ext-view-AbstractView-cfg-loadingText'> /**
</span> * @cfg {String} loadingText
* A string to display during data load operations (defaults to undefined). If specified, this text will be
* displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's
*/
loadingText: 'Loading...',
-<span id='Ext-view.AbstractView-cfg-loadingCls'> /**
+<span id='Ext-view-AbstractView-cfg-loadingCls'> /**
</span> * @cfg {String} loadingCls
* The CSS class to apply to the loading message element (defaults to Ext.LoadMask.prototype.msgCls "x-mask-loading")
*/
-<span id='Ext-view.AbstractView-cfg-loadingUseMsg'> /**
+<span id='Ext-view-AbstractView-cfg-loadingUseMsg'> /**
</span> * @cfg {Boolean} loadingUseMsg
* Whether or not to use the loading message.
* @private
loadingUseMsg: true,
-<span id='Ext-view.AbstractView-cfg-loadingHeight'> /**
+<span id='Ext-view-AbstractView-cfg-loadingHeight'> /**
</span> * @cfg {Number} loadingHeight
* If specified, gives an explicit height for the data view when it is showing the {@link #loadingText},
* if that is specified. This is useful to prevent the view's height from collapsing to zero when the
* loading mask is applied and there are no other contents in the data view. Defaults to undefined.
*/
-<span id='Ext-view.AbstractView-cfg-selectedItemCls'> /**
+<span id='Ext-view-AbstractView-cfg-selectedItemCls'> /**
</span> * @cfg {String} selectedItemCls
* A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
*/
selectedItemCls: Ext.baseCSSPrefix + 'item-selected',
-<span id='Ext-view.AbstractView-cfg-emptyText'> /**
+<span id='Ext-view-AbstractView-cfg-emptyText'> /**
</span> * @cfg {String} emptyText
* The text to display in the view when there is no data to display (defaults to '').
* Note that when using local data the emptyText will not be displayed unless you set
*/
emptyText: "",
-<span id='Ext-view.AbstractView-cfg-deferEmptyText'> /**
+<span id='Ext-view-AbstractView-cfg-deferEmptyText'> /**
</span> * @cfg {Boolean} deferEmptyText True to defer emptyText being applied until the store's first load
*/
deferEmptyText: true,
-<span id='Ext-view.AbstractView-cfg-trackOver'> /**
+<span id='Ext-view-AbstractView-cfg-trackOver'> /**
</span> * @cfg {Boolean} trackOver True to enable mouseenter and mouseleave events
*/
trackOver: false,
-<span id='Ext-view.AbstractView-cfg-blockRefresh'> /**
+<span id='Ext-view-AbstractView-cfg-blockRefresh'> /**
</span> * @cfg {Boolean} blockRefresh Set this to true to ignore datachanged events on the bound store. This is useful if
* you wish to provide custom transition animations via a plugin (defaults to false)
*/
blockRefresh: false,
-<span id='Ext-view.AbstractView-cfg-disableSelection'> /**
+<span id='Ext-view-AbstractView-cfg-disableSelection'> /**
</span> * @cfg {Boolean} disableSelection <p><tt>true</tt> to disable selection within the DataView. Defaults to <tt>false</tt>.
* This configuration will lock the selection model that the DataView uses.</p>
*/
//</debug>
me.addEvents(
-<span id='Ext-view.AbstractView-event-beforerefresh'> /**
+<span id='Ext-view-AbstractView-event-beforerefresh'> /**
</span> * @event beforerefresh
* Fires before the view is refreshed
* @param {Ext.view.View} this The DataView object
*/
'beforerefresh',
-<span id='Ext-view.AbstractView-event-refresh'> /**
+<span id='Ext-view-AbstractView-event-refresh'> /**
</span> * @event refresh
* Fires when the view is refreshed
* @param {Ext.view.View} this The DataView object
*/
'refresh',
-<span id='Ext-view.AbstractView-event-itemupdate'> /**
+<span id='Ext-view-AbstractView-event-itemupdate'> /**
</span> * @event itemupdate
* Fires when the node associated with an individual record is updated
* @param {Ext.data.Model} record The model instance
* @param {HTMLElement} node The node that has just been updated
*/
'itemupdate',
-<span id='Ext-view.AbstractView-event-itemadd'> /**
+<span id='Ext-view-AbstractView-event-itemadd'> /**
</span> * @event itemadd
* Fires when the nodes associated with an recordset have been added to the underlying store
* @param {Array[Ext.data.Model]} records The model instance
* @param {Array[HTMLElement]} node The node that has just been updated
*/
'itemadd',
-<span id='Ext-view.AbstractView-event-itemremove'> /**
+<span id='Ext-view-AbstractView-event-itemremove'> /**
</span> * @event itemremove
* Fires when the node associated with an individual record is removed
* @param {Ext.data.Model} record The model instance
return me.selModel;
},
-<span id='Ext-view.AbstractView-method-refresh'> /**
+<span id='Ext-view-AbstractView-method-refresh'> /**
</span> * Refreshes the view by reloading the data from the store and re-rendering the template.
*/
refresh: function() {
me.fireEvent('refresh', me);
},
-<span id='Ext-view.AbstractView-method-prepareData'> /**
+<span id='Ext-view-AbstractView-method-prepareData'> /**
</span> * Function which can be overridden to provide custom formatting for each Record that is used by this
* DataView's {@link #tpl template} to render each node.
* @param {Array/Object} data The raw data object that was used to create the Record.
return data;
},
-<span id='Ext-view.AbstractView-method-collectData'> /**
+<span id='Ext-view-AbstractView-method-collectData'> /**
</span> * <p>Function which can be overridden which returns the data object passed to this
* DataView's {@link #tpl template} to render the whole DataView.</p>
* <p>This is usually an Array of data objects, each element of which is processed by an
this.all.removeElement(index, true);
},
-<span id='Ext-view.AbstractView-method-refreshNode'> /**
+<span id='Ext-view-AbstractView-method-refreshNode'> /**
</span> * Refreshes an individual node's data from the store.
* @param {Number} index The item's data index in the store
*/
}
},
-<span id='Ext-view.AbstractView-method-getStore'> /**
+<span id='Ext-view-AbstractView-method-getStore'> /**
</span> * Returns the store associated with this DataView.
* @return {Ext.data.Store} The store
*/
return this.store;
},
-<span id='Ext-view.AbstractView-method-bindStore'> /**
+<span id='Ext-view-AbstractView-method-bindStore'> /**
</span> * Changes the data store bound to this view and refreshes it.
* @param {Store} store The store to bind to this view
*/
}
},
-<span id='Ext-view.AbstractView-method-onDataChanged'> /**
+<span id='Ext-view-AbstractView-method-onDataChanged'> /**
</span> * @private
* Calls this.refresh if this.blockRefresh is not true
*/
}
},
-<span id='Ext-view.AbstractView-method-findItemByChild'> /**
+<span id='Ext-view-AbstractView-method-findItemByChild'> /**
</span> * Returns the template node the passed child belongs to, or null if it doesn't belong to one.
* @param {HTMLElement} node
* @return {HTMLElement} The template node
return Ext.fly(node).findParent(this.getItemSelector(), this.getTargetEl());
},
-<span id='Ext-view.AbstractView-method-findTargetByEvent'> /**
+<span id='Ext-view-AbstractView-method-findTargetByEvent'> /**
</span> * Returns the template node by the Ext.EventObject or null if it is not found.
* @param {Ext.EventObject} e
*/
},
-<span id='Ext-view.AbstractView-method-getSelectedNodes'> /**
+<span id='Ext-view-AbstractView-method-getSelectedNodes'> /**
</span> * Gets the currently selected nodes.
* @return {Array} An array of HTMLElements
*/
return nodes;
},
-<span id='Ext-view.AbstractView-method-getRecords'> /**
+<span id='Ext-view-AbstractView-method-getRecords'> /**
</span> * Gets an array of the records from an array of nodes
* @param {Array} nodes The nodes to evaluate
* @return {Array} records The {@link Ext.data.Model} objects
return records;
},
-<span id='Ext-view.AbstractView-method-getRecord'> /**
+<span id='Ext-view-AbstractView-method-getRecord'> /**
</span> * Gets a record from a node
* @param {Element/HTMLElement} node The node to evaluate
*
},
-<span id='Ext-view.AbstractView-method-isSelected'> /**
+<span id='Ext-view-AbstractView-method-isSelected'> /**
</span> * Returns true if the passed node is selected, else false.
* @param {HTMLElement/Number/Ext.data.Model} node The node, node index or record to check
* @return {Boolean} True if selected, else false
return this.selModel.isSelected(r);
},
-<span id='Ext-view.AbstractView-method-select'> /**
+<span id='Ext-view-AbstractView-method-select'> /**
</span> * Selects a record instance by record instance or index.
* @param {Ext.data.Model/Index} records An array of records or an index
* @param {Boolean} keepExisting
this.selModel.select(records, keepExisting, suppressEvent);
},
-<span id='Ext-view.AbstractView-method-deselect'> /**
+<span id='Ext-view-AbstractView-method-deselect'> /**
</span> * Deselects a record instance by record instance or index.
* @param {Ext.data.Model/Index} records An array of records or an index
* @param {Boolean} suppressEvent Set to false to not fire a deselect event
this.selModel.deselect(records, suppressEvent);
},
-<span id='Ext-view.AbstractView-method-getNode'> /**
+<span id='Ext-view-AbstractView-method-getNode'> /**
</span> * Gets a template node.
* @param {HTMLElement/String/Number/Ext.data.Model} nodeInfo An HTMLElement template node, index of a template node,
* the id of a template node or the record associated with the node.
return nodeInfo;
},
-<span id='Ext-view.AbstractView-method-getNodeByRecord'> /**
+<span id='Ext-view-AbstractView-method-getNodeByRecord'> /**
</span> * @private
*/
getNodeByRecord: function(record) {
return null;
},
-<span id='Ext-view.AbstractView-method-getNodes'> /**
+<span id='Ext-view-AbstractView-method-getNodes'> /**
</span> * Gets a range nodes.
* @param {Number} start (optional) The index of the first node in the range
* @param {Number} end (optional) The index of the last node in the range
return nodes;
},
-<span id='Ext-view.AbstractView-method-indexOf'> /**
+<span id='Ext-view-AbstractView-method-indexOf'> /**
</span> * Finds the index of the passed node.
* @param {HTMLElement/String/Number/Record} nodeInfo An HTMLElement template node, index of a template node, the id of a template node
* or a record associated with a node.
// between HTMLElement/Nodes to records and vice versa.
Ext.deprecate('extjs', '4.0', function() {
Ext.view.AbstractView.override({
-<span id='Ext-view.AbstractView-cfg-multiSelect'> /**
+<span id='Ext-view-AbstractView-cfg-multiSelect'> /**
</span> * @cfg {Boolean} multiSelect
* True to allow selection of more than one item at a time, false to allow selection of only a single item
* at a time or no selection at all, depending on the value of {@link #singleSelect} (defaults to false).
*/
-<span id='Ext-view.AbstractView-cfg-singleSelect'> /**
+<span id='Ext-view-AbstractView-cfg-singleSelect'> /**
</span> * @cfg {Boolean} singleSelect
* True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false).
* Note that if {@link #multiSelect} = true, this value will be ignored.
*/
-<span id='Ext-view.AbstractView-cfg-simpleSelect'> /**
+<span id='Ext-view-AbstractView-cfg-simpleSelect'> /**
</span> * @cfg {Boolean} simpleSelect
* True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl,
* false to force the user to hold Ctrl or Shift to select more than on item (defaults to false).
*/
-<span id='Ext-view.AbstractView-method-getSelectionCount'> /**
+<span id='Ext-view-AbstractView-method-getSelectionCount'> /**
</span> * Gets the number of selected nodes.
* @return {Number} The node count
*/
getSelectionCount : function(){
- console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel");
+ if (Ext.global.console) {
+ Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel");
+ }
return this.selModel.getSelection().length;
},
-<span id='Ext-view.AbstractView-method-getSelectedRecords'> /**
+<span id='Ext-view-AbstractView-method-getSelectedRecords'> /**
</span> * Gets an array of the selected records
* @return {Array} An array of {@link Ext.data.Model} objects
*/
getSelectedRecords : function(){
- console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel");
+ if (Ext.global.console) {
+ Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel");
+ }
return this.selModel.getSelection();
},
select: function(records, keepExisting, supressEvents) {
- console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()");
+ if (Ext.global.console) {
+ Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()");
+ }
var sm = this.getSelectionModel();
return sm.select.apply(sm, arguments);
},
clearSelections: function() {
- console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()");
+ if (Ext.global.console) {
+ Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()");
+ }
var sm = this.getSelectionModel();
return sm.deselectAll();
}
});
});
});
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>