mirror of https://github.com/MISP/MISP
chg: Fixed LGTM JavaScript analysis alerts
parent
8a710ea367
commit
365dbfd2c6
|
@ -85,7 +85,7 @@
|
|||
var clusterId = selected.selected;
|
||||
clusterId = clusterId === undefined ? selected.deselected : clusterId;
|
||||
if (clusterId !== undefined) {
|
||||
$option = $('td[data-cluster-id="' + clusterId + '"]');
|
||||
var $option = $('td[data-cluster-id="' + clusterId + '"]');
|
||||
pickCell($option, clusterId, false);
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +276,7 @@
|
|||
function pickCell(cell, clusterId, recurseChosen) {
|
||||
recurseChosen = recurseChosen === undefined ? true : recurseChosen;
|
||||
|
||||
$cells = $('td[data-cluster-id="' + clusterId + '"]');
|
||||
var $cells = $('td[data-cluster-id="' + clusterId + '"]');
|
||||
if (!cell.hasClass('cell-picked')) {
|
||||
pickedGalaxies.push(clusterId);
|
||||
$cells.addClass('cell-picked');
|
||||
|
@ -288,7 +288,7 @@
|
|||
$cells.removeClass('cell-picked');
|
||||
}
|
||||
|
||||
$select = $('#attack-matrix-chosen-select');
|
||||
var $select = $('#attack-matrix-chosen-select');
|
||||
if (recurseChosen) {
|
||||
$select.val(pickedGalaxies).trigger('chosen:updated');
|
||||
}
|
||||
|
|
|
@ -1409,7 +1409,7 @@ function openPopup(id) {
|
|||
|
||||
function openPopover(clicked, data) {
|
||||
/* popup handling */
|
||||
$clicked = $(clicked);
|
||||
var $clicked = $(clicked);
|
||||
var randomId = Math.random().toString(36).substr(2,9); // used to recover the button that triggered the popover (so that we can destroy the popover)
|
||||
var loadingHtml = '<div style="height: 75px; width: 75px;"><div class="spinner"></div><div class="loadingText">Loading</div></div>';
|
||||
$clicked.attr('data-dismissid', randomId);
|
||||
|
@ -1437,7 +1437,7 @@ function openPopover(clicked, data) {
|
|||
popover.css('top', (top-17) + 'px');
|
||||
}
|
||||
var popoverTitle = popover.find('h3.popover-title');
|
||||
var origTitle = popoverTitle.html(title + closeButtonHtml);
|
||||
popoverTitle.html(title + closeButtonHtml);
|
||||
})
|
||||
.popover('show');
|
||||
} else {
|
||||
|
@ -1540,8 +1540,8 @@ function popoverConfirm(clicked) {
|
|||
}
|
||||
|
||||
function submitPopover(clicked) {
|
||||
$clicked = $(clicked);
|
||||
$form = $clicked.closest('form');
|
||||
var $clicked = $(clicked);
|
||||
var $form = $clicked.closest('form');
|
||||
if ($form.length === 0) { // popover container is body, submit from original node
|
||||
var dismissid = $clicked.closest('div.popover').attr('data-dismissid');
|
||||
$form = $('[data-dismissid="' + dismissid + '"]').closest('form');
|
||||
|
|
Loading…
Reference in New Issue