2012-02-05 23:17:23 +03:00
|
|
|
/* Click on row, show details */
|
2012-02-08 11:17:40 +03:00
|
|
|
$('.seriesTable a, .dataTable a').live('click', function (event) {
|
2012-02-07 09:47:02 +03:00
|
|
|
if ($(this).attr('onclick'))
|
|
|
|
return;
|
|
|
|
|
2012-02-06 10:47:10 +03:00
|
|
|
event.preventDefault();
|
2012-02-05 23:17:23 +03:00
|
|
|
var link = $(this).attr('href');
|
|
|
|
window.location = link;
|
2012-02-06 10:47:10 +03:00
|
|
|
event.stopPropegation();
|
2012-02-05 23:17:23 +03:00
|
|
|
});
|
|
|
|
|
2012-02-07 01:13:33 +03:00
|
|
|
$('.seriesTable .data-row td:not(:last-child)').live('click', function () {
|
|
|
|
$(this).parent('tr').next('.detail-row').toggle();
|
2012-02-05 23:17:23 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
function grid_onError(e) {
|
2012-01-30 04:38:44 +03:00
|
|
|
//Suppress the alert
|
|
|
|
e.preventDefault();
|
2012-01-30 09:14:46 +03:00
|
|
|
}
|
|
|
|
|
2012-02-08 11:17:40 +03:00
|
|
|
//Perform the details opening
|
|
|
|
var oTable;
|
2012-01-30 09:14:46 +03:00
|
|
|
|
2012-02-08 11:17:40 +03:00
|
|
|
$('.dataTable td:not(:last-child)').live('click', function () {
|
|
|
|
var nTr = this.parentNode;
|
2012-01-30 09:14:46 +03:00
|
|
|
|
2012-02-08 11:17:40 +03:00
|
|
|
if ($(nTr).hasClass('details-opened')) {
|
|
|
|
oTable.fnClose(nTr);
|
|
|
|
$(nTr).removeClass('details-opened');
|
2012-01-30 09:14:46 +03:00
|
|
|
}
|
|
|
|
|
2012-02-08 11:17:40 +03:00
|
|
|
else {
|
2012-02-09 03:26:34 +03:00
|
|
|
oTable.fnOpen(nTr, fnFormatDetails(nTr), 'Details');
|
2012-02-08 11:17:40 +03:00
|
|
|
$(nTr).addClass('details-opened');
|
2012-01-30 09:14:46 +03:00
|
|
|
}
|
2012-02-08 11:17:40 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
//Datatables format display details
|
2012-02-09 03:26:34 +03:00
|
|
|
function fnFormatDetails(nTr) {
|
2012-02-08 11:17:40 +03:00
|
|
|
var aData = oTable.fnGetData(nTr);
|
2012-02-09 03:26:34 +03:00
|
|
|
return aData["Details"];
|
|
|
|
}
|
|
|
|
|
|
|
|
//Create Image
|
|
|
|
function createImageAjaxLink(url, image, alt, title, classes) {
|
|
|
|
var html = "<a onclick=\"Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace });\" href=\"" + url + "\">" +
|
|
|
|
"<img class=\"" + classes + "\" src=\"" + image + "\" title=\"" + title + "\" alt=\"" + alt + "\"></a>";
|
|
|
|
|
|
|
|
return html;
|
2012-01-30 04:38:44 +03:00
|
|
|
}
|