mirror of https://github.com/MISP/MISP
fix: [event:timeline] Error when trying to restore non-existing backup
entriespull/4743/head
parent
7d74408bdf
commit
93cea354ba
|
@ -26,6 +26,7 @@
|
|||
.contextual-menu > label {
|
||||
font-weight: bold;
|
||||
margin-right: 3px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.contextual-menu > div > label {
|
||||
|
|
|
@ -377,7 +377,7 @@ function reload_timeline() {
|
|||
}
|
||||
}
|
||||
items_timeline.add(data.items);
|
||||
handle_not_seen_enabled($('#checkbox_timeline_display_hide_not_seen_enabled').val())
|
||||
handle_not_seen_enabled($('#checkbox_timeline_display_hide_not_seen_enabled').prop('checked'), false)
|
||||
},
|
||||
error: function( jqXhr, textStatus, errorThrown ){
|
||||
console.log( errorThrown );
|
||||
|
@ -487,7 +487,8 @@ function handle_doubleClick(data) {
|
|||
//edit_item(data.item);
|
||||
}
|
||||
|
||||
function handle_not_seen_enabled(hide) {
|
||||
function handle_not_seen_enabled(hide, include_hidden) {
|
||||
include_hidden = include_hidden !== undefined ? include_hidden : true;
|
||||
if (hide) {
|
||||
var hidden = items_timeline.get({
|
||||
filter: function(item) {
|
||||
|
@ -500,8 +501,10 @@ function handle_not_seen_enabled(hide) {
|
|||
});
|
||||
items_timeline.remove(hidden)
|
||||
items_backup = hidden;
|
||||
} else {
|
||||
items_timeline.add(items_backup);
|
||||
} else if (include_hidden) {
|
||||
if (items_backup !== undefined) {
|
||||
items_timeline.add(items_backup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue