Messenger supports hideOnNavigate now
New: After adding a series you will be able to navigate to it via the UI notification
This commit is contained in:
parent
0f9360bccb
commit
b65f2e7845
|
@ -1,9 +1,10 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'underscore',
|
||||
'vent',
|
||||
'AppLayout',
|
||||
'underscore',
|
||||
'backbone',
|
||||
'marionette',
|
||||
'Quality/QualityProfileCollection',
|
||||
'AddSeries/RootFolders/RootFolderCollection',
|
||||
|
@ -13,7 +14,18 @@ define(
|
|||
'Shared/Messenger',
|
||||
'Mixins/AsValidatedView',
|
||||
'jquery.dotdotdot'
|
||||
], function (vent, AppLayout, _, Marionette, QualityProfiles, RootFolders, RootFolderLayout, SeriesCollection, Config, Messenger, AsValidatedView) {
|
||||
], function (_,
|
||||
vent,
|
||||
AppLayout,
|
||||
Backbone,
|
||||
Marionette,
|
||||
QualityProfiles,
|
||||
RootFolders,
|
||||
RootFolderLayout,
|
||||
SeriesCollection,
|
||||
Config,
|
||||
Messenger,
|
||||
AsValidatedView) {
|
||||
|
||||
var view = Marionette.ItemView.extend({
|
||||
|
||||
|
@ -156,7 +168,17 @@ define(
|
|||
icon.removeClass('icon-spin icon-spinner disabled').addClass('icon-search');
|
||||
|
||||
Messenger.show({
|
||||
message: 'Added: ' + self.model.get('title')
|
||||
message: 'Added: ' + self.model.get('title'),
|
||||
actions : {
|
||||
goToSeries: {
|
||||
label: 'Go to Series Page',
|
||||
action: function() {
|
||||
Backbone.history.navigate('/series/' + self.model.get('titleSlug'), { trigger: true });
|
||||
}
|
||||
}
|
||||
},
|
||||
hideAfter: 8,
|
||||
hideOnNavigate: true
|
||||
});
|
||||
|
||||
vent.trigger(vent.Events.SeriesAdded, { series: self.model });
|
||||
|
|
|
@ -23,13 +23,16 @@ define(function () {
|
|||
}
|
||||
}
|
||||
|
||||
options.hideOnNavigate = options.hideOnNavigate || false;
|
||||
|
||||
return window.Messenger().post({
|
||||
message : options.message,
|
||||
type : options.type,
|
||||
showCloseButton: true,
|
||||
hideAfter : options.hideAfter,
|
||||
id : options.id,
|
||||
actions : options.actions
|
||||
actions : options.actions,
|
||||
hideOnNavigate : options.hideOnNavigate
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue