added success notification when new series is added.

This commit is contained in:
Keivan Beigi
2013-01-28 19:01:46 -08:00
committed by kay.one
parent 159585553c
commit 30a049e4fb
5 changed files with 18 additions and 8 deletions

View File

@@ -38,7 +38,17 @@ NzbDrone.AddSeries.SearchItemView = Backbone.Marionette.ItemView.extend({
path: path
});
model.save();
model.save(undefined, {
success: function () {
var notificationModel = new NzbDrone.Shared.NotificationModel({
title: 'Added',
message: title,
level: 'success'
});
NzbDrone.Shared.NotificationCollectionView.Instance.collection.add(notificationModel);
}
});
}
@@ -53,7 +63,7 @@ NzbDrone.AddSeries.SearchResultView = Backbone.Marionette.CollectionView.extend(
initialize: function () {
this.listenTo(this.collection, 'reset', this.render);
},
});