mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
Merge pull request #31 from jartek/master
Replace attr with prop for disabled elements
This commit is contained in:
commit
addac1062d
@ -185,17 +185,13 @@ function showQueryPanel() {
|
||||
function runQuery() {
|
||||
setCurrentTab("table_query");
|
||||
|
||||
$("#run").attr("disabled", "disabled");
|
||||
$("#explain").attr("disabled", "disabled");
|
||||
$("#csv").attr("disabled", "disabled");
|
||||
$("#run, #explain, #csv").prop("disabled", true);
|
||||
$("#query_progress").show();
|
||||
|
||||
var query = $.trim(editor.getValue());
|
||||
|
||||
if (query.length == 0) {
|
||||
$("#run").removeAttr("disabled");
|
||||
$("#explain").removeAttr("disabled");
|
||||
$("#csv").removeAttr("disabled");
|
||||
$("#run, #explain, #csv").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
return;
|
||||
}
|
||||
@ -203,9 +199,7 @@ function runQuery() {
|
||||
executeQuery(query, function(data) {
|
||||
buildTable(data);
|
||||
|
||||
$("#run").removeAttr("disabled");
|
||||
$("#explain").removeAttr("disabled");
|
||||
$("#csv").removeAttr("disabled");
|
||||
$("#run, #explain, #csv").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
$("#input").show();
|
||||
$("#output").removeClass("full");
|
||||
@ -215,17 +209,13 @@ function runQuery() {
|
||||
function runExplain() {
|
||||
setCurrentTab("table_query");
|
||||
|
||||
$("#run").attr("disabled", "disabled");
|
||||
$("#explain").attr("disabled", "disabled");
|
||||
$("#csv").attr("disabled", "disabled");
|
||||
$("#run, #explain, #csv").prop("disabled", true);
|
||||
$("#query_progress").show();
|
||||
|
||||
var query = $.trim(editor.getValue());
|
||||
|
||||
if (query.length == 0) {
|
||||
$("#run").removeAttr("disabled");
|
||||
$("#explain").removeAttr("disabled");
|
||||
$("#csv").removeAttr("disabled");
|
||||
$("#run, #explain, #csv").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
return;
|
||||
}
|
||||
@ -233,9 +223,7 @@ function runExplain() {
|
||||
explainQuery(query, function(data) {
|
||||
buildTable(data);
|
||||
|
||||
$("#run").removeAttr("disabled");
|
||||
$("#explain").removeAttr("disabled");
|
||||
$("#csv").removeAttr("disabled");
|
||||
$("#run, #explain, #csv").prop("disabled", false);
|
||||
$("#query_progress").hide();
|
||||
$("#input").show();
|
||||
$("#output").removeClass("full");
|
||||
|
Loading…
Reference in New Issue
Block a user