mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-15 09:46:06 +01:00
Implemented 2-steps Theme switcher with warning before proceeding
This commit is contained in:
@@ -360,6 +360,7 @@ $(function () {
|
||||
addBtn.data('key-index', index);
|
||||
}
|
||||
|
||||
// Collections
|
||||
$('[data-type="collection"]').each(function () {
|
||||
var el = $(this),
|
||||
holder = el.find('[data-collection-holder]'),
|
||||
@@ -396,4 +397,13 @@ $(function () {
|
||||
button.data('key-index', ++key);
|
||||
});
|
||||
});
|
||||
|
||||
// Thems Switcher Warning
|
||||
$(document).on('mousedown', '[data-remodal-target="theme-switch-warn"]', function(e){
|
||||
var name = $(e.target).closest('[data-gpm-theme]').find('.gpm-name a').text(),
|
||||
remodal = $('.remodal.theme-switcher');
|
||||
|
||||
remodal.find('strong').text(name);
|
||||
remodal.find('.button.continue').attr('href', $(e.target).attr('href'));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user