This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 619a499  DRILL-6979: Added autofocus attribute to username on login 
page, and to query textbox on Query tab
619a499 is described below

commit 619a49943ba33e4ad1ba2dc754c65cfa2708e936
Author: Khurram <[email protected]>
AuthorDate: Tue Jan 15 19:56:52 2019 +0000

    DRILL-6979: Added autofocus attribute to username on login page, and to 
query textbox on Query tab
---
 exec/java-exec/src/main/resources/rest/login.ftl       | 2 +-
 exec/java-exec/src/main/resources/rest/query/query.ftl | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec/java-exec/src/main/resources/rest/login.ftl 
b/exec/java-exec/src/main/resources/rest/login.ftl
index 19cd12b..1ef0f52 100644
--- a/exec/java-exec/src/main/resources/rest/login.ftl
+++ b/exec/java-exec/src/main/resources/rest/login.ftl
@@ -32,7 +32,7 @@
             <p style="color:red">${model}</p></br>
           </#if>
           <h4>Log In to Drill Web Console</h4></br>
-          <p><input type="text" size="30" name="j_username" 
placeholder="Username"></p>
+          <p><input type="text" size="30" name="j_username" 
placeholder="Username" autofocus></p>
           <p><input type="password" size="30" name="j_password" 
placeholder="Password"></p>
           <p><button type="submit" class="btn btn-default">Log In</button> </p>
         </div>
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 c1a4734..c4d321c 100644
--- a/exec/java-exec/src/main/resources/rest/query/query.ftl
+++ b/exec/java-exec/src/main/resources/rest/query/query.ftl
@@ -76,7 +76,7 @@
       <div style="display: inline-block"><label for="query">Query</label></div>
       <div style="display: inline-block; float:right; 
padding-right:5%"><b>Hint: </b>Use <div id="keyboardHint" 
style="display:inline-block; font-style:italic"></div> to submit</div>
       <div id="query-editor-format"></div>
-      <input class="form-control" type="hidden" id="query" name="query"/>
+      <input class="form-control" type="hidden" id="query" name="query" 
autofocus/>
     </div>
 
     <button class="btn btn-default" type="button" onclick="<#if 
model.isOnlyImpersonationEnabled()>doSubmitQueryWithUserName()<#else>doSubmitQueryWithAutoLimit()</#if>">
@@ -104,6 +104,7 @@
     editor.getSession().setUseSoftTabs(true);
     editor.setTheme("ace/theme/sqlserver");
     editor.$blockScrolling = "Infinity";
+    editor.focus();
     //CSS Formatting
     document.getElementById('query-editor-format').style.fontSize='13px';
     
document.getElementById('query-editor-format').style.fontFamily='courier,monospace';

Reply via email to