stay in item view when edit makes item disappear from context
This commit is contained in:
parent
2ad1e64208
commit
e8eefd95bf
1 changed files with 15 additions and 5 deletions
|
@ -92,11 +92,21 @@ oml.ui.browser = function() {
|
||||||
},
|
},
|
||||||
select: function(data) {
|
select: function(data) {
|
||||||
if (ui.item) {
|
if (ui.item) {
|
||||||
oml.UI.set({
|
if (data.ids.length) {
|
||||||
item: data.ids[0],
|
oml.UI.set({
|
||||||
itemView: 'info',
|
item: data.ids[0],
|
||||||
listSelection: data.ids
|
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) {
|
toggle: function(data) {
|
||||||
|
|
Loading…
Reference in a new issue