mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
Set focus on editor when switching to 'SQL Query' view, fixes #28
This commit is contained in:
parent
9ad0ca9839
commit
5a2acda1a3
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user