update number of list items
This commit is contained in:
parent
f5fb255e20
commit
d3c8cdb572
2 changed files with 9 additions and 4 deletions
|
@ -62,7 +62,7 @@ oml.ui.gridView = function() {
|
||||||
],
|
],
|
||||||
selected: ui.listSelection,
|
selected: ui.listSelection,
|
||||||
size: 128,
|
size: 128,
|
||||||
sort: ui.listSort,
|
sort: Ox.clone(ui.listSort, true),
|
||||||
unique: 'id'
|
unique: 'id'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
@ -79,4 +79,4 @@ oml.ui.gridView = function() {
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -113,10 +113,15 @@ oml.ui.list = function() {
|
||||||
},
|
},
|
||||||
oml_find: function() {
|
oml_find: function() {
|
||||||
if (ui.listView == oml.UI.getPrevious().listView) {
|
if (ui.listView == oml.UI.getPrevious().listView) {
|
||||||
if (ui.listSort == oml.UI.getPrevious().listSort) {
|
if (JSON.stringify(ui.listSort) == JSON.stringify(oml.UI.getPrevious().listSort)) {
|
||||||
that.reloadList();
|
that.reloadList();
|
||||||
} else {
|
} else {
|
||||||
that.options({sort: ui.listSort});
|
//fixme: this reloads list twice.
|
||||||
|
//just setting sort will not update number of items
|
||||||
|
that.options({
|
||||||
|
sort: Ox.clone(ui.listSort, true)
|
||||||
|
});
|
||||||
|
that.reloadList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue