Use bootstrap notify to notify messages

This commit is contained in:
emeric
2018-08-29 15:10:00 +02:00
parent dbe0b81e43
commit 512ae5a0d6
11 changed files with 473 additions and 14 deletions
+2 -2
View File
@@ -288,7 +288,7 @@ DatabaseSettingsView::refreshView()
model->saveData();
LmsApp->getMediaScanner().reschedule();
LmsApp->notifyMsg(Wt::WString::tr("Lms.Admin.Database.settings-saved"));
LmsApp->notifyMsg(MsgType::Success, Wt::WString::tr("Lms.Admin.Database.settings-saved"));
}
// Udate the view: Delete any validation message in the view, etc.
@@ -305,7 +305,7 @@ DatabaseSettingsView::refreshView()
immScanBtn->clicked().connect(std::bind([=] ()
{
LmsApp->getMediaScanner().scheduleImmediateScan();
LmsApp->notifyMsg(Wt::WString::tr("Lms.Admin.Database.scan-launched"));
LmsApp->notifyMsg(MsgType::Info, Wt::WString::tr("Lms.Admin.Database.scan-launched"));
}));
t->updateView(model.get());
+1 -1
View File
@@ -140,7 +140,7 @@ InitWizardView::InitWizardView()
if (model->validate())
{
model->saveData();
LmsApp->notifyMsg(Wt::WString::tr("Lms.Admin.InitWizard.done"));
LmsApp->notifyMsg(MsgType::Success, Wt::WString::tr("Lms.Admin.InitWizard.done"));
saveButton->setEnabled(false);
}
+1 -1
View File
@@ -306,7 +306,7 @@ UserView::refreshView()
if (model->validate())
{
model->saveData();
LmsApp->notifyMsg(Wt::WString::tr(userId ? "Lms.Admin.User.user-updated" : "Lms.Admin.User.user-created"));
LmsApp->notifyMsg(MsgType::Success, Wt::WString::tr(userId ? "Lms.Admin.User.user-updated" : "Lms.Admin.User.user-created"));
LmsApp->setInternalPath("/admin/users", true);
}
else