2012-02-05 20:17:23 +00:00
|
|
|
|
/* Click on row, show details */
|
2012-02-08 08:17:40 +00:00
|
|
|
|
$('.seriesTable a, .dataTable a').live('click', function (event) {
|
2012-02-07 06:47:02 +00:00
|
|
|
|
if ($(this).attr('onclick'))
|
|
|
|
|
return;
|
|
|
|
|
|
2012-02-06 07:47:10 +00:00
|
|
|
|
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
|
|
|
|
});
|
|
|
|
|
|
2012-02-06 22:13:33 +00:00
|
|
|
|
$('.seriesTable .data-row td:not(:last-child)').live('click', function () {
|
|
|
|
|
$(this).parent('tr').next('.detail-row').toggle();
|
2012-02-05 20:17:23 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
2012-02-08 08:17:40 +00:00
|
|
|
|
//Perform the details opening
|
|
|
|
|
var oTable;
|
2012-01-30 06:14:46 +00:00
|
|
|
|
|
2012-02-08 08:17:40 +00:00
|
|
|
|
$('.dataTable td:not(:last-child)').live('click', function () {
|
|
|
|
|
var nTr = this.parentNode;
|
2012-01-30 06:14:46 +00:00
|
|
|
|
|
2012-02-08 08:17:40 +00:00
|
|
|
|
if ($(nTr).hasClass('details-opened')) {
|
|
|
|
|
oTable.fnClose(nTr);
|
|
|
|
|
$(nTr).removeClass('details-opened');
|
2012-01-30 06:14:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
2012-02-08 08:17:40 +00:00
|
|
|
|
else {
|
|
|
|
|
oTable.fnOpen(nTr, fnFormatDetails(oTable, nTr), 'Details');
|
|
|
|
|
$(nTr).addClass('details-opened');
|
2012-01-30 06:14:46 +00:00
|
|
|
|
}
|
2012-02-08 08:17:40 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//Datatables format display details
|
|
|
|
|
function fnFormatDetails(oTable, nTr) {
|
|
|
|
|
var aData = oTable.fnGetData(nTr);
|
|
|
|
|
return aData[aData.length - 1];
|
2012-01-30 01:38:44 +00:00
|
|
|
|
}
|