mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
fix table limit
This commit is contained in:
parent
6fbe43a444
commit
00072a9bc3
@ -36,6 +36,25 @@ let initModal = function () {
|
||||
});
|
||||
});
|
||||
|
||||
// Remove onchange event in ajax select field
|
||||
if ($('.table--ajax').find('.table-limit').length > 0) {
|
||||
$('.table--ajax').find('.table-limit').removeAttr("onchange");
|
||||
}
|
||||
|
||||
// Handle ajax select in modals.
|
||||
$('.table--ajax .table-limit').on('change', function (e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
let wrapper = $(this).closest('.modal-content');
|
||||
|
||||
wrapper.append(loading);
|
||||
|
||||
$.get($(this).val(), function (html) {
|
||||
wrapper.html(html);
|
||||
});
|
||||
});
|
||||
|
||||
// Handle ajax forms in modals.
|
||||
modal.on('submit', 'form.ajax', function (e) {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user