From d06e2b146caa8f75cbead85fe45f2b7fff384537 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Thu, 15 Oct 2009 09:19:40 +0000 Subject: [PATCH] New swipWithCard property in parameters.properties, only used in ClientProfile.java for card number field for now + * Suppress serial warning * Better French translation * replace ShowKeyboardInSaveSale by showKeyboardInSaveSale in Java code git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@825444 13f79535-47bb-0310-9956-ffa450edef68 --- pos/config/PosUiLabels.xml | 2 +- pos/config/parameters.properties | 7 +++++-- pos/src/org/ofbiz/pos/screen/ClientProfile.java | 11 ++++++----- pos/src/org/ofbiz/pos/screen/PaidInOut.java | 4 ++-- pos/src/org/ofbiz/pos/screen/SaveSale.java | 4 ++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/pos/config/PosUiLabels.xml b/pos/config/PosUiLabels.xml index 736e1377d..de1857788 100644 --- a/pos/config/PosUiLabels.xml +++ b/pos/config/PosUiLabels.xml @@ -98,7 +98,7 @@ Enter Card Number: Ingrese número de tarjeta : - Entrez le n° de la carte : + Entrez le n° de carte : Inserire Numero Carta: Introduceti Numarul Cartii: 输入卡号: diff --git a/pos/config/parameters.properties b/pos/config/parameters.properties index 02698f457..d393c62fa 100644 --- a/pos/config/parameters.properties +++ b/pos/config/parameters.properties @@ -18,6 +18,9 @@ # ### Miscellaneous parameters -# Used with a touch screen to allow showing vituals keyboards (alpha and keypad). +# Used with a touch screen to allow showing vituals keyboards (alpha and keypad). True by default # For now this properties is used with both. Maybe at some point we will need both in the same screen. -ShowKeyboardInSaveSale=Y \ No newline at end of file +ShowKeyboardInSaveSale=Y +# Used with MSR to allow to force swiping from card when showKeyboardInSaveSale is also true +# For instance the card number in Client Profile screen. False by default +SwipWithCard=N diff --git a/pos/src/org/ofbiz/pos/screen/ClientProfile.java b/pos/src/org/ofbiz/pos/screen/ClientProfile.java index 1a26faec7..03000ed23 100644 --- a/pos/src/org/ofbiz/pos/screen/ClientProfile.java +++ b/pos/src/org/ofbiz/pos/screen/ClientProfile.java @@ -77,7 +77,8 @@ public class ClientProfile extends XPage implements ActionListener { protected static PosTransaction m_trans = null; protected String m_type = null; protected boolean cancelled = false; - private static boolean ShowKeyboardInSaveSale = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "ShowKeyboardInSaveSale", "Y"); + private static boolean showKeyboardInSaveSale = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "ShowKeyboardInSaveSale", "Y"); + private static boolean swipWithCard = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "SwipWithCard", "N"); private static Locale locale = Locale.getDefault(); private String m_partyId = null; @@ -160,7 +161,7 @@ public class ClientProfile extends XPage implements ActionListener { } public synchronized void editName() { - if (wasMouseClicked() && ShowKeyboardInSaveSale) { + if (wasMouseClicked() && showKeyboardInSaveSale) { try { Keyboard keyboard = new Keyboard(m_pos); keyboard.setText(m_nameEdit.getText()); @@ -174,7 +175,7 @@ public class ClientProfile extends XPage implements ActionListener { } public synchronized void editEmail() { - if (wasMouseClicked() && ShowKeyboardInSaveSale) { + if (wasMouseClicked() && showKeyboardInSaveSale) { try { Keyboard keyboard = new Keyboard(m_pos); keyboard.setText(m_emailEdit.getText()); @@ -188,7 +189,7 @@ public class ClientProfile extends XPage implements ActionListener { } public synchronized void editPhone() { - if (wasMouseClicked() && ShowKeyboardInSaveSale) { + if (wasMouseClicked() && showKeyboardInSaveSale) { try { NumericKeypad numericKeypad = new NumericKeypad(m_pos); numericKeypad.setMinus(true); @@ -203,7 +204,7 @@ public class ClientProfile extends XPage implements ActionListener { } public synchronized void editCard() { - if (wasMouseClicked() && ShowKeyboardInSaveSale) { + if (wasMouseClicked() && showKeyboardInSaveSale && !swipWithCard) { try { NumericKeypad numericKeypad = new NumericKeypad(m_pos); numericKeypad.setMinus(true); diff --git a/pos/src/org/ofbiz/pos/screen/PaidInOut.java b/pos/src/org/ofbiz/pos/screen/PaidInOut.java index d8eb0fa1a..f9351efc7 100644 --- a/pos/src/org/ofbiz/pos/screen/PaidInOut.java +++ b/pos/src/org/ofbiz/pos/screen/PaidInOut.java @@ -65,7 +65,7 @@ public class PaidInOut extends XPage { protected static PosTransaction m_trans = null; protected String m_type = null; protected boolean cancelled = false; - private static boolean ShowKeyboardInSaveSale = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "ShowKeyboardInSaveSale", "Y"); + private static boolean showKeyboardInSaveSale = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "ShowKeyboardInSaveSale", "Y"); //TODO : make getter and setter for members (ie m_*) if needed (extern calls). For that in Eclipse use Source/Generate Getters and setters @@ -146,7 +146,7 @@ public class PaidInOut extends XPage { } public synchronized void editAmount() { - if (wasMouseClicked() && ShowKeyboardInSaveSale) { + if (wasMouseClicked() && showKeyboardInSaveSale) { try { NumericKeypad numericKeypad = new NumericKeypad(m_pos); numericKeypad.setMinus(true); diff --git a/pos/src/org/ofbiz/pos/screen/SaveSale.java b/pos/src/org/ofbiz/pos/screen/SaveSale.java index ae22e7b4e..0e34f03e2 100644 --- a/pos/src/org/ofbiz/pos/screen/SaveSale.java +++ b/pos/src/org/ofbiz/pos/screen/SaveSale.java @@ -53,7 +53,7 @@ public class SaveSale extends XPage { //protected XButton m_saveAndPrint = null; //FIXME : button does not exist yet protected static PosTransaction m_trans = null; public static SimpleDateFormat sdf = new SimpleDateFormat(UtilProperties.getMessage(PosTransaction.resource,"PosDateTimeFormat",Locale.getDefault())); - private static boolean ShowKeyboardInSaveSale = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "ShowKeyboardInSaveSale", "Y"); + private static boolean showKeyboardInSaveSale = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "ShowKeyboardInSaveSale", "Y"); //TODO : make getter and setter for members (ie m_*) if needed (extern calls). For that in Eclipse use Source/Generate Getters and setters @@ -128,7 +128,7 @@ public class SaveSale extends XPage { } public synchronized void editSaleName() { - if (wasMouseClicked() && ShowKeyboardInSaveSale) { + if (wasMouseClicked() && showKeyboardInSaveSale) { try { Keyboard keyboard = new Keyboard(m_pos); keyboard.setText(m_saleName.getText());