From 98740c09c48518181f242d17b3ae5c8224dff8a8 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 6 Feb 2014 07:50:43 +0000 Subject: [PATCH] UI: set global edit settings --- static/js/UI.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/static/js/UI.js b/static/js/UI.js index 519d800ab..8e33f4505 100644 --- a/static/js/UI.js +++ b/static/js/UI.js @@ -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 [args, add].forEach(function(obj, isAdd) { Ox.forEach(obj, function(val, key) {