From e876d492516f1de91093c60338a38623bef3d809 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 25 Feb 2013 15:48:27 +0530 Subject: [PATCH] add pandora.addItem method --- static/js/pandora/utils.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index cd0c664b..f2b15ed5 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -2,6 +2,15 @@ 'use strict'; +pandora.addItem = function() { + pandora.api.add(function(result) { + pandora.UI.set({ + item: result.data.id, + itemView: 'info' + }); + }); +}; + pandora.addList = function() { // addList(isSmart, isFrom) or addList(list) [=duplicate] var $folderList = pandora.$ui.folderList.personal, @@ -64,7 +73,7 @@ pandora.addList = function() { } }); } else { - addList() + addList(); } }); }