Bläddra i källkod

HUE-7152 [editor] Enable execute query shortcut inside a variable input

jdesjean 8 år sedan
förälder
incheckning
2fd7d3ee37
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      desktop/libs/notebook/src/notebook/templates/editor_components.mako

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

@@ -1194,7 +1194,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
     <li>
       <div class="input-prepend margin-top-10">
         <span class="muted add-on" data-bind="text: name"></span>
-        <input class="input-medium" type="text" data-bind="value: value, attr: { placeholder: defaultValue() || '${ _ko('Variable value') }' }, valueUpdate: 'afterkeydown', autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }, event: { 'keypress': function (context, e){ if (e.ctrlKey && e.which === 13) { $parent.ace().commands.commands['execute'].exec(); } return true; } }">
+        <input class="input-medium" type="text" data-bind="value: value, attr: { placeholder: defaultValue() || '${ _ko('Variable value') }' }, valueUpdate: 'afterkeydown', autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }, event: { 'keydown': function (context, e){ if ((e.ctrlKey || e.metaKey) && e.which === 13) { $parent.ace().commands.commands['execute'].exec(); } return true; } }">
       </div>
     </li>
   </ul>