-
-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#624] fix filters being reordered after editing
- Loading branch information
1 parent
989c447
commit 31a2419
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$(document).ready(function () { | ||
const IDX = [[36, 'a'], [10, 'A'], [0, '0']]; | ||
let idxChar = (i, [x, c]=IDX.find(([x]) => i >= x)) => String.fromCharCode(c.charCodeAt(0) + (i-x)); | ||
filter_form.onsubmit = function () { | ||
$(`.filter-val[name]`, this).each((i, e) => {e.name = e.name.replace(/(?<=^flt)[^_]*(?=_)/, idxChar(i))}); | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters