mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Add Enter key functionality to save plugin settings and fix condition for minimum settings check
This commit is contained in:
parent
325bd51dc9
commit
33d07aef64
1 changed files with 8 additions and 1 deletions
|
|
@ -1120,6 +1120,13 @@ $(document).ready(() => {
|
|||
}, 30);
|
||||
});
|
||||
|
||||
$(".plugin-setting").on("keydown", function (e) {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
$(".save-settings").trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on("beforeunload", function (e) {
|
||||
if (isReadOnly) return;
|
||||
|
||||
|
|
@ -1134,7 +1141,7 @@ $(document).ready(() => {
|
|||
if (currentMode === "raw")
|
||||
isDraft = form.find("input[name='IS_DRAFT']").val() === "yes";
|
||||
|
||||
if (form.children().length < minSettings && isDraft === wasDraft) return;
|
||||
if (form.children().length <= minSettings && isDraft === wasDraft) return;
|
||||
}
|
||||
|
||||
// Cross-browser compatibility (for older browsers)
|
||||
|
|
|
|||
Loading…
Reference in a new issue