mirror of https://github.com/MISP/MISP
fix: [events:eventTimeline] Correctly restore elements after changing context or group
- Fix #6885pull/6916/head
parent
c6d3b5f0dd
commit
1ee6cf34ad
|
@ -459,13 +459,12 @@ function reload_timeline() {
|
||||||
}
|
}
|
||||||
adjust_text_length(item);
|
adjust_text_length(item);
|
||||||
}
|
}
|
||||||
itemIds[item.attribute_id] = item.content;
|
|
||||||
if (selectedScope == 'sightings') {
|
if (selectedScope == 'sightings') {
|
||||||
|
itemIds[item.attribute_id] = item.content;
|
||||||
item.group = item.attribute_id;
|
item.group = item.attribute_id;
|
||||||
item.content = '';
|
item.content = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
items_timeline.add(data.items);
|
|
||||||
handle_not_seen_enabled($('#checkbox_timeline_display_hide_not_seen_enabled').prop('checked'), false)
|
handle_not_seen_enabled($('#checkbox_timeline_display_hide_not_seen_enabled').prop('checked'), false)
|
||||||
if (selectedScope == 'sightings') {
|
if (selectedScope == 'sightings') {
|
||||||
var groups = Object.keys(itemIds).map(function(id) {
|
var groups = Object.keys(itemIds).map(function(id) {
|
||||||
|
@ -475,8 +474,9 @@ function reload_timeline() {
|
||||||
eventTimeline.setOptions({selectable: false});
|
eventTimeline.setOptions({selectable: false});
|
||||||
} else {
|
} else {
|
||||||
eventTimeline.setOptions({selectable: true});
|
eventTimeline.setOptions({selectable: true});
|
||||||
eventTimeline.setGroups([]);
|
eventTimeline.setGroups(null);
|
||||||
}
|
}
|
||||||
|
items_timeline.add(data.items);
|
||||||
},
|
},
|
||||||
error: function( jqXhr, textStatus, errorThrown ){
|
error: function( jqXhr, textStatus, errorThrown ){
|
||||||
console.log( errorThrown );
|
console.log( errorThrown );
|
||||||
|
|
Loading…
Reference in New Issue