stay in item view when edit makes item disappear from context

This commit is contained in:
rlx 2016-01-14 15:31:38 +05:30
parent 2ad1e64208
commit e8eefd95bf

View file

@ -92,11 +92,21 @@ oml.ui.browser = function() {
},
select: function(data) {
if (ui.item) {
oml.UI.set({
item: data.ids[0],
itemView: 'info',
listSelection: data.ids
});
if (data.ids.length) {
oml.UI.set({
item: data.ids[0],
itemView: 'info',
listSelection: data.ids
});
} else {
// no longer in context after edit
oml.stayInItemView = true;
oml.UI.set({
find: {conditions: [], operator: '&'},
listSelection: [ui.item]
});
oml.stayInItemView = false;
}
}
},
toggle: function(data) {