diff --git a/web/skins/classic/views/js/events.js b/web/skins/classic/views/js/events.js index ac985e520..e125cd0e8 100644 --- a/web/skins/classic/views/js/events.js +++ b/web/skins/classic/views/js/events.js @@ -61,8 +61,7 @@ function processRows(rows) { if ( canEdit.Monitors ) row.Monitor = '' + row.Monitor + ''; if ( canEdit.Events ) row.Cause = '' + row.Cause + ''; if ( row.Notes.indexOf('detected:') >= 0 ) { - // href is set to '##' here to prevent the page from scrolling to the top when the modal is opened - row.Cause = row.Cause + '
' + row.Notes + '
'; + row.Cause = row.Cause + '
' + row.Notes + '
'; } else if ( row.Notes != 'Forced Web: ' ) { row.Cause = row.Cause + '
' + row.Notes + '
'; } @@ -142,9 +141,7 @@ function getEventDetailModal(eid) { .fail(logAjaxFail); } -function objdetectModal( element ) { - var eid = element.getAttribute('data-event-id'); - +function getObjdetectModal(eid) { $j.getJSON(thisUrl + '?request=modal&modal=objdetect&eid=' + eid) .done(function(data) { insertModalHtml('objdetectModal', data.html); @@ -315,8 +312,13 @@ function initPage() { // Update table links each time after new data is loaded table.on('post-body.bs.table', function(data) { - // Object detection inserts data-onclick-this links after DOM has loaded - dataOnClickThis(); + // Manage the Object Detection links in the events list + $j(".objDetectLink").click(function(evt) { + evt.preventDefault(); + var eid = $j(this).data('eid'); + getObjdetectModal(eid); + }); + // Manage the eventdetail links in the events list $j(".eDetailLink").click(function(evt) { evt.preventDefault();