Delay Profiles

New: Select preferred protocol (usenet/torrent)
New: Option to delay grabs from usenet/torrents independently
This commit is contained in:
Mark McDowall
2014-11-23 16:07:46 -08:00
parent 0d61b5dc97
commit 37a1398338
51 changed files with 1164 additions and 342 deletions

View File

@@ -0,0 +1,48 @@
 'use strict';
define([
'vent',
'AppLayout',
'marionette',
'Settings/Profile/Delay/Delete/DelayProfileDeleteView',
'Mixins/AsModelBoundView',
'Mixins/AsValidatedView',
'Mixins/AsEditModalView',
'Mixins/TagInput',
'bootstrap'
], function (vent, AppLayout, Marionette, DeleteView, AsModelBoundView, AsValidatedView, AsEditModalView) {
var view = Marionette.ItemView.extend({
template: 'Settings/Profile/Delay/Edit/DelayProfileEditViewTemplate',
_deleteView: DeleteView,
ui: {
tags : '.x-tags'
},
initialize: function (options) {
this.targetCollection = options.targetCollection;
},
onRender: function () {
if (this.model.id !== 1) {
this.ui.tags.tagInput({
model : this.model,
property : 'tags'
});
}
},
_onAfterSave: function () {
this.targetCollection.add(this.model, { merge: true });
vent.trigger(vent.Commands.CloseModalCommand);
}
});
AsModelBoundView.call(view);
AsValidatedView.call(view);
AsEditModalView.call(view);
return view;
});