fixes #525 - Edit Series Run Time through Web Dashboard

This commit is contained in:
Luke Pulverenti 2013-09-13 14:37:44 -04:00
parent 65db9f5390
commit ba537f20af
2 changed files with 25 additions and 0 deletions

View File

@ -150,6 +150,10 @@
<label for="txtAirTime">Air Time:</label>
<input type="time" id="txtAirTime" name="txtAirTime" data-mini="true" />
</div>
<div data-role="fieldcontain" id="fldSeriesRuntime" style="display: none;">
<label for="txtSeriesRuntime">Run Time (minutes):</label>
<input type="number" id="txtSeriesRuntime" name="txtSeriesRuntime" data-mini="true" />
</div>
<div data-role="fieldcontain" id="fldOfficialRating" style="display: none;">
<label for="selectOfficialRating">Official rating:</label>
<select name="selectOfficialRating" id="selectOfficialRating" data-mini="true"></select>

View File

@ -354,6 +354,12 @@
$('#fldPath', page).hide();
}
if (item.Type == "Series") {
$('#fldSeriesRuntime', page).show();
} else {
$('#fldSeriesRuntime', page).hide();
}
if (item.Type == "Series" || item.Type == "Person") {
$('#fldEndDate', page).show();
} else {
@ -660,6 +666,14 @@
$('#txtMusicBrainzReleaseGroupId', page).val(providerIds.MusicBrainzReleaseGroup || "");
$('#txtRottenTomatoes', page).val(providerIds.RottenTomatoes || "");
if (item.RunTimeTicks) {
var minutes = item.RunTimeTicks / 600000000;
$('#txtSeriesRuntime', page).val(minutes);
} else {
$('#txtSeriesRuntime', page).val("");
}
}
function convertTo24HourFormat(time) {
@ -894,6 +908,13 @@
item.ProductionLocations = placeOfBirth ? [placeOfBirth] : [];
}
if (currentItem.Type == "Series") {
// 600000000
var seriesRuntime = $('#txtSeriesRuntime', form).val();
item.RunTimeTicks = seriesRuntime ? (seriesRuntime * 600000000) : null;
}
var updatePromise;