diff --git a/themes/grav/js/admin-all.js b/themes/grav/js/admin-all.js index 7618c731..b093f813 100644 --- a/themes/grav/js/admin-all.js +++ b/themes/grav/js/admin-all.js @@ -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')); + }); }); diff --git a/themes/grav/templates/partials/themes-list.html.twig b/themes/grav/templates/partials/themes-list.html.twig index 7c64923d..f6c022f1 100644 --- a/themes/grav/templates/partials/themes-list.html.twig +++ b/themes/grav/templates/partials/themes-list.html.twig @@ -38,7 +38,7 @@ Active Theme {% else %} - + {# #} Activate @@ -48,3 +48,19 @@ {% endfor %} + +
+
+

Switching to {theme_name}

+

+ By switching to a different theme, there is no guarantee that all the layout pages are supported, potentially causing errors when trying to load said pages. +

+

+ Do you want to continue and switch to the new theme {theme_name}? +

+
+
\ No newline at end of file