mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 03:36:33 +03:00
Move query export buttons to the right, add xml export button
This commit is contained in:
parent
e662e907be
commit
1bc824e39b
File diff suppressed because one or more lines are too long
@ -285,6 +285,10 @@
|
||||
background: #bbb;
|
||||
}
|
||||
|
||||
#input .actions .btn:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
#output {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
|
@ -61,10 +61,12 @@
|
||||
<div class="actions">
|
||||
<input type="button" id="run" value="Run Query" class="btn btn-sm btn-primary" />
|
||||
<input type="button" id="explain" value="Explain Query" class="btn btn-sm btn-default" />
|
||||
<input type="button" id="csv" value="CSV" class="btn btn-sm btn-default" />
|
||||
<input type="button" id="json" value="JSON" class="btn btn-sm btn-default" />
|
||||
|
||||
<div id="query_progress">Please wait, query is executing...</div>
|
||||
<div class="pull-right">
|
||||
<input type="button" id="json" value="JSON" class="btn btn-sm btn-default" />
|
||||
<input type="button" id="csv" value="CSV" class="btn btn-sm btn-default" />
|
||||
<input type="button" id="xml" value="XML" class="btn btn-sm btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -316,13 +316,13 @@ function showActivityPanel() {
|
||||
function runQuery() {
|
||||
setCurrentTab("table_query");
|
||||
|
||||
$("#run, #explain, #csv, #json").prop("disabled", true);
|
||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", true);
|
||||
$("#query_progress").show();
|
||||
|
||||
var query = $.trim(editor.getSelectedText() || editor.getValue());
|
||||
|
||||
if (query.length == 0) {
|
||||
$("#run, #explain, #csv, #json").prop("disabled", false);
|
||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
return;
|
||||
}
|
||||
@ -330,7 +330,7 @@ function runQuery() {
|
||||
executeQuery(query, function(data) {
|
||||
buildTable(data);
|
||||
|
||||
$("#run, #explain, #csv, #json").prop("disabled", false);
|
||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
$("#input").show();
|
||||
$("#output").removeClass("full");
|
||||
@ -352,13 +352,13 @@ function runQuery() {
|
||||
function runExplain() {
|
||||
setCurrentTab("table_query");
|
||||
|
||||
$("#run, #explain, #csv, #json").prop("disabled", true);
|
||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", true);
|
||||
$("#query_progress").show();
|
||||
|
||||
var query = $.trim(editor.getValue());
|
||||
|
||||
if (query.length == 0) {
|
||||
$("#run, #explain, #csv, #json").prop("disabled", false);
|
||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
return;
|
||||
}
|
||||
@ -366,7 +366,7 @@ function runExplain() {
|
||||
explainQuery(query, function(data) {
|
||||
buildTable(data);
|
||||
|
||||
$("#run, #explain, #csv, #json").prop("disabled", false);
|
||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
$("#input").show();
|
||||
$("#output").removeClass("full");
|
||||
@ -532,7 +532,11 @@ $(document).ready(function() {
|
||||
|
||||
$("#json").on("click", function() {
|
||||
exportTo("json");
|
||||
})
|
||||
});
|
||||
|
||||
$("#xml").on("click", function() {
|
||||
exportTo("xml");
|
||||
});
|
||||
|
||||
$("#results").on("click", "tr", function() {
|
||||
$("#results tr.selected").removeClass();
|
||||
|
Loading…
Reference in New Issue
Block a user