mirror of https://github.com/MISP/MISP
chg: [UI] Move `.sightings_advanced_add` handler to misp.js
parent
11d41c01d1
commit
34e17d276c
|
@ -321,21 +321,6 @@ echo $this->element('/genericElements/SideMenu/side_menu', ['menuList' => 'event
|
|||
hide: 100
|
||||
}
|
||||
});
|
||||
$('.sightings_advanced_add').click(function() {
|
||||
var selected = [];
|
||||
var object_context = $(this).data('object-context');
|
||||
var object_id = $(this).data('object-id');
|
||||
if (object_id == 'selected') {
|
||||
$(".select_attribute").each(function() {
|
||||
if ($(this).is(":checked")) {
|
||||
selected.push($(this).data("id"));
|
||||
}
|
||||
});
|
||||
object_id = selected.join('|');
|
||||
}
|
||||
url = "<?php echo $baseurl; ?>" + "/sightings/advanced/" + object_id + "/" + object_context;
|
||||
genericPopup(url, '#popover_box');
|
||||
});
|
||||
popoverStartup();
|
||||
$(document).on('click', function(e) {
|
||||
//did not click a popover toggle or popover
|
||||
|
|
|
@ -232,19 +232,6 @@ attributes or the appropriate distribution level. If you think there is a mistak
|
|||
attributeListAnyAttributeCheckBoxesChecked();
|
||||
attributeListAnyProposalCheckBoxesChecked();
|
||||
});
|
||||
$('.sightings_advanced_add').click(function() {
|
||||
var selected = [];
|
||||
var object_context = $(this).data('object-context');
|
||||
var object_id = $(this).data('object-id');
|
||||
if (object_id === 'selected') {
|
||||
$(".select_attribute:checked").each(function() {
|
||||
selected.push($(this).data("id"));
|
||||
});
|
||||
object_id = selected.join('|');
|
||||
}
|
||||
var url = "<?php echo $baseurl; ?>" + "/sightings/advanced/" + object_id + "/" + object_context;
|
||||
genericPopup(url, '#popover_box');
|
||||
});
|
||||
});
|
||||
$('.searchFilterButton, #quickFilterButton').click(function() {
|
||||
filterAttributes('value');
|
||||
|
|
|
@ -657,6 +657,20 @@ function submitForm($td, type, id, field) {
|
|||
var field = $(this).data('edit-field');
|
||||
quickEditHover(this, type, objectId, field);
|
||||
});
|
||||
// Show popover with advanced sigtings information about given or selected attributes
|
||||
$(document.body).on('click', '.sightings_advanced_add', function() {
|
||||
var object_context = $(this).data('object-context');
|
||||
var object_id = $(this).data('object-id');
|
||||
if (object_id === 'selected') {
|
||||
var selected = [];
|
||||
$(".select_attribute:checked").each(function() {
|
||||
selected.push($(this).data("id"));
|
||||
});
|
||||
object_id = selected.join('|');
|
||||
}
|
||||
var url = baseurl + "/sightings/advanced/" + object_id + "/" + object_context;
|
||||
genericPopup(url, '#popover_box');
|
||||
});
|
||||
})();
|
||||
|
||||
function quickSubmitTagForm(selected_tag_ids, addData) {
|
||||
|
|
Loading…
Reference in New Issue