Skip to content

Commit

Permalink
Merge pull request #1178 from DB-wang2/master
Browse files Browse the repository at this point in the history
修改快捷键绕过表单验证问题
  • Loading branch information
hhyo committed Sep 16, 2021
2 parents 4583f48 + ea48891 commit f24d059
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/static/ace/ace-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ editor.commands.addCommand({
exec: function (editor) {
let pathname = window.location.pathname;
if (pathname === "/sqlquery/") {
sqlquery();
dosqlquery()
}
}
});
Expand Down
14 changes: 9 additions & 5 deletions sql/templates/sqlquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -622,11 +622,7 @@ <h4 class="modal-title text-danger">收藏语句</h4>

//先做表单验证验证成功再成功提交查询请求
$("#btn-sqlquery").click(function () {
if (sqlquery_validate()) {
$('input[type=button]').addClass('disabled');
$('input[type=button]').prop('disabled', true);
sqlquery();
}
dosqlquery();
}
);

Expand Down Expand Up @@ -913,6 +909,14 @@ <h4 class="modal-title text-danger">收藏语句</h4>
}
});
}

function dosqlquery() {
if (sqlquery_validate()) {
$('input[type=button]').addClass('disabled');
$('input[type=button]').prop('disabled', true);
sqlquery();
}
}
</script>
<!-- common -->
<script>
Expand Down

0 comments on commit f24d059

Please sign in to comment.