X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/docs/source/AbstractView.html diff --git a/docs/source/AbstractView.html b/docs/source/AbstractView.html index 4ebd8f74..06c9553f 100644 --- a/docs/source/AbstractView.html +++ b/docs/source/AbstractView.html @@ -1,4 +1,21 @@ -Sencha Documentation Project
/**
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
  * @class Ext.view.AbstractView
  * @extends Ext.Component
  * This is an abstract superclass and should not be used directly. Please see {@link Ext.view.View}.
@@ -24,19 +41,19 @@ Ext.define('Ext.view.AbstractView', {
         }
     },
     
-    /**
+    /**
      * @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}.
      */
-    /**
+    /**
      * @cfg {Ext.data.Store} store
      * @required
      * The {@link Ext.data.Store} to bind this DataView to.
      */
 
-    /**
+    /**
      * @cfg {String} itemSelector
      * @required
      * <b>This is a required setting</b>. A simple CSS selector (e.g. <tt>div.some-class</tt> or
@@ -45,26 +62,26 @@ Ext.define('Ext.view.AbstractView', {
      * only be one root level element that matches the selector for each record.
      */
     
-    /**
+    /**
      * @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',
     
-    /**
+    /**
      * @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.
      */
 
-    /**
+    /**
      * @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.
      */
 
-    /**
+    /**
      * @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
@@ -72,12 +89,12 @@ Ext.define('Ext.view.AbstractView', {
      */
     loadingText: 'Loading...',
     
-    /**
+    /**
      * @cfg {String} loadingCls
      * The CSS class to apply to the loading message element (defaults to Ext.LoadMask.prototype.msgCls "x-mask-loading")
      */
     
-    /**
+    /**
      * @cfg {Boolean} loadingUseMsg
      * Whether or not to use the loading message.
      * @private
@@ -85,20 +102,20 @@ Ext.define('Ext.view.AbstractView', {
     loadingUseMsg: true,
     
 
-    /**
+    /**
      * @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.
      */
 
-    /**
+    /**
      * @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',
 
-    /**
+    /**
      * @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
@@ -106,23 +123,23 @@ Ext.define('Ext.view.AbstractView', {
      */
     emptyText: "",
 
-    /**
+    /**
      * @cfg {Boolean} deferEmptyText True to defer emptyText being applied until the store's first load
      */
     deferEmptyText: true,
 
-    /**
+    /**
      * @cfg {Boolean} trackOver True to enable mouseenter and mouseleave events
      */
     trackOver: false,
 
-    /**
+    /**
      * @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,
 
-    /**
+    /**
      * @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>
      */
@@ -206,19 +223,19 @@ Ext.define('Ext.view.AbstractView', {
         //</debug>
         
         me.addEvents(
-            /**
+            /**
              * @event beforerefresh
              * Fires before the view is refreshed
              * @param {Ext.view.View} this The DataView object
              */
             'beforerefresh',
-            /**
+            /**
              * @event refresh
              * Fires when the view is refreshed
              * @param {Ext.view.View} this The DataView object
              */
             'refresh',
-            /**
+            /**
              * @event itemupdate
              * Fires when the node associated with an individual record is updated
              * @param {Ext.data.Model} record The model instance
@@ -226,7 +243,7 @@ Ext.define('Ext.view.AbstractView', {
              * @param {HTMLElement} node The node that has just been updated
              */
             'itemupdate',
-            /**
+            /**
              * @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
@@ -234,7 +251,7 @@ Ext.define('Ext.view.AbstractView', {
              * @param {Array[HTMLElement]} node The node that has just been updated
              */
             'itemadd',
-            /**
+            /**
              * @event itemremove
              * Fires when the node associated with an individual record is removed
              * @param {Ext.data.Model} record The model instance
@@ -325,7 +342,7 @@ Ext.define('Ext.view.AbstractView', {
         return me.selModel;
     },
 
-    /**
+    /**
      * Refreshes the view by reloading the data from the store and re-rendering the template.
      */
     refresh: function() {
@@ -358,7 +375,7 @@ Ext.define('Ext.view.AbstractView', {
         me.fireEvent('refresh', me);
     },
 
-    /**
+    /**
      * 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.
@@ -374,7 +391,7 @@ Ext.define('Ext.view.AbstractView', {
         return data;
     },
     
-    /**
+    /**
      * <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
@@ -473,7 +490,7 @@ Ext.define('Ext.view.AbstractView', {
         this.all.removeElement(index, true);
     },
 
-    /**
+    /**
      * Refreshes an individual node's data from the store.
      * @param {Number} index The item's data index in the store
      */
@@ -496,7 +513,7 @@ Ext.define('Ext.view.AbstractView', {
         }
     },
 
-    /**
+    /**
      * Returns the store associated with this DataView.
      * @return {Ext.data.Store} The store
      */
@@ -504,7 +521,7 @@ Ext.define('Ext.view.AbstractView', {
         return this.store;
     },
 
-    /**
+    /**
      * Changes the data store bound to this view and refreshes it.
      * @param {Store} store The store to bind to this view
      */
@@ -556,7 +573,7 @@ Ext.define('Ext.view.AbstractView', {
         }
     },
 
-    /**
+    /**
      * @private
      * Calls this.refresh if this.blockRefresh is not true
      */
@@ -566,7 +583,7 @@ Ext.define('Ext.view.AbstractView', {
         }
     },
 
-    /**
+    /**
      * 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
@@ -575,7 +592,7 @@ Ext.define('Ext.view.AbstractView', {
         return Ext.fly(node).findParent(this.getItemSelector(), this.getTargetEl());
     },
     
-    /**
+    /**
      * Returns the template node by the Ext.EventObject or null if it is not found.
      * @param {Ext.EventObject} e
      */
@@ -584,7 +601,7 @@ Ext.define('Ext.view.AbstractView', {
     },
 
 
-    /**
+    /**
      * Gets the currently selected nodes.
      * @return {Array} An array of HTMLElements
      */
@@ -601,7 +618,7 @@ Ext.define('Ext.view.AbstractView', {
         return nodes;
     },
 
-    /**
+    /**
      * 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
@@ -619,7 +636,7 @@ Ext.define('Ext.view.AbstractView', {
         return records;
     },
 
-    /**
+    /**
      * Gets a record from a node
      * @param {Element/HTMLElement} node The node to evaluate
      * 
@@ -630,7 +647,7 @@ Ext.define('Ext.view.AbstractView', {
     },
     
 
-    /**
+    /**
      * 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
@@ -641,7 +658,7 @@ Ext.define('Ext.view.AbstractView', {
         return this.selModel.isSelected(r);
     },
     
-    /**
+    /**
      * 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
@@ -651,7 +668,7 @@ Ext.define('Ext.view.AbstractView', {
         this.selModel.select(records, keepExisting, suppressEvent);
     },
 
-    /**
+    /**
      * 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
@@ -660,7 +677,7 @@ Ext.define('Ext.view.AbstractView', {
         this.selModel.deselect(records, suppressEvent);
     },
 
-    /**
+    /**
      * 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.
@@ -677,7 +694,7 @@ Ext.define('Ext.view.AbstractView', {
         return nodeInfo;
     },
     
-    /**
+    /**
      * @private
      */
     getNodeByRecord: function(record) {
@@ -694,7 +711,7 @@ Ext.define('Ext.view.AbstractView', {
         return null;
     },
     
-    /**
+    /**
      * 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
@@ -719,7 +736,7 @@ Ext.define('Ext.view.AbstractView', {
         return nodes;
     },
 
-    /**
+    /**
      * 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.
@@ -764,52 +781,62 @@ Ext.define('Ext.view.AbstractView', {
     // between HTMLElement/Nodes to records and vice versa.
     Ext.deprecate('extjs', '4.0', function() {
         Ext.view.AbstractView.override({
-            /**
+            /**
              * @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).
              */
-            /**
+            /**
              * @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.
              */
-            /**
+            /**
              * @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).
              */
             
-            /**
+            /**
              * 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;
             },
         
-            /**
+            /**
              * 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();
             }
         });    
     });
 });
-
\ No newline at end of file +
+ +