From 0069fa3f74435e94db90329e6cd26ac156da6b7c Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 6 Feb 2014 09:28:36 +0000 Subject: [PATCH] fix UI controller --- static/js/UI.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/UI.js b/static/js/UI.js index 8e33f4505..ccb9779e3 100644 --- a/static/js/UI.js +++ b/static/js/UI.js @@ -164,11 +164,11 @@ pandora.UI = (function() { } if (args.edit) { - add['edits.' + that.encode(args.edit)] = Ox.map(editSettings, function(value, key) { + Ox.forEach(editSettings, function(value, key) { var editsKey = 'edits.' + that.encode(args.edit) + '.' + key; - return editsKey in args ? args[editsKey] + add[editsKey] = editsKey in args ? args[editsKey] : pandora.user.ui.edits[args.edit] ? pandora.user.ui.edits[args.edit][key] - : value; + : valuel }); } if (args.text) { @@ -187,7 +187,7 @@ pandora.UI = (function() { editSort: 'sort', editView: 'view' }, function(editSetting, setting) { - var key = 'edits.' + that.encode(pandora.user.ui.edit) + '.' + editSetting; + var key = 'edits.' + that.encode(args.edit || pandora.user.ui.edit) + '.' + editSetting; if (setting in args) { add[key] = args[setting]; } else if (setting in add) {