Using more html5 data attributes
This commit is contained in:
parent
27d9592b41
commit
a197316640
|
@ -71,7 +71,7 @@ $(function () {
|
||||||
// Declare a function on the chat hub so the server can invoke it
|
// Declare a function on the chat hub so the server can invoke it
|
||||||
signalRProvider.updatedStatus = function (data) {
|
signalRProvider.updatedStatus = function (data) {
|
||||||
var imageSrc = '../../Content/Images/' + data.EpisodeStatus + '.png';
|
var imageSrc = '../../Content/Images/' + data.EpisodeStatus + '.png';
|
||||||
var row = $('tr.episodeId_' + data.EpisodeId);
|
var row = $('[data-episode-id="' + data.EpisodeId + '"]');
|
||||||
|
|
||||||
if (row.length == 0)
|
if (row.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
@using NzbDrone.Web.Helpers
|
@using NzbDrone.Web.Helpers
|
||||||
@model NzbDrone.Web.Models.EpisodeModel
|
@model NzbDrone.Web.Models.EpisodeModel
|
||||||
|
|
||||||
<tr class="episodeId_@(Model.EpisodeId) data-row@(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")" data-episodefileid="@Model.EpisodeFileId">
|
<tr class="data-row@(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")" data-episodefileid="@Model.EpisodeFileId" data-episode-id="@Model.EpisodeId">
|
||||||
<td>@Model.EpisodeNumber</td>
|
<td>@Model.EpisodeNumber</td>
|
||||||
<td>@Model.Title</td>
|
<td>@Model.Title</td>
|
||||||
<td>@Model.AirDate</td>
|
<td>@Model.AirDate</td>
|
||||||
|
|
|
@ -194,7 +194,7 @@
|
||||||
],
|
],
|
||||||
"aaSorting": [[1, 'asc']],
|
"aaSorting": [[1, 'asc']],
|
||||||
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
|
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
|
||||||
$(nRow).addClass(aData["SeriesId"].toString());
|
$(nRow).attr('data-series-id', aData["SeriesId"].toString());
|
||||||
},
|
},
|
||||||
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
|
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
|
||||||
var element = $(nRow).find('.progressBar');
|
var element = $(nRow).find('.progressBar');
|
||||||
|
@ -214,7 +214,7 @@
|
||||||
|
|
||||||
//After we delete a series do this...
|
//After we delete a series do this...
|
||||||
function afterDelete(seriesId) {
|
function afterDelete(seriesId) {
|
||||||
var row = $('.' + seriesId);
|
var row = $('[data-series-id="' + seriesId + '"]');
|
||||||
|
|
||||||
if ($(row).hasClass('details-opened')) {
|
if ($(row).hasClass('details-opened')) {
|
||||||
var nextRow = $(row).next('tr');
|
var nextRow = $(row).next('tr');
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
Layout = null;
|
Layout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
<tr class='episodeId_@(Model.EpisodeId) data-row@(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")'>
|
<tr class="data-row@(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")" data-episode-id="@Model.EpisodeId">
|
||||||
<td>@Html.ActionLink(Model.SeriesTitle, "Details", "Series", new { seriesId = Model.SeriesId }, null)</td>
|
<td>@Html.ActionLink(Model.SeriesTitle, "Details", "Series", new { seriesId = Model.SeriesId }, null)</td>
|
||||||
<td>@Model.EpisodeNumbering</td>
|
<td>@Model.EpisodeNumbering</td>
|
||||||
<td>@Model.Title</td>
|
<td>@Model.Title</td>
|
||||||
|
|
Loading…
Reference in New Issue