Implemented 2-steps Theme switcher with warning before proceeding

This commit is contained in:
Djamil Legato
2015-08-06 12:48:42 -07:00
parent 41fd0cc0c2
commit 865628913a
2 changed files with 27 additions and 1 deletions

View File

@@ -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'));
});
});