drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ku...@apache.org
Subject [drill] 01/02: DRILL-6611 to enable meta-enter query submission in web query interface
Date Mon, 05 Nov 2018 18:30:55 GMT
This is an automated email from the ASF dual-hosted git repository.

kunal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git

commit 22075a4cc90183e28aba8eff86446b19f06dabd5
Author: boB Rudis <bob@rud.is>
AuthorDate: Mon Jul 23 08:16:45 2018 -0400

    DRILL-6611 to enable meta-enter query submission in web query interface
---
 exec/java-exec/src/main/resources/rest/query/query.ftl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/exec/java-exec/src/main/resources/rest/query/query.ftl b/exec/java-exec/src/main/resources/rest/query/query.ftl
index f96d639..4040deb 100644
--- a/exec/java-exec/src/main/resources/rest/query/query.ftl
+++ b/exec/java-exec/src/main/resources/rest/query/query.ftl
@@ -111,6 +111,12 @@
       enableBasicAutocompletion: true,
       enableLiveAutocompletion: false
     });
+    // meta-enter to submit query
+    document.getElementById('queryForm')
+            .addEventListener('keydown', function(e) {
+      if (!(e.keyCode == 13 && e.metaKey)) return;
+      if (e.target.form) e.target.form.submit();
+    });
   </script>
 
 </#macro>


Mime
View raw message