Fix wheel scrolling on LiveGrid content
[infodrom/rico3] / minsrc / ricoLiveGrid.js
index 1afb5d6..adabf58 100644 (file)
@@ -811,6 +811,7 @@ Rico.LiveGridMethods = {
             col.lastKeyFilter=v;
           }
           Rico.eventBind(field,'keyup',Rico.eventHandle(col,'filterKeypress'),false);
+          Rico.eventBind(field,'change',Rico.eventHandle(col,'filterKeypress'),false);
           col.filterField=field;\r
           break;\r
         case 'm':
@@ -927,7 +928,9 @@ Rico.LiveGridMethods = {
         for (var i=0; i<rows.length; i++) {
           if (rows[i].length>0) {
             c=rows[i][0];
-            opt=Rico.addSelectOption(col.filterField,c,c || Rico.getPhraseById("filterBlank"));
+           ctrans=c;
+           if (col._getdesc) ctrans = col._getdesc(c);
+           opt=Rico.addSelectOption(col.filterField,c,ctrans || Rico.getPhraseById("filterBlank"));
             if (col.filterType==Rico.ColumnConst.USERFILTER && c==v) opt.selected=true;
           }
         }
@@ -1932,7 +1935,7 @@ Rico.LiveGridMethods = {
      if (this.scrollPluggedIn) return;
      Rico.log("pluginScroll: wheelEvent="+this.wheelEvent);
      Rico.eventBind(this.scrollDiv,"scroll",this.scrollEventFunc, false);
-     for (var t=0; t<2; t++)
+     for (var t=0; t<3; t++)
        Rico.eventBind(this.tabs[t],this.wheelEvent,this.wheelEventFunc, false);
      this.scrollPluggedIn=true;
   },
@@ -1947,7 +1950,7 @@ Rico.LiveGridMethods = {
   },
 
   handleWheel: function(e) {
-    var delta = 0;
+    var delta = 1;
     if (e.wheelDelta) {
       if (Rico.isOpera)
         delta = e.wheelDelta/120;