mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
parent
c7776f74e1
commit
663160c06a
230 changed files with 57 additions and 386 deletions
86
UI/Series/Edit/EditSeriesTemplate.html
Normal file
86
UI/Series/Edit/EditSeriesTemplate.html
Normal file
|
@ -0,0 +1,86 @@
|
|||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Edit: {{title}}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-horizontal">
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Monitored</label>
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="monitored" />
|
||||
</div>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Should NzbDrone download episodes for this series?"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Use Season Folder</label>
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="seasonFolder" />
|
||||
</div>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Should downloaded episodes be stored in season folders?"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputQualityProfile">Quality Profile</label>
|
||||
<div class="controls">
|
||||
|
||||
<select class="x-quality-profile" id="inputQualityProfile" name="qualityProfileId">
|
||||
{{#each qualityProfiles.models}}
|
||||
<option value="{{id}}">{{attributes.name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="Which Quality Profile should NzbDrone use to download episodes?"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPath">Path</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="inputPath" placeholder="Path" name="path">
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="Where should NzbDrone store episodes for this series?"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputBacklogSetting">Backlog Setting</label>
|
||||
<div class="controls">
|
||||
<select id="inputBacklogSetting" class="inputClass x-backlog-setting" name="backlogSetting">
|
||||
<option value="0">Inherit</option>
|
||||
<option value="1">Enable</option>
|
||||
<option value="2">Disable</option>
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="Should NzbDrone search for missing episodes every 30 days?"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputCustomStartDate">Custom Start Date</label>
|
||||
<div class="controls">
|
||||
<input type="date" id="inputCustomStartDate" name="customStartDate">
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="Should NzbDrone only download episodes after your preferred start date?"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-danger pull-left x-remove" >delete</button>
|
||||
<button class="btn" data-dismiss="modal">cancel</button>
|
||||
<button class="btn btn-primary x-save">save</button>
|
||||
</div>
|
46
UI/Series/Edit/EditSeriesView.js
Normal file
46
UI/Series/Edit/EditSeriesView.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
'use strict';
|
||||
define(['app', 'Series/SeriesModel', 'Series/Delete/DeleteSeriesView', 'Quality/QualityProfileCollection'], function () {
|
||||
|
||||
NzbDrone.Series.Edit.EditSeriesView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Series/Edit/EditSeriesTemplate',
|
||||
tagName: 'div',
|
||||
className: "modal",
|
||||
|
||||
ui: {
|
||||
progressbar: '.progress .bar',
|
||||
qualityProfile: '.x-quality-profile',
|
||||
backlogSettings: '.x-backlog-setting',
|
||||
switch: '.switch'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-save': 'saveSeries',
|
||||
'click .x-remove': 'removeSeries'
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
NzbDrone.ModelBinder.bind(this.model, this.el);
|
||||
this.ui.switch.bootstrapSwitch();
|
||||
},
|
||||
|
||||
|
||||
saveSeries: function () {
|
||||
//Todo: Get qualityProfile + backlog setting from UI
|
||||
var qualityProfile = this.ui.qualityProfile.val();
|
||||
var qualityProfileText = this.ui.qualityProfile.children('option:selected').text();
|
||||
var backlogSetting = this.ui.backlogSettings.val();
|
||||
|
||||
this.model.set({ qualityProfileId: qualityProfile, backlogSetting: backlogSetting, qualityProfileName: qualityProfileText });
|
||||
|
||||
this.model.save();
|
||||
this.trigger('saved');
|
||||
this.$el.parent().modal('hide');
|
||||
},
|
||||
|
||||
removeSeries: function () {
|
||||
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
||||
NzbDrone.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue