UI: set global edit settings
This commit is contained in:
parent
ee6f442b5b
commit
98740c09c4
1 changed files with 13 additions and 0 deletions
|
@ -182,6 +182,19 @@ pandora.UI = (function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ox.forEach({
|
||||||
|
editSelection: 'selection',
|
||||||
|
editSort: 'sort',
|
||||||
|
editView: 'view'
|
||||||
|
}, function(editSetting, setting) {
|
||||||
|
var key = 'edits.' + that.encode(pandora.user.ui.edit) + '.' + editSetting;
|
||||||
|
if (setting in args) {
|
||||||
|
add[key] = args[setting];
|
||||||
|
} else if (setting in add) {
|
||||||
|
add[key] == add[setting];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// items in args trigger events, items in add do not
|
// items in args trigger events, items in add do not
|
||||||
[args, add].forEach(function(obj, isAdd) {
|
[args, add].forEach(function(obj, isAdd) {
|
||||||
Ox.forEach(obj, function(val, key) {
|
Ox.forEach(obj, function(val, key) {
|
||||||
|
|
Loading…
Reference in a new issue