Replaced save notifications for settings on page with AJAX Notifications.

This commit is contained in:
Mark McDowall 2011-05-12 21:46:26 -07:00
parent 3cc052e9b6
commit d65d79a5c9
10 changed files with 81 additions and 10 deletions

View file

@ -18,9 +18,21 @@ namespace NzbDrone.Web.Controllers
public JsonResult Index()
{
string message = string.Empty;
if (_notifications.GetProgressNotifications.Count != 0)
var basic = _notifications.BasicNotifications;
if (basic.Count != 0)
{
message = _notifications.GetProgressNotifications[0].CurrentMessage;
message = basic[0].Title;
if (basic[0].AutoDismiss)
_notifications.Dismiss(basic[0].Id);
}
else
{
if (_notifications.GetProgressNotifications.Count != 0)
message = _notifications.GetProgressNotifications[0].CurrentMessage;
}
return Json(message, JsonRequestBehavior.AllowGet);