added success notification when new series is added.

pull/3113/head
Keivan Beigi 12 years ago committed by kay.one
parent 159585553c
commit 30a049e4fb

@ -50,7 +50,7 @@
</div>
<div id="content" class="row">
<div class="span20">
<div id="error-region" class="row">
<div id="notification-region" class="row">
</div>
<div id="sub-menu-region" class="row">
</div>

@ -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);
}
});
}

@ -60,10 +60,10 @@ body {
}
#error-region .alert {
#notification-region .alert {
margin: 10px;
}
#error-region .alert .icon-warning-sign {
#notification-region i {
padding-right: 10px;
}

@ -32,7 +32,7 @@ NzbDrone.Shared.NotificationCollectionView = Backbone.Marionette.CollectionView.
});
NzbDrone.addInitializer(function (options) {
NzbDrone.errorRegion.show(NzbDrone.Shared.NotificationCollectionView.Instance);
NzbDrone.notificationRegion.show(NzbDrone.Shared.NotificationCollectionView.Instance);
});

@ -74,7 +74,7 @@ NzbDrone.addInitializer(function (options) {
NzbDrone.addRegions({
mainRegion: "#main-region",
errorRegion: "#error-region"
notificationRegion: "#notification-region"
});
NzbDrone.Router = new NzbDrone.Router();

Loading…
Cancel
Save