From bf57c47bfe42573bf6c902af21be4cb535498dbe Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 8 Nov 2013 16:13:44 +0000 Subject: [PATCH] fix adding text via main menu --- static/js/mainMenu.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index 9e88bf39..ca82ac89 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -347,9 +347,17 @@ pandora.ui.mainMenu = function() { } else if ([ 'newlist', 'newlistfromselection', 'newsmartlist', 'newsmartlistfromresults' ].indexOf(data.id) > -1) { - pandora.addList(data.id.indexOf('smart') > -1, data.id.indexOf('from') > -1); + if (ui.section == 'texts') { + pandora.addText({type: 'text'}); + } else { + pandora.addList(data.id.indexOf('smart') > -1, data.id.indexOf('from') > -1); + } } else if (data.id == 'duplicatelist') { - pandora.addList(ui._list); + if (ui.section == 'texts') { + pandora.addText({type: 'text'}); + } else { + pandora.addList(ui._list); + } } else if (data.id == 'editlist') { pandora.ui.listDialog().open(); } else if (data.id == 'add') {