Upgrade to ExtJS 3.1.1 - Released 02/08/2010
[extjs.git] / examples / ux / SelectBox.js
index b8b5ae3..b360846 100644 (file)
@@ -1,6 +1,6 @@
 /*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
+ * Ext JS Library 3.1.1
+ * Copyright(c) 2006-2010 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
  */
@@ -89,6 +89,7 @@ Ext.ux.form.SelectBox = Ext.extend(Ext.form.ComboBox, {
                this.store.on('load', this.calcRowsPerPage, this);\r
                Ext.ux.form.SelectBox.superclass.onRender.apply(this, arguments);\r
                if( this.mode == 'local' ) {\r
+            this.initList();\r
                        this.calcRowsPerPage();\r
                }\r
        },\r
@@ -104,9 +105,9 @@ Ext.ux.form.SelectBox = Ext.extend(Ext.form.ComboBox, {
                }\r
        },\r
 \r
-       render : function(ct) {\r
-               Ext.ux.form.SelectBox.superclass.render.apply(this, arguments);\r
-               if( Ext.isSafari ) {\r
+       afterRender : function() {\r
+               Ext.ux.form.SelectBox.superclass.afterRender.apply(this, arguments);\r
+               if(Ext.isWebKit) {\r
                        this.el.swallowEvent('mousedown', true);\r
                }\r
                this.el.unselectable();\r
@@ -181,9 +182,9 @@ Ext.ux.form.SelectBox = Ext.extend(Ext.form.ComboBox, {
        },\r
 \r
        focusAndSelect : function(record) {\r
-               var index = typeof record === 'number' ? record : this.store.indexOf(record);\r
-               this.select(index, this.isExpanded());\r
-               this.onSelect(this.store.getAt(record), index, this.isExpanded());\r
+        var index = Ext.isNumber(record) ? record : this.store.indexOf(record);\r
+        this.select(index, this.isExpanded());\r
+        this.onSelect(this.store.getAt(index), index, this.isExpanded());\r
        },\r
 \r
        calcRowsPerPage : function() {\r