1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-25 01:11:43 +00:00

Using more html5 data attributes

This commit is contained in:
Mark McDowall 2012-09-30 15:39:08 -07:00
parent 27d9592b41
commit a197316640
4 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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>

View file

@ -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');

View file

@ -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>