瀏覽代碼

HUE-7286 [editor] Move sql identifier object to the beginning of the tooltip

Romain Rigaux 8 年之前
父節點
當前提交
77dfec48e5
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

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

@@ -4433,14 +4433,15 @@
                       }
                     }
                     if (token.parseLocation.identifierChain) {
-                      tooltipText += ' - ' + $.map(token.parseLocation.identifierChain, function (identifier) {
+                      var sqlIdentifier = $.map(token.parseLocation.identifierChain, function (identifier) {
                           return identifier.name
                         }).join('.');
                       if (colType) {
-                        tooltipText += ' (' + colType + ')';
+                        sqlIdentifier += ' (' + colType + ')';
                       }
+                      tooltipText = sqlIdentifier + ' - ' + tooltipText;
                     } else if (token.parseLocation.function) {
-                      tooltipText += ' - ' + token.parseLocation.function;
+                      tooltipText = token.parseLocation.function + ' - ' + tooltipText;
                     }
                     contextTooltip.show(tooltipText, endCoordinates.pageX, endCoordinates.pageY + editor.renderer.lineHeight + 3);
                   }