Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改快捷键绕过表单验证问题 #1178

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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