fix #2281 (All Edits / All Texts main menu entries do not work)

This commit is contained in:
rolux 2014-02-12 15:19:18 +00:00
parent b89e145660
commit 41d7da0b47

View file

@ -235,10 +235,14 @@ pandora.ui.mainMenu = function() {
change: function(data) { change: function(data) {
var value = data.checked[0] ? data.checked[0].id : null; var value = data.checked[0] ? data.checked[0].id : null;
if (data.id == 'allitems') { if (data.id == 'allitems') {
if (data.checked) { if (ui.section == 'items') {
pandora.UI.set({find: {conditions: [], operator: '&'}}); if (data.checked) {
pandora.UI.set({find: {conditions: [], operator: '&'}});
} else {
that.checkItem('allitems');
}
} else { } else {
that.checkItem('allitems'); pandora.UI.set(ui.section.slice(0, -1), '');
} }
} else if (data.id == 'cliporder') { } else if (data.id == 'cliporder') {
if (!ui.item) { if (!ui.item) {
@ -586,8 +590,16 @@ pandora.ui.mainMenu = function() {
} }
}, },
key_control_shift_w: function() { key_control_shift_w: function() {
if (!pandora.hasDialogOrScreen() || (ui.item || ui._list)) { if (!pandora.hasDialogOrScreen()) {
pandora.UI.set({find: {conditions: [], operator: '&'}}); 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() { key_control_shift_z: function() {
@ -605,17 +617,11 @@ pandora.ui.mainMenu = function() {
} }
}, },
key_control_w: function() { key_control_w: function() {
if (!pandora.hasDialogOrScreen()) { if (!pandora.hasDialogOrScreen() && ui.section == 'items') {
if (ui.section == 'items') { if (ui.item) {
if (ui.item) { pandora.UI.set({item: ''});
pandora.UI.set({item: ''}); } else if (ui._list) {
} else if (ui._list) { pandora.UI.set({find: {conditions: [], operator: '&'}});
pandora.UI.set({find: {conditions: [], operator: '&'}});
}
} else if (ui.section == 'edits') {
pandora.UI.set({edit: ''});
} else if (ui.section == 'texts') {
pandora.UI.set({text: ''});
} }
} }
}, },