mirror of https://github.com/Radarr/Radarr
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';
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
|
'underscore',
|
||||||
'vent',
|
'vent',
|
||||||
'AppLayout',
|
'AppLayout',
|
||||||
'underscore',
|
'backbone',
|
||||||
'marionette',
|
'marionette',
|
||||||
'Quality/QualityProfileCollection',
|
'Quality/QualityProfileCollection',
|
||||||
'AddSeries/RootFolders/RootFolderCollection',
|
'AddSeries/RootFolders/RootFolderCollection',
|
||||||
|
@ -13,7 +14,18 @@ define(
|
||||||
'Shared/Messenger',
|
'Shared/Messenger',
|
||||||
'Mixins/AsValidatedView',
|
'Mixins/AsValidatedView',
|
||||||
'jquery.dotdotdot'
|
'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({
|
var view = Marionette.ItemView.extend({
|
||||||
|
|
||||||
|
@ -156,7 +168,17 @@ define(
|
||||||
icon.removeClass('icon-spin icon-spinner disabled').addClass('icon-search');
|
icon.removeClass('icon-spin icon-spinner disabled').addClass('icon-search');
|
||||||
|
|
||||||
Messenger.show({
|
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 });
|
vent.trigger(vent.Events.SeriesAdded, { series: self.model });
|
||||||
|
|
|
@ -23,13 +23,16 @@ define(function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
options.hideOnNavigate = options.hideOnNavigate || false;
|
||||||
|
|
||||||
return window.Messenger().post({
|
return window.Messenger().post({
|
||||||
message : options.message,
|
message : options.message,
|
||||||
type : options.type,
|
type : options.type,
|
||||||
showCloseButton: true,
|
showCloseButton: true,
|
||||||
hideAfter : options.hideAfter,
|
hideAfter : options.hideAfter,
|
||||||
id : options.id,
|
id : options.id,
|
||||||
actions : options.actions
|
actions : options.actions,
|
||||||
|
hideOnNavigate : options.hideOnNavigate
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue