Browse Source

HUE-1982 [impala] Column scrolling does not support aliases that are similar to the original column name

Needed to do an exact match on the contents of the TH cells.
Abraham Elmahrek 11 years ago
parent
commit
af75a6054f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      apps/beeswax/src/beeswax/templates/execute.mako

+ 4 - 1
apps/beeswax/src/beeswax/templates/execute.mako

@@ -1144,7 +1144,10 @@ $(document).ready(function () {
 
 
   $(document).on("click", ".column-selector", function () {
   $(document).on("click", ".column-selector", function () {
     var _t = $("#resultTable");
     var _t = $("#resultTable");
-    var _col = _t.find("th:contains(" + $.trim($(this).text().split("(")[0]) + ")");
+    var _text = $.trim($(this).text().split("(")[0]);
+    var _col = _t.find("th").filter(function() {
+      return $.trim($(this).text()) == _text;
+    });
     _t.find(".columnSelected").removeClass("columnSelected");
     _t.find(".columnSelected").removeClass("columnSelected");
     _t.find("tr td:nth-child(" + (_col.index() + 1) + ")").addClass("columnSelected");
     _t.find("tr td:nth-child(" + (_col.index() + 1) + ")").addClass("columnSelected");
     $("a[href='#results']").click();
     $("a[href='#results']").click();