UI: set global edit settings

This commit is contained in:
rolux 2014-02-06 07:50:43 +00:00
parent ee6f442b5b
commit 98740c09c4

View file

@ -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) {