浏览代码

HUE-4709 [editor] Search does not load cells when navigating

Enrico Berti 9 年之前
父节点
当前提交
343ede3

+ 2 - 2
desktop/core/src/desktop/static/desktop/css/hue3.css

@@ -1011,7 +1011,7 @@ div.box {
 }
 
 .table tr.locked, .table tr.locked td {
-  background-color: #fcf8e3!important;
+  background-color: #FFFACC!important;
 }
 
 div.locked {
@@ -1196,7 +1196,7 @@ a#advanced-btn:hover {
 }
 
 .columnSelected {
-  background-color: #EEEEEE !important;
+  background-color: #FFFACC !important;
 }
 
 .cellSelected {

+ 8 - 5
desktop/core/src/desktop/static/desktop/js/jquery.huedatatable.js

@@ -206,12 +206,11 @@
       try {
         $t.parents($t.data('oInit')['scrollable']).animate({
           scrollTop: $t.find('tbody tr').find('td:eq(0)').filter(function () {
-            return $(this).text() == row
+            return $(this).text() - 1 == row
           }).position().top + 73
         });
       }
-      catch (e) {
-      }
+      catch (e) {}
 
       colSel = $t.find("tr td:nth-child(" + (col + 1) + ")");
       $t.data('scrollToCol', col);
@@ -308,11 +307,15 @@
 
           if ($t.data('scrollToCol')) {
             var colSel = $t.find("tr th:nth-child(" + ($t.data('scrollToCol') + 1) + ")");
-            colSel = $t.find("tr td:nth-child(" + ($t.data('scrollToCol') + 1) + ")");
+            if ($t.find("tr td:nth-child(" + ($t.data('scrollToCol') + 1) + ")").length > 0){
+              colSel = $t.find("tr td:nth-child(" + ($t.data('scrollToCol') + 1) + ")");
+            }
             if ($t.data('scrollAnimate')) {
               $t.parent().animate({
                 scrollLeft: colSel.position().left + $t.parent().scrollLeft() - $t.parent().offset().left - 30
-              }, 300);
+              }, 300, function () {
+                $t.parent().trigger('scroll');
+              });
               $t.data('scrollAnimate', null);
             }
             if ($t.data('scrollToRow') == null) {