mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 09:47:39 +00:00
Using more html5 data attributes
This commit is contained in:
parent
27d9592b41
commit
a197316640
4 changed files with 5 additions and 5 deletions
|
@ -71,7 +71,7 @@ $(function () {
|
|||
// Declare a function on the chat hub so the server can invoke it
|
||||
signalRProvider.updatedStatus = function (data) {
|
||||
var imageSrc = '../../Content/Images/' + data.EpisodeStatus + '.png';
|
||||
var row = $('tr.episodeId_' + data.EpisodeId);
|
||||
var row = $('[data-episode-id="' + data.EpisodeId + '"]');
|
||||
|
||||
if (row.length == 0)
|
||||
return;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
@using NzbDrone.Web.Helpers
|
||||
@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.Title</td>
|
||||
<td>@Model.AirDate</td>
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
],
|
||||
"aaSorting": [[1, 'asc']],
|
||||
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
|
||||
$(nRow).addClass(aData["SeriesId"].toString());
|
||||
$(nRow).attr('data-series-id', aData["SeriesId"].toString());
|
||||
},
|
||||
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
|
||||
var element = $(nRow).find('.progressBar');
|
||||
|
@ -214,7 +214,7 @@
|
|||
|
||||
//After we delete a series do this...
|
||||
function afterDelete(seriesId) {
|
||||
var row = $('.' + seriesId);
|
||||
var row = $('[data-series-id="' + seriesId + '"]');
|
||||
|
||||
if ($(row).hasClass('details-opened')) {
|
||||
var nextRow = $(row).next('tr');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
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>@Model.EpisodeNumbering</td>
|
||||
<td>@Model.Title</td>
|
||||
|
|
Loading…
Reference in a new issue