Skip to content

Commit

Permalink
一键查询时也主动禁用按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyo committed Jul 27, 2019
1 parent a345f51 commit 0ac5c76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sql/templates/sqlquery.html
Expand Up @@ -474,7 +474,6 @@ <h4 class="modal-title text-danger">收藏语句</h4>
$("#instance_name").selectpicker('val', row_data['instance_name']);
if ($("#instance_name").val()) {
$("#instance_name").selectpicker().trigger("change");
get_instance(false)
}
$("#db_name").selectpicker('val', row_data['db_name']);
let instance_name = $("#instance_name").val();
Expand Down Expand Up @@ -758,6 +757,8 @@ <h4 class="modal-title text-danger">收藏语句</h4>

//将数据通过ajax提交给后端进行检查
function sqlquery(sql) {
$('input[type=button]').addClass('disabled');
$('input[type=button]').prop('disabled', true);
var select_sqlContent = editor.session.getTextRange(editor.getSelectionRange());
if (select_sqlContent) {
sqlContent = select_sqlContent
Expand Down Expand Up @@ -882,7 +883,7 @@ <h4 class="modal-title text-danger">收藏语句</h4>
}

$("#instance_name").change(function () {
get_instance(true)
get_instance(false)
});


Expand Down

0 comments on commit 0ac5c76

Please sign in to comment.