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,11 +235,15 @@ 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 (ui.section == 'items') {
if (data.checked) { if (data.checked) {
pandora.UI.set({find: {conditions: [], operator: '&'}}); pandora.UI.set({find: {conditions: [], operator: '&'}});
} else { } else {
that.checkItem('allitems'); that.checkItem('allitems');
} }
} else {
pandora.UI.set(ui.section.slice(0, -1), '');
}
} else if (data.id == 'cliporder') { } else if (data.id == 'cliporder') {
if (!ui.item) { if (!ui.item) {
pandora.UI.set({listSort: [{key: ui.listSort[0].key, operator: value == 'ascending' ? '+' : '-'}]}); pandora.UI.set({listSort: [{key: ui.listSort[0].key, operator: value == 'ascending' ? '+' : '-'}]});
@ -586,9 +590,17 @@ pandora.ui.mainMenu = function() {
} }
}, },
key_control_shift_w: function() { key_control_shift_w: function() {
if (!pandora.hasDialogOrScreen() || (ui.item || ui._list)) { if (!pandora.hasDialogOrScreen()) {
if (ui.section == 'items') {
if (ui.item) {
pandora.UI.set({item: ''});
} else if (ui._list) {
pandora.UI.set({find: {conditions: [], operator: '&'}}); 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() {
pandora.redoHistory(); pandora.redoHistory();
@ -605,18 +617,12 @@ 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: ''});
}
} }
}, },
key_control_z: function() { key_control_z: function() {