2012-02-05 20:17:23 +00:00
|
|
|
|
/* Click on row, show details */
|
2012-02-06 07:47:10 +00:00
|
|
|
|
$('.seriesTable a').live('click', function (event) {
|
|
|
|
|
event.preventDefault();
|
2012-02-05 20:17:23 +00:00
|
|
|
|
var link = $(this).attr('href');
|
|
|
|
|
window.location = link;
|
2012-02-06 07:47:10 +00:00
|
|
|
|
event.stopPropegation();
|
2012-02-05 20:17:23 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.seriesTable tr td:not(:last-child)').live('click', function () {
|
|
|
|
|
$(this).parent('tr').next('.detail-view').toggle();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function grid_onError(e) {
|
2012-01-30 01:38:44 +00:00
|
|
|
|
//Suppress the alert
|
|
|
|
|
e.preventDefault();
|
2012-01-30 06:14:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//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;
|
|
|
|
|
}
|
2012-01-30 01:38:44 +00:00
|
|
|
|
}
|