Merge pull request #31 from jartek/master

Replace attr with prop for disabled elements
This commit is contained in:
Dan Sosedoff 2014-10-28 21:25:29 -05:00
commit addac1062d

View File

@ -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");