From 53a3d37d74a1ee19f44ad6c38c9a1dc0c805dc2b Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 6 Feb 2014 14:54:24 +0000 Subject: [PATCH] handle creating edit from items section --- static/js/utils.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/static/js/utils.js b/static/js/utils.js index ea6fee6c..dce16f60 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -14,7 +14,7 @@ pandora.addItem = function() { pandora.addEdit = function() { // addEdit(isSmart, isFrom) or addEdit(edit) [=duplicate] - pandora.addFolderItem.apply(null, ['edit'].concat(Ox.slice(arguments))); + pandora.addFolderItem.apply(null, ['edits'].concat(Ox.slice(arguments))); }; pandora.addFolderItem = function(section) { @@ -36,13 +36,16 @@ pandora.addFolderItem = function(section) { }; if (isFrom) { if (!isSmart) { - data.items = isItems - ? ui.listSelection - : ui.edits[ui.edit].selection; + data.items = isItems ? ui.listSelection + : ui.section == 'items' ? pandora.$ui.clipList.options('selected') + : ui.editSelection; } else { data.query = ui.find; } } + if (ui.section == 'items' && section == 'edits') { + pandora.UI.set({section: 'edits'}); + } addList(); } else { list = arguments[1];