v1.0.0: Admin JS utilities
This commit is contained in:
1 parent
98034fccd5
commit
37d58b2b30
1 file changed
+7
@@ -0,0 +1,7 @@
|
||||
// === Scratching Post Admin JS ===
|
||||
document.querySelectorAll('.alert-dismissible').forEach(function (alert) {
|
||||
setTimeout(function () { var bsAlert = bootstrap.Alert.getOrCreateInstance(alert); bsAlert.close(); }, 5000);
|
||||
});
|
||||
document.querySelectorAll('[data-confirm]').forEach(function (el) {
|
||||
el.addEventListener('click', function (e) { if (!confirm(this.dataset.confirm)) e.preventDefault(); });
|
||||
});
|
||||
Reference in new issue
Block a user