adding a confirm dialog behind the theme revert button in the acp

This commit is contained in:
Julian Lam
2013-06-12 11:18:14 -04:00
parent cbd03e75e2
commit 41187dfddb
2 changed files with 6 additions and 6 deletions

View File

@@ -58,7 +58,11 @@ nodebb_admin.themes = {
var revertEl = document.getElementById('revert_theme');
revertEl.addEventListener('click', function() {
nodebb_admin.remove('theme:id');
nodebb_admin.remove('theme:src');
bootbox.confirm('Are you sure you wish to remove the custom theme and restore the NodeBB default theme?', function(confirm) {
if (confirm) {
nodebb_admin.remove('theme:id');
nodebb_admin.remove('theme:src');
}
});
}, false);
})();