mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
adding a confirm dialog behind the theme revert button in the acp
This commit is contained in:
@@ -58,7 +58,11 @@ nodebb_admin.themes = {
|
|||||||
|
|
||||||
var revertEl = document.getElementById('revert_theme');
|
var revertEl = document.getElementById('revert_theme');
|
||||||
revertEl.addEventListener('click', function() {
|
revertEl.addEventListener('click', function() {
|
||||||
|
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:id');
|
||||||
nodebb_admin.remove('theme:src');
|
nodebb_admin.remove('theme:src');
|
||||||
|
}
|
||||||
|
});
|
||||||
}, false);
|
}, false);
|
||||||
})();
|
})();
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
prepare: function() {
|
prepare: function() {
|
||||||
// Come back in 500ms if the config isn't ready yet
|
// Come back in 500ms if the config isn't ready yet
|
||||||
if (nodebb_admin.config === undefined) {
|
if (nodebb_admin.config === undefined) {
|
||||||
console.log('Config not ready...');
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
nodebb_admin.prepare();
|
nodebb_admin.prepare();
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -71,9 +70,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// save: function(key, value) {
|
|
||||||
// socket.emit('api:config.set', { key: key, value: value });
|
|
||||||
// },
|
|
||||||
remove: function(key) {
|
remove: function(key) {
|
||||||
socket.emit('api:config.remove', key);
|
socket.emit('api:config.remove', key);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user