浏览代码

[notebook] Use the assistHelper from the binding params of the ace editor binding

Johan Ahlen 10 年之前
父节点
当前提交
3659c1f
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 4 - 4
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1746,15 +1746,15 @@ ko.bindingHandlers.aceEditor = {
 
     var refreshTables = function() {
       currentAssistTables = {};
-      if (typeof self.assistHelper.activeDatabase() != undefined && self.assistHelper.activeDatabase() != null) {
-        self.assistHelper.fetchTables(function(data) {
+      if (typeof assistHelper.activeDatabase() != undefined && assistHelper.activeDatabase() != null) {
+        assistHelper.fetchTables(function(data) {
           $.each(data.tables, function(index, table) {
             currentAssistTables[table] = true;
           });
         })
       }
     };
-    self.assistHelper.activeDatabase.subscribe(refreshTables);
+    assistHelper.activeDatabase.subscribe(refreshTables);
     refreshTables();
 
     ace.define("huelink", [], function (require, exports, module) {
@@ -1901,7 +1901,7 @@ ko.bindingHandlers.aceEditor = {
         window.open("/filebrowser/#" + token.value.replace(/\"/gi, ""));
       }
       else {
-        window.open("/metastore/table/" + self.assistHelper.activeDatabase() + "/" + token.value);
+        window.open("/metastore/table/" + assistHelper.activeDatabase() + "/" + token.value);
       }
     });