fix: [events:eventTimeline] Correctly restore elements after changing context or group

- Fix #6885
pull/6916/head
mokaddem 2021-01-25 13:42:05 +01:00
parent c6d3b5f0dd
commit 1ee6cf34ad
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 3 deletions

View File

@ -459,13 +459,12 @@ function reload_timeline() {
}
adjust_text_length(item);
}
itemIds[item.attribute_id] = item.content;
if (selectedScope == 'sightings') {
itemIds[item.attribute_id] = item.content;
item.group = item.attribute_id;
item.content = '';
}
}
items_timeline.add(data.items);
handle_not_seen_enabled($('#checkbox_timeline_display_hide_not_seen_enabled').prop('checked'), false)
if (selectedScope == 'sightings') {
var groups = Object.keys(itemIds).map(function(id) {
@ -475,8 +474,9 @@ function reload_timeline() {
eventTimeline.setOptions({selectable: false});
} else {
eventTimeline.setOptions({selectable: true});
eventTimeline.setGroups([]);
eventTimeline.setGroups(null);
}
items_timeline.add(data.items);
},
error: function( jqXhr, textStatus, errorThrown ){
console.log( errorThrown );