Files
ofbiz-plugins/webpos/template/shortcuts/Shortcuts.ftl
T
Jacques Le Roux 4b8d9a9aed Patches from Amardeep Singh Jhajj for "Missing UiLabels for shortcuts in webpos" https://issues.apache.org/jira/browse/OFBIZ-7144
I found missing UiLabels for shortcuts in webpos in trunk and Release 14.12, it was committed in Release 15.12 at -r1729098. I think you somehow missed to commit it in trunk and Release 14.12. Please have a look on patches attached and commit it in their respective branches.

jleroux:
I was curious about that so I checked and it's "a bit" more complicated. This is related with OFBIZ-6226 where Mridul Pathak committed in
    Trunk - r1720910
    14.12 - r1720916
    12.04 - r1720930

But there was duplicated labels so I partially reverted (only the duplicated labels) at 
Trunk - r1726529
14.12 - r1726539
12.04 - r1726540

Later I noticed r1720910 was committed in Trunk before R15.12 creation, so I reverted there also at revision: 1729098, but not partially hence the inconsistency.  But actually I should have reverted all everywhere!

Remains that Mridul and Suraj were somewhere right. Like them I don't like the names of the labels, I believe that (eg) WebPosCheckout is far better than WebPosShortcutF7. So they were partiallly wrong at OFBIZ-6226, they duplicated labels but the names would be better if they were not refering to keyboard keys numbers...

I did not take care of R12.04

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1746283 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 14:37:07 +00:00

92 lines
3.4 KiB
Plaintext

<#--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<table>
<tr>
<td>
<ol id="posShortcut"></ol>
</td>
<td>
<div id="pleaseWait" style="display:none;"> <b>${uiLabelMap.WebPosPleaseWait}</b></div>
</td>
</tr>
</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}");
WebPosHotkeys.bind("keydown", "f4", payCheck, "payCheck()", "${uiLabelMap.WebPosShortcutF4}");
WebPosHotkeys.bind("keydown", "f5", payGiftCard, "payGiftCard()", "${uiLabelMap.WebPosShortcutF5}");
WebPosHotkeys.bind("keydown", "f6", payCreditCard, "payCreditCard()", "${uiLabelMap.WebPosShortcutF6}");
WebPosHotkeys.bind("keydown", "f7", payFinish, "payFinish()", "${uiLabelMap.WebPosShortcutF7}");
WebPosHotkeys.bind("keydown", "f8", itemQuantityFocus, "itemQuantityFocus()", "${uiLabelMap.WebPosShortcutF8}");
WebPosHotkeys.bind("keydown", "f9", incrementItemQuantity, "incrementItemQuantity()", "${uiLabelMap.WebPosShortcutF9}");
WebPosHotkeys.bind("keydown", "f10", decrementItemQuantity, "decrementItemQuantity()", "${uiLabelMap.WebPosShortcutF10}");
WebPosHotkeys.bind("keydown", "f11", emptyCart, "emptyCart()", "${uiLabelMap.WebPosShortcutF11}");
WebPosHotkeys.bind("keydown", "up", keyUp, "keyUp()", "${uiLabelMap.WebPosShortcutKeyUp}");
WebPosHotkeys.bind("keydown", "down", keyDown, "keyDown()", "${uiLabelMap.WebPosShortcutKeyDown}");
updateHotKeys();
}
</script>