mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-10 22:50:47 +01:00
fix: remove success toast on settings.save, navigation, widgets
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
|
||||
"acp-title": "%1 | NodeBB Admin Control Panel",
|
||||
"settings-header-contents": "Contents",
|
||||
"changes-saved": "Changes Saved",
|
||||
"changes-saved-message": "Your changes to the NodeBB configuration have been saved.",
|
||||
"changes-not-saved": "Changes Not Saved",
|
||||
"changes-not-saved-message": "NodeBB encountered a problem saving your changes. (%1)"
|
||||
}
|
||||
@@ -127,16 +127,14 @@ define('admin/extend/widgets', [
|
||||
|
||||
socket.emit('admin.widgets.set', saveData, function (err) {
|
||||
if (err) {
|
||||
alerts.error(err);
|
||||
return alerts.error(err);
|
||||
}
|
||||
|
||||
alerts.alert({
|
||||
alert_id: 'admin:widgets',
|
||||
type: 'success',
|
||||
title: '[[admin/extend/widgets:alert.updated]]',
|
||||
message: '[[admin/extend/widgets:alert.update-success]]',
|
||||
timeout: 2500,
|
||||
});
|
||||
const saveBtn = document.getElementById('save');
|
||||
saveBtn.classList.toggle('saved', true);
|
||||
setTimeout(() => {
|
||||
saveBtn.classList.toggle('saved', false);
|
||||
}, 5000);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -84,14 +84,6 @@ define('admin/settings', ['uploader', 'mousetrap', 'hooks', 'alerts'], function
|
||||
saveBtn.get(0).classList.toggle('saved', false);
|
||||
}, 5000);
|
||||
|
||||
alerts.alert({
|
||||
alert_id: 'config_status',
|
||||
timeout: 2500,
|
||||
title: '[[admin/admin:changes-saved]]',
|
||||
message: '[[admin/admin:changes-saved-message]]',
|
||||
type: 'success',
|
||||
});
|
||||
|
||||
hooks.fire('action:admin.settingsSaved');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -145,7 +145,11 @@ define('admin/settings/navigation', [
|
||||
if (err) {
|
||||
alerts.error(err);
|
||||
} else {
|
||||
alerts.success('Successfully saved navigation');
|
||||
const saveBtn = document.getElementById('save');
|
||||
saveBtn.classList.toggle('saved', true);
|
||||
setTimeout(() => {
|
||||
saveBtn.classList.toggle('saved', false);
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -550,12 +550,11 @@ define('settings', ['hooks', 'alerts'], function (hooks, alerts) {
|
||||
timeout: 2500,
|
||||
});
|
||||
} else {
|
||||
alerts.alert({
|
||||
title: '[[admin/admin:changes-saved]]',
|
||||
message: '[[admin/admin:changes-saved-message]]',
|
||||
type: 'success',
|
||||
timeout: 2500,
|
||||
});
|
||||
const saveBtn = document.getElementById('save');
|
||||
saveBtn.classList.toggle('saved', true);
|
||||
setTimeout(() => {
|
||||
saveBtn.classList.toggle('saved', false);
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user