From 94996ddb8604251c1ce25d63d1d3d0b6ffbce9c5 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 2 Aug 2013 17:53:09 +0000 Subject: [PATCH] fix select via menu --- static/js/mainMenu.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index 3f5ba260..520e500b 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -356,11 +356,13 @@ pandora.ui.mainMenu = function() { pandora.UI.set({'part.tv': ui._list}); pandora.UI.set({page: 'tv'}); } else if (data.id == 'selectall') { - pandora.$ui.list.selectAll(); + pandora.$ui[!ui.item ? 'list' : 'clipList'].selectAll(); } else if (data.id == 'selectnone') { - pandora.UI.set({listSelection: []}); + !ui.item + ? pandora.UI.set({listSelection: []}) + : pandora.$ui.clipList.options({selected: []}); } else if (data.id == 'invertselection') { - pandora.$ui.list.invertSelection(); + pandora.$ui[!ui.item ? 'list' : 'clipList'].invertSelection(); } else if (data.id == 'cut' || data.id == 'cutadd') { var action = data.id == 'cut' ? 'copy' : 'add'; fromMenu = true; @@ -821,7 +823,7 @@ pandora.ui.mainMenu = function() { : clipboardType == 'clip' ? (clipboardItems == 1 ? 'Clip' : 'Clips') : '' ), - canSelect = ui.section != 'texts' && !ui.item, + canSelect = !ui.item || isClipView, canCopy = isVideoView ? ui.videoPoints[ui.item]['in'] != ui.videoPoints[ui.item].out : isClipView ? pandora.$ui.clipList.options('selected').length : !!ui.listSelection.length,