Roo/form/ComboCheck.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 2 Sep 2011 05:36:30 +0000 (13:36 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 2 Sep 2011 05:36:30 +0000 (13:36 +0800)
Roo/form/ComboCheck.js

index 4127da9..5474997 100644 (file)
@@ -70,14 +70,7 @@ Roo.extend(Roo.form.ComboCheck, Roo.form.ComboBox, {
     onViewOver : function(e, t){
         // do nothing...
         return;
-        if(this.inKeyMode){ // prevent key nav and mouse over conflicts
-            return;
-        }
-        var item = this.view.findItemFromChild(t);
-        if(item){
-            var index = this.view.indexOf(item);
-            this.select(index, false);
-        }
+        
     },
     
     onViewClick : function(doFocus,index){
@@ -86,7 +79,11 @@ Roo.extend(Roo.form.ComboCheck, Roo.form.ComboBox, {
             return;
         }
         
-        this.view.select(index, false);
+        if (this.view.isSelected(index)) {
+            this.view.unselect(index);
+            return;
+        }
+        this.view.select(index, true);
         
         return;
         var index = this.view.getSelectedIndexes()[0];