From 41d7da0b47cf0dfa264f45c12d9041a5a0775405 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 12 Feb 2014 15:19:18 +0000 Subject: [PATCH] fix #2281 (All Edits / All Texts main menu entries do not work) --- static/js/mainMenu.js | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index d697267a5..2705c3eca 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -235,10 +235,14 @@ pandora.ui.mainMenu = function() { change: function(data) { var value = data.checked[0] ? data.checked[0].id : null; if (data.id == 'allitems') { - if (data.checked) { - pandora.UI.set({find: {conditions: [], operator: '&'}}); + if (ui.section == 'items') { + if (data.checked) { + pandora.UI.set({find: {conditions: [], operator: '&'}}); + } else { + that.checkItem('allitems'); + } } else { - that.checkItem('allitems'); + pandora.UI.set(ui.section.slice(0, -1), ''); } } else if (data.id == 'cliporder') { if (!ui.item) { @@ -586,8 +590,16 @@ pandora.ui.mainMenu = function() { } }, key_control_shift_w: function() { - if (!pandora.hasDialogOrScreen() || (ui.item || ui._list)) { - pandora.UI.set({find: {conditions: [], operator: '&'}}); + if (!pandora.hasDialogOrScreen()) { + if (ui.section == 'items') { + if (ui.item) { + pandora.UI.set({item: ''}); + } else if (ui._list) { + pandora.UI.set({find: {conditions: [], operator: '&'}}); + } + } else { + pandora.UI.set(ui.section.slice(0, -1), ''); + } } }, key_control_shift_z: function() { @@ -605,17 +617,11 @@ pandora.ui.mainMenu = function() { } }, key_control_w: function() { - if (!pandora.hasDialogOrScreen()) { - if (ui.section == 'items') { - if (ui.item) { - pandora.UI.set({item: ''}); - } else if (ui._list) { - pandora.UI.set({find: {conditions: [], operator: '&'}}); - } - } else if (ui.section == 'edits') { - pandora.UI.set({edit: ''}); - } else if (ui.section == 'texts') { - pandora.UI.set({text: ''}); + if (!pandora.hasDialogOrScreen() && ui.section == 'items') { + if (ui.item) { + pandora.UI.set({item: ''}); + } else if (ui._list) { + pandora.UI.set({find: {conditions: [], operator: '&'}}); } } },