mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Merge remote-tracking branch 'origin/master' into dynamic-jobs
Conflicts: NzbDrone.Web/Scripts/NzbDrone/series.js
This commit is contained in:
commit
b21bf01bf0
40 changed files with 700 additions and 262 deletions
|
@ -44,4 +44,10 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.jQuery-datepicker').livequery(function () {
|
||||
$(this).datepicker({
|
||||
dateFormat: "yy-mm-dd"
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,7 +1,6 @@
|
|||
//URLs
|
||||
var addSeriesUrl = '../AddSeries/AddExistingSeries';
|
||||
var addNewSeriesUrl = '../AddSeries/AddNewSeries';
|
||||
var quickAddNewSeriesUrl = '../AddSeries/QuickAddNewSeries';
|
||||
var existingSeriesUrl = '../AddSeries/ExistingSeries';
|
||||
var addNewUrl = '../AddSeries/AddNew';
|
||||
|
||||
|
@ -19,11 +18,14 @@ $(".masterQualitySelector").live('change', function () {
|
|||
});
|
||||
});
|
||||
|
||||
$(".addExistingButton").live('click', function() {
|
||||
$(".addExistingButton").live('click', function () {
|
||||
var button = $(this);
|
||||
$(button).attr('disabled', 'disabled');
|
||||
var root = $(this).parents(".existingSeries");
|
||||
var title = $(this).siblings(".seriesLookup").val();
|
||||
var seriesId = $(this).siblings(".seriesId").val();
|
||||
var qualityId = $(this).siblings(".qualitySelector").val();
|
||||
var date = $(this).siblings('.start-date').val();
|
||||
|
||||
var path = root.find(".seriesPathValue Label").text();
|
||||
|
||||
|
@ -41,8 +43,9 @@ $(".addExistingButton").live('click', function() {
|
|||
$.ajax({
|
||||
type: "POST",
|
||||
url: addSeriesUrl,
|
||||
data: jQuery.param({ path: path, seriesName: title, seriesId: seriesId, qualityProfileId: qualityId }),
|
||||
error: function(req, status, error) {
|
||||
data: jQuery.param({ path: path, seriesName: title, seriesId: seriesId, qualityProfileId: qualityId, startDate: date }),
|
||||
error: function (req, status, error) {
|
||||
$(button).removeAttr('disabled');
|
||||
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||
},
|
||||
success: function() {
|
||||
|
@ -64,6 +67,14 @@ function reloadExistingSeries() {
|
|||
});
|
||||
}
|
||||
|
||||
$(".start-date-master").live('change', function () {
|
||||
|
||||
var date = $(this).val();
|
||||
$("#existingSeries").find(".start-date").each(function () {
|
||||
$(this).val(date);
|
||||
});
|
||||
});
|
||||
|
||||
//RootDir
|
||||
//Delete RootDir
|
||||
$('#rootDirs .actionButton img').live('click', function (image) {
|
||||
|
@ -112,20 +123,26 @@ function refreshRoot() {
|
|||
|
||||
//AddNew
|
||||
$('#saveNewSeries').live('click', function () {
|
||||
$('#saveNewSeries').attr('disabled', 'disabled');
|
||||
|
||||
var seriesTitle = $("#newSeriesLookup").val();
|
||||
var seriesId = $("#newSeriesId").val();
|
||||
var qualityId = $("#qualityList").val();
|
||||
var path = $('#newSeriesPath').val();
|
||||
var date = $('#newStartDate').val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: addNewSeriesUrl,
|
||||
data: jQuery.param({ path: path, seriesName: seriesTitle, seriesId: seriesId, qualityProfileId: qualityId }),
|
||||
data: jQuery.param({ path: path, seriesName: seriesTitle, seriesId: seriesId, qualityProfileId: qualityId, startDate: date }),
|
||||
error: function (req, status, error) {
|
||||
$('#saveNewSeries').removeAttr('disabled');
|
||||
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||
},
|
||||
success: function () {
|
||||
$("#newSeriesLookup").val("");
|
||||
$('#saveNewSeries').removeAttr('disabled');
|
||||
$("#newSeriesLookup").val('');
|
||||
$('#newStartDate').val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -140,27 +157,6 @@ function reloadAddNew() {
|
|||
}
|
||||
|
||||
|
||||
//QuickAddNew
|
||||
$('#quickAddNew').live('click', function () {
|
||||
var seriesTitle = $("#newSeriesLookup").val();
|
||||
var seriesId = $("#newSeriesId").val();
|
||||
var qualityId = $("#qualityList").val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: quickAddNewSeriesUrl,
|
||||
data: jQuery.param({ seriesName: seriesTitle, seriesId: seriesId, qualityProfileId: qualityId }),
|
||||
error: function (req, status, error) {
|
||||
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||
},
|
||||
success: function () {
|
||||
$("#newSeriesLookup").val("");
|
||||
$('#newSeriesPath').val("");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//Watermark
|
||||
$('#rootDirInput').livequery(function () {
|
||||
$(this).watermark('Enter your new root folder path...');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var seriesEditorUrl = '../Series/SingleSeriesEditor';
|
||||
var saveSeriesEditorUrl = '../Series/SaveSingleSeriesEditor';
|
||||
var seriesEditorUrl = '../Series/Edit';
|
||||
var saveSeriesEditorUrl = '../Series/Edit';
|
||||
var seriesDeleteUrl = '../Series/Delete';
|
||||
|
||||
$("#seriesEditor").dialog({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue