fix: Directly take the sharing group name from the event

Do not fetch the sharing group name as it is already included in the
event.
+ fixed a css glitch
pull/3223/head
Sami Mokaddem 2018-05-04 12:40:35 +00:00
parent 24c99d24a0
commit 9c5b05a679
2 changed files with 5 additions and 5 deletions

View File

@ -105,11 +105,11 @@
$event['Attribute'] = array();
}
$event['distribution'] = $fullevent['Event']['distribution'];
if (isset($fullevent['Event']['sharing_group_id'])) {
$sgID = $fullevent['Event']['sharing_group_id'];
$event['SharingGroupName'] = array_values($this->__eventModel->SharingGroup->fetchAllAuthorised($this->__user, "name", 1, $id = $sgID))[0];
if (isset($fullevent['SharingGroup'])) {
$event['SharingGroupName'] = $fullevent['SharingGroup']['name'];
} else {
$event['SharingGroupName'] = "";
$event['SharingGroupName'] = "?";
}
return $event;

View File

@ -314,7 +314,7 @@ $(document).ready(function() {
var distri_graph = $('#eventdistri_graph');
var distriOffset = distri_graph.offset();
var distriHeight = distri_graph.height()/2;
div.css({top: distriOffset.top+distriHeight+50+'px', left: 50+'px'});
div.css({left: '50px'});
for (var i in doughnut_dataset) {
var item = doughnut_dataset[i];
var label = $('<label></label>');