fix: changed "xhtml:body" into "xhtml:div", to avoid creating a body DOM

which cause listener on the original body to bug. Incremented js number
and check if request is ajax or not in ObjectController
pull/3174/head
Sami Mokaddem 2018-04-23 07:35:52 +00:00
parent 5d496ecb6f
commit c7496c67ca
5 changed files with 6 additions and 7 deletions

View File

@ -46,7 +46,7 @@ class AppController extends Controller {
public $helpers = array('Utility', 'OrgImg');
private $__queryVersion = '34';
private $__queryVersion = '35';
public $pyMispVersion = '2.4.89';
public $phpmin = '5.6.5';
public $phprec = '7.0.16';

View File

@ -208,7 +208,7 @@ class ObjectsController extends AppController {
$distributionData = $this->MispObject->Event->Attribute->fetchDistributionData($this->Auth->user());
$this->set('distributionData', $distributionData);
$this->set('event', $event);
$this->set('ajax', false);
$this->set('ajax', $this->request->is('ajax'));
$this->set('action', 'add');
$this->set('template', $template);
}

View File

@ -410,7 +410,7 @@ $(document).ready(function () {
});
function enable_correlation_graph() {
$.get("/events/viewGraph/10/<?php echo h($event['Event']['id']); ?>", function(data) {
$.get("/events/viewGraph/<?php echo h($event['Event']['id']); ?>", function(data) {
$("#correlationgraph_div").html(data);
});
}

View File

@ -90,7 +90,7 @@ class ContextualMenu {
__toggleMenu(x, y, hide) {
var that = this;
if(this.__is_shown || hide) {
that.menu.style.visibility = 'hidden';
this.menu.style.visibility = 'hidden';
} else {
this.menu.style.left = x+'px';
this.menu.style.top = y+'px';
@ -138,7 +138,7 @@ class ContextualMenu {
container: 'body',
html: true,
placement: "bottom",
content: function () {return $(that.menu); }, // return contextual menu htlm
content: function () {return $(that.menu); }, // return contextual menu html
trigger: "manual",
template: '<div class="popover" id="popover-contextual-menu-'+this.trigger_container.id+'" role="tooltip" style="'+additional_styling+'"><div class="arrow"></div></h3><div class="popover-content"></div></div>'
})

View File

@ -1,5 +1,4 @@
$(document).ready( function() {
var currentMousePos = { x: -1, y: -1 };
$(document).mousemove(function(event) {
currentMousePos.x = event.pageX;
@ -182,7 +181,7 @@ $(document).ready( function() {
}
}
)
.append("xhtml:body")
.append("xhtml:div")
.html(function (d) {
var result = 'fa-' + d.imgClass;
if (d.type == 'galaxy' || d.type == 'tag') result = 'fa-2x ' + result;