prepare public api
This commit is contained in:
parent
507b6fed3e
commit
dd0e22a979
18 changed files with 237 additions and 94 deletions
|
|
@ -15,14 +15,21 @@ oml.UI = (function() {
|
|||
|
||||
that.reset = function() {
|
||||
var ui = oml.user.ui;
|
||||
oml.api.resetUI({}, function() {
|
||||
|
||||
function reload() {
|
||||
ui = oml.config.user.ui;
|
||||
ui._list = oml.getListState(ui.find);
|
||||
ui._filterState = oml.getFilterState(ui.find);
|
||||
ui._findState = oml.getFindState(ui.find);
|
||||
Ox.Theme(ui.theme);
|
||||
oml.$ui.appPanel.reload();
|
||||
});
|
||||
}
|
||||
if (oml.readOnly) {
|
||||
oml.localStorage('ui', oml.config.user.ui);
|
||||
reload();
|
||||
} else {
|
||||
oml.api.resetUI({}, reload);
|
||||
}
|
||||
};
|
||||
|
||||
// sets oml.user.ui.key to value
|
||||
|
|
@ -161,7 +168,11 @@ oml.UI = (function() {
|
|||
});
|
||||
});
|
||||
if (Ox.len(set)) {
|
||||
oml.api.setUI(set);
|
||||
if (oml.readOnly) {
|
||||
oml.localStorage('ui', oml.user.ui);
|
||||
} else {
|
||||
oml.api.setUI(set);
|
||||
}
|
||||
}
|
||||
if (triggerEvents) {
|
||||
Ox.forEach(trigger, function(value, key) {
|
||||
|
|
@ -182,4 +193,4 @@ oml.UI = (function() {
|
|||
|
||||
return that;
|
||||
|
||||
}());
|
||||
}());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue