瀏覽代碼

HUE-4878 [editor] Click to select a row in query result grid is gone

Enrico Berti 9 年之前
父節點
當前提交
1467d54
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      desktop/core/src/desktop/static/desktop/js/jquery.tableextender2.js

+ 4 - 4
desktop/core/src/desktop/static/desktop/js/jquery.tableextender2.js

@@ -168,17 +168,17 @@
         self.$parent.find('.fixed-first-column table tbody tr:eq(' + $(this).index() + ')').addClass('selected');
       }
     };
-    self.$parent.on('click dblclick', 'table tbody tr', clickHandler);
+    self.$parent.children('table').on('click dblclick', 'tbody tr', clickHandler);
     self.disposeFunctions.push(function () {
-      self.$parent.off('click dblclick', 'table tbody tr', clickHandler);
+      self.$parent.children('table').off('click dblclick', 'tbody tr', clickHandler);
     });
 
     var dblClickHandler = function () {
       huePubSub.publish('table.row.dblclick', {idx: $(this).index(), table: $(this).parents('table')});
     };
-    self.$parent.on('dblclick', 'table tbody tr', dblClickHandler);
+    self.$parent.children('table').on('dblclick', 'tbody tr', dblClickHandler);
     self.disposeFunctions.push(function () {
-      self.$parent.off('dblclick', 'table tbody tr', dblClickHandler);
+      self.$parent.children('table').off('dblclick', 'tbody tr', dblClickHandler);
     });