Set focus on editor when switching to 'SQL Query' view, fixes #28

This commit is contained in:
Dan Sosedoff 2014-10-28 11:28:44 -05:00
parent 9ad0ca9839
commit 5a2acda1a3

View File

@ -174,6 +174,14 @@ function showTableStructure() {
});
}
function showQueryPanel() {
setCurrentTab("table_query");
editor.focus();
$("#input").show();
$("#output").removeClass("full");
}
function runQuery() {
setCurrentTab("table_query");
@ -267,12 +275,7 @@ $(document).ready(function() {
$("#table_structure").on("click", function() { showTableStructure(); });
$("#table_indexes").on("click", function() { showTableIndexes(); });
$("#table_history").on("click", function() { showQueryHistory(); });
$("#table_query").on("click", function() {
setCurrentTab("table_query");
$("#input").show();
$("#output").removeClass("full");
});
$("#table_query").on("click", function() { showQueryPanel(); });
$("#run").on("click", function() {
runQuery();