mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-26 23:06:43 -04:00
New: Drone now uses the Download Client API to determine if a download is ready for import. (User configuration is required to replace the drone factory with this feature)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'Settings/ThingyAddCollectionView',
|
||||
'Settings/Notifications/Add/NotificationAddItemView'
|
||||
], function (ThingyAddCollectionView, AddItemView) {
|
||||
|
||||
return ThingyAddCollectionView.extend({
|
||||
itemView : AddItemView,
|
||||
itemViewContainer: '.add-notifications .items',
|
||||
template : 'Settings/Notifications/Add/NotificationAddCollectionViewTemplate'
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Add Notification</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="add-notifications add-thingies">
|
||||
<ul class="items"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal">close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'jquery',
|
||||
'AppLayout',
|
||||
'marionette',
|
||||
'Settings/Notifications/Edit/NotificationEditView'
|
||||
], function ($, AppLayout, Marionette, EditView) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Settings/Notifications/Add/NotificationAddItemViewTemplate',
|
||||
tagName : 'li',
|
||||
|
||||
events: {
|
||||
'click': '_add'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.targetCollection = options.targetCollection;
|
||||
},
|
||||
|
||||
_add: function (e) {
|
||||
if (this.$(e.target).hasClass('icon-info-sign')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.model.set({
|
||||
id : undefined,
|
||||
name : this.model.get('implementation'),
|
||||
onGrab : true,
|
||||
onDownload : true,
|
||||
onUpgrade : true
|
||||
});
|
||||
|
||||
var editView = new EditView({ model: this.model, targetCollection: this.targetCollection });
|
||||
AppLayout.modalRegion.show(editView);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="add-thingy">
|
||||
{{implementation}}
|
||||
{{#if link}}
|
||||
<a href="{{link}}"><i class="icon-info-sign"/></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'AppLayout',
|
||||
'Settings/Notifications/NotificationCollection',
|
||||
'Settings/Notifications/Add/NotificationAddCollectionView'
|
||||
], function (AppLayout, SchemaCollection, AddCollectionView) {
|
||||
return ({
|
||||
|
||||
open: function (collection) {
|
||||
var schemaCollection = new SchemaCollection();
|
||||
var originalUrl = schemaCollection.url;
|
||||
schemaCollection.url = schemaCollection.url + '/schema';
|
||||
schemaCollection.fetch();
|
||||
schemaCollection.url = originalUrl;
|
||||
|
||||
var view = new AddCollectionView({ collection: schemaCollection, targetCollection: collection});
|
||||
AppLayout.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user