You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2015/03/21 15:57:16 UTC
svn commit: r1668290 - in
/ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos:
images/js/WebPosHotkeys.js shortcuts/Shortcuts.ftl
Author: mridulpathak
Date: Sat Mar 21 14:57:15 2015
New Revision: 1668290
URL: http://svn.apache.org/r1668290
Log:
[OFBIZ-5588] Error while pressing F9 (change quantity) in webpos. Thanks Hoan Dang Van for reporting the issue and pointing towards the possible solution. Applying fix from trunk r1668279.
Modified:
ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/images/js/WebPosHotkeys.js
ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl
Modified: ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/images/js/WebPosHotkeys.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/images/js/WebPosHotkeys.js?rev=1668290&r1=1668289&r2=1668290&view=diff
==============================================================================
--- ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/images/js/WebPosHotkeys.js (original)
+++ ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/images/js/WebPosHotkeys.js Sat Mar 21 14:57:15 2015
@@ -4,6 +4,5 @@ WebPosHotkeys = {
bind: function (type, data, fnCode, fn, label) {
var arr = [type, data, fnCode, fn, label];
this.hotkeys.push(arr);
- $(document).bind(type, data, fnCode);
}
}
\ No newline at end of file
Modified: ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl?rev=1668290&r1=1668289&r2=1668290&view=diff
==============================================================================
--- ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl (original)
+++ ofbiz/branches/release14.12/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl Sat Mar 21 14:57:15 2015
@@ -28,6 +28,52 @@ under the License.
</table>
<script type="text/javascript">
function activateHotKeys() {
+ $(document).keydown(function(e){
+ switch (e.keyCode) {
+ case 112:
+ productToSearchFocus();
+ break;
+ case 113:
+ partyToSearchFocus();
+ break;
+ case 114:
+ payCash();
+ break;
+ case 115:
+ payCheck();
+ break;
+ case 116:
+ payGiftCard();
+ break;
+ case 117:
+ payCreditCard();
+ break;
+ case 118:
+ payFinish();
+ break;
+ case 119:
+ itemQuantityFocus();
+ break;
+ case 120:
+ incrementItemQuantity();
+ break;
+ case 121:
+ decrementItemQuantity();
+ break;
+ case 122:
+ emptyCart();
+ break;
+ case 38:
+ keyUp();
+ break;
+ case 40:
+ keyDown();
+ break;
+ default: return;
+ }
+ e.preventDefault();
+ return false;
+ });
WebPosHotkeys.bind("keydown", "f1", productToSearchFocus, "productToSearchFocus()", "${uiLabelMap.WebPosShortcutF1}");
WebPosHotkeys.bind("keydown", "f2", partyToSearchFocus, "partyToSearchFocus()", "${uiLabelMap.WebPosShortcutF2}");
WebPosHotkeys.bind("keydown", "f3", payCash, "payCash()", "${uiLabelMap.WebPosShortcutF3}");