use site defaults if list setting is undefined, save per list columnWidth
This commit is contained in:
parent
8b97cd5bd7
commit
77270873e6
1 changed files with 12 additions and 1 deletions
|
@ -83,7 +83,8 @@ pandora.UI = (function() {
|
||||||
// if find has changed list
|
// if find has changed list
|
||||||
Ox.forEach(listSettings, function(listSetting, setting) {
|
Ox.forEach(listSettings, function(listSetting, setting) {
|
||||||
// then for each setting that corresponds to a list setting
|
// then for each setting that corresponds to a list setting
|
||||||
if (!pandora.user.ui.lists[list]) {
|
if (!pandora.user.ui.lists[list]
|
||||||
|
|| Ox.isUndefined(pandora.user.ui.lists[list][listSetting])) {
|
||||||
// either add the default setting
|
// either add the default setting
|
||||||
add[setting] = pandora.site.user.ui[setting];
|
add[setting] = pandora.site.user.ui[setting];
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,6 +132,16 @@ pandora.UI = (function() {
|
||||||
add[key] = pandora.site.user.ui[setting];
|
add[key] = pandora.site.user.ui[setting];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// set nested lisColumnWidth updates
|
||||||
|
Ox.forEach(args, function(value, key) {
|
||||||
|
if (Ox.startsWith(key, 'listColumnWidth.')) {
|
||||||
|
key = 'lists.' + that.encode(list) + '.columnWidth.'
|
||||||
|
+ key.slice('listColumnWidth.'.length);
|
||||||
|
if (!(key in add)) {
|
||||||
|
add[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (args.item) {
|
if (args.item) {
|
||||||
// when switching to an item, update list selection
|
// when switching to an item, update list selection
|
||||||
|
|
Loading…
Reference in a new issue