- this.calcRowsPerPage();\r
- }\r
- },\r
-\r
- onSelect : function(record, index, skipCollapse){\r
- if(this.fireEvent('beforeselect', this, record, index) !== false){\r
- this.setValue(record.data[this.valueField || this.displayField]);\r
- if( !skipCollapse ) {\r
- this.collapse();\r
- }\r
- this.lastSelectedIndex = index + 1;\r
- this.fireEvent('select', this, record, index);\r
- }\r
- },\r
-\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
- this.innerList.unselectable();\r
- this.trigger.unselectable();\r
- this.innerList.on('mouseup', function(e, target, options) {\r
- if( target.id && target.id == this.innerList.id ) {\r
- return;\r
- }\r
- this.onViewClick();\r
- }, this);\r
-\r
- this.innerList.on('mouseover', function(e, target, options) {\r
- if( target.id && target.id == this.innerList.id ) {\r
- return;\r
- }\r
- this.lastSelectedIndex = this.view.getSelectedIndexes()[0] + 1;\r
- this.cshTask.delay(this.searchResetDelay);\r
- }, this);\r
-\r
- this.trigger.un('click', this.onTriggerClick, this);\r
- this.trigger.on('mousedown', function(e, target, options) {\r
- e.preventDefault();\r
- this.onTriggerClick();\r
- }, this);\r
-\r
- this.on('collapse', function(e, target, options) {\r
- Ext.getDoc().un('mouseup', this.collapseIf, this);\r
- }, this, true);\r
-\r
- this.on('expand', function(e, target, options) {\r
- Ext.getDoc().on('mouseup', this.collapseIf, this);\r
- }, this, true);\r
- },\r
-\r
- clearSearchHistory : function() {\r
- this.lastSelectedIndex = 0;\r
- this.lastSearchTerm = false;\r
- },\r
-\r
- selectFirst : function() {\r
- this.focusAndSelect(this.store.data.first());\r
- },\r
-\r
- selectLast : function() {\r
- this.focusAndSelect(this.store.data.last());\r
- },\r
-\r
- selectPrevPage : function() {\r
- if( !this.rowHeight ) {\r
- return;\r
- }\r
- var index = Math.max(this.selectedIndex-this.rowsPerPage, 0);\r
- this.focusAndSelect(this.store.getAt(index));\r
- },\r
-\r
- selectNextPage : function() {\r
- if( !this.rowHeight ) {\r
- return;\r
- }\r
- var index = Math.min(this.selectedIndex+this.rowsPerPage, this.store.getCount() - 1);\r
- this.focusAndSelect(this.store.getAt(index));\r
- },\r
-\r
- search : function(field, value, startIndex) {\r
- field = field || this.displayField;\r
- this.lastSearchTerm = value;\r
- var index = this.store.find.apply(this.store, arguments);\r
- if( index !== -1 ) {\r
- this.focusAndSelect(index);\r
- }\r
- },\r
-\r
- focusAndSelect : function(record) {\r
+ this.calcRowsPerPage();\r
+ }\r
+ },\r
+\r
+ onSelect : function(record, index, skipCollapse){\r
+ if(this.fireEvent('beforeselect', this, record, index) !== false){\r
+ this.setValue(record.data[this.valueField || this.displayField]);\r
+ if( !skipCollapse ) {\r
+ this.collapse();\r
+ }\r
+ this.lastSelectedIndex = index + 1;\r
+ this.fireEvent('select', this, record, index);\r
+ }\r
+ },\r
+\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
+ this.innerList.unselectable();\r
+ this.trigger.unselectable();\r
+ this.innerList.on('mouseup', function(e, target, options) {\r
+ if( target.id && target.id == this.innerList.id ) {\r
+ return;\r
+ }\r
+ this.onViewClick();\r
+ }, this);\r
+\r
+ this.innerList.on('mouseover', function(e, target, options) {\r
+ if( target.id && target.id == this.innerList.id ) {\r
+ return;\r
+ }\r
+ this.lastSelectedIndex = this.view.getSelectedIndexes()[0] + 1;\r
+ this.cshTask.delay(this.searchResetDelay);\r
+ }, this);\r
+\r
+ this.trigger.un('click', this.onTriggerClick, this);\r
+ this.trigger.on('mousedown', function(e, target, options) {\r
+ e.preventDefault();\r
+ this.onTriggerClick();\r
+ }, this);\r
+\r
+ this.on('collapse', function(e, target, options) {\r
+ Ext.getDoc().un('mouseup', this.collapseIf, this);\r
+ }, this, true);\r
+\r
+ this.on('expand', function(e, target, options) {\r
+ Ext.getDoc().on('mouseup', this.collapseIf, this);\r
+ }, this, true);\r
+ },\r
+\r
+ clearSearchHistory : function() {\r
+ this.lastSelectedIndex = 0;\r
+ this.lastSearchTerm = false;\r
+ },\r
+\r
+ selectFirst : function() {\r
+ this.focusAndSelect(this.store.data.first());\r
+ },\r
+\r
+ selectLast : function() {\r
+ this.focusAndSelect(this.store.data.last());\r
+ },\r
+\r
+ selectPrevPage : function() {\r
+ if( !this.rowHeight ) {\r
+ return;\r
+ }\r
+ var index = Math.max(this.selectedIndex-this.rowsPerPage, 0);\r
+ this.focusAndSelect(this.store.getAt(index));\r
+ },\r
+\r
+ selectNextPage : function() {\r
+ if( !this.rowHeight ) {\r
+ return;\r
+ }\r
+ var index = Math.min(this.selectedIndex+this.rowsPerPage, this.store.getCount() - 1);\r
+ this.focusAndSelect(this.store.getAt(index));\r
+ },\r
+\r
+ search : function(field, value, startIndex) {\r
+ field = field || this.displayField;\r
+ this.lastSearchTerm = value;\r
+ var index = this.store.find.apply(this.store, arguments);\r
+ if( index !== -1 ) {\r
+ this.focusAndSelect(index);\r
+ }\r
+ },\r
+\r
+ focusAndSelect : function(record) {\r