Răsfoiți Sursa

[beeswax] Smarted magic table autocomplete

Enrico Berti 12 ani în urmă
părinte
comite
be06349f1b

+ 5 - 1
desktop/core/static/js/codemirror-hql-hint.js

@@ -95,7 +95,11 @@
     }
 
     function maybeAddToExtra(str) {
-      if (str.indexOf(start) == 0 && !arrayContains(found, str)) extraFound.push(str);
+      var _match = str;
+      if (_match.indexOf("icon-magic") > -1) {
+        _match = _match.substring(32);
+      }
+      if (_match.indexOf(start) == 0 && !arrayContains(found, str)) extraFound.push(str);
     }
 
     function gatherCompletions(obj) {

+ 5 - 1
desktop/core/static/js/codemirror-isql-hint.js

@@ -95,7 +95,11 @@
     }
 
     function maybeAddToExtra(str) {
-      if (str.indexOf(start) == 0 && !arrayContains(found, str)) extraFound.push(str);
+      var _match = str;
+      if (_match.indexOf("icon-magic") > -1) {
+        _match = _match.substring(32);
+      }
+      if (_match.indexOf(start) == 0 && !arrayContains(found, str)) extraFound.push(str);
     }
 
     function gatherCompletions(obj) {