فهرست منبع

HUE-1515 [hbase] Search Navbar no longer stickies in tableview

Added resetElements for table and query view
Fixed trackOnGA problem for disabled tracking
Enrico Berti 12 سال پیش
والد
کامیت
d123e0f
2فایلهای تغییر یافته به همراه6 افزوده شده و 7 حذف شده
  1. 2 0
      apps/hbase/static/js/app.js
  2. 4 7
      apps/hbase/static/js/utils.js

+ 2 - 0
apps/hbase/static/js/app.js

@@ -98,6 +98,7 @@ routie({
       logGA('query_table');
       app.station('table');
       Router.setTable(cluster, table);
+      resetElements();
       Views.render('dataview');
       app.views.tabledata._reloadcfs(function(){
         app.search.cur_input(query);
@@ -110,6 +111,7 @@ routie({
       logGA('view_table');
       Router.setTable(cluster, table);
       resetSearch();
+      resetElements();
       app.station('table');
       Views.render('dataview');
       routed = true;

+ 4 - 7
apps/hbase/static/js/utils.js

@@ -240,15 +240,12 @@ function prepForTransport(value) {
 };
 
 function logGA(postfix) {
-  function doLog() {
-    trackOnGA('hbase/' + postfix);
-  }
-  if(postfix == null)
+  if (postfix == null)
     postfix = "";
   if (typeof trackOnGA == 'function') {
-    doLog();
-  } else {
-    setTimeout(doLog, 10);
+    window.setTimeout(function () {
+      trackOnGA('hbase/' + postfix);
+    }, 10);
   }
 };