Browse Source

HUE-5815 [editor] Improve tooltip for column expansion

Johan Ahlen 8 years ago
parent
commit
31233f0240

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

@@ -3541,7 +3541,7 @@
                 tooltipTimeout = window.setTimeout(function () {
                   var endCoordinates = editor.renderer.textToScreenCoordinates(pointerPosition.row, token.start);
 
-                  var tooltipText = options.contextTooltip;
+                  var tooltipText = token.parseLocation.type === 'asterisk' ? options.expandStar : options.contextTooltip;
                   if (token.parseLocation.identifierChain) {
                     tooltipText += ' (' + $.map(token.parseLocation.identifierChain, function (identifier) { return identifier.name }).join('.') + ')';
                   } else if (token.parseLocation.function) {

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -1127,7 +1127,7 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
       <div class="ace-editor" data-bind="visible: statementType() === 'text' || statementType() !== 'text' && externalStatementLoaded(), css: {'single-snippet-editor ace-editor-resizable' : $root.editorMode(), 'active-editor': inFocus }, attr: { id: id() }, delayedOverflow, aceEditor: {
         snippet: $data,
         contextTooltip: '${ _ko("Right-click for details") }',
-        expandStar: '${ _ko("Shift + Click to replace with all columns") }',
+        expandStar: '${ _ko("Right-click to expand with columns") }',
         onBlur: saveTemporarySnippet,
         highlightedRange: result.statement_range,
         useNewAutocompleter: $root.useNewAutocompleter,