mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-13 16:42:10 +02:00
Better logic for delete action to support Ajax. Fixes Flex lists
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.9.0-rc.2
|
||||
## mm/dd/2019
|
||||
|
||||
1. [](#improved)
|
||||
* Better logic for delete action to support Ajax. Fixes Flex lists
|
||||
|
||||
# v1.9.0-rc.1
|
||||
## 01/29/2019
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import $ from 'jquery';
|
||||
|
||||
$('[data-remodal-target="delete"]').on('click', function() {
|
||||
$(document).on('click', '[data-remodal-target="delete"]', function() {
|
||||
let confirm = $('[data-remodal-id="delete"] [data-delete-action]');
|
||||
let link = $(this).data('delete-url');
|
||||
|
||||
confirm.data('delete-action', link);
|
||||
});
|
||||
|
||||
$('[data-delete-action]').on('click', function() {
|
||||
$(document).on('click', '[data-delete-action]', function() {
|
||||
let remodal = $.remodal.lookup[$('[data-remodal-id="delete"]').data('remodal')];
|
||||
|
||||
global.location.href = $(this).data('delete-action');
|
||||
|
||||
2
themes/grav/js/admin.min.js
vendored
2
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user