Disabled search shortcut when in edit mode

This commit is contained in:
Giulio Cesare Solaroli 2015-02-03 18:24:49 +01:00
parent 34bf41228d
commit 9dec5ece43

View File

@ -1506,9 +1506,13 @@ console.log("THE BROWSER IS OFFLINE");
focusOnSearch: function (anEvent) {
anEvent.preventDefault();
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'toggleSelectionPanel');
MochiKit.DOM.getElement('searchValue').focus();
MochiKit.DOM.getElement('searchValue').select();
if (this.pages()[this.currentPage()].props['mode'] == 'edit') {
// pass
} else {
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'toggleSelectionPanel');
MochiKit.DOM.getElement('searchValue').focus();
MochiKit.DOM.getElement('searchValue').select();
}
},
exitSearch_handler: function (anEvent) {