From c0e85fdbe8c8d4bf132a6acdda338698fb724554 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 11 Feb 2013 16:47:12 +0530 Subject: [PATCH] in UI, only set item to '' on find change if we're not dealing with a context change via item edit --- static/js/pandora/UI.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/static/js/pandora/UI.js b/static/js/pandora/UI.js index 76502efc1..b9e3b68f2 100644 --- a/static/js/pandora/UI.js +++ b/static/js/pandora/UI.js @@ -64,9 +64,9 @@ pandora.UI = (function() { pandora.user.ui._list = list; pandora.user.ui._filterState = pandora.getFilterState(args.find); pandora.user.ui._findState = pandora.getFindState(args.find); - if (pandora.$ui.appPanel) { - // if we're not on page load, - // switch from item view to list view + if (pandora.$ui.appPanel && !pandora.stayInItemView) { + // if we're not on page load, and if find isn't a context change + // caused by an edit, then switch from item view to list view args['item'] = ''; } if (list != self.previousUI._list) { @@ -179,6 +179,7 @@ pandora.UI = (function() { }); Ox.len(set) && pandora.api.setUI(set); triggerEvents && Ox.forEach(trigger, function(val, key) { + Ox.Log('UI', 'TRIGGER ' + key + ' ' + val); Ox.forEach(pandora.$ui, function(element) { Ox.UI.isElement(element) && element.triggerEvent('pandora_' + key.toLowerCase(), { value: val,