mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-30 19:56:54 +00:00
34 lines
No EOL
770 B
JavaScript
34 lines
No EOL
770 B
JavaScript
/* Click on row, show details */
|
|
$('.seriesTable a').live('click', function () {
|
|
var link = $(this).attr('href');
|
|
window.location = link;
|
|
event.preventDefault();
|
|
});
|
|
|
|
$('.seriesTable tr td:not(:last-child)').live('click', function () {
|
|
$(this).parent('tr').next('.detail-view').toggle();
|
|
});
|
|
|
|
function grid_onError(e) {
|
|
//Suppress the alert
|
|
e.preventDefault();
|
|
}
|
|
|
|
//Highlight rows based on a number of details
|
|
function highlightRow(e) {
|
|
var row = e.row;
|
|
var dataItem = e.dataItem;
|
|
|
|
var ignored = dataItem.Ignored;
|
|
var status = dataItem.Status;
|
|
|
|
if (ignored) {
|
|
$(row).addClass('episodeIgnored');
|
|
return;
|
|
}
|
|
|
|
if (status == "Missing") {
|
|
$(row).addClass('episodeMissing');
|
|
return;
|
|
}
|
|
} |