You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/10/17 15:43:27 UTC

svn commit: r826248 - in /ofbiz/trunk: applications/party/config/ specialpurpose/pos/screens/default/dialog/error/ specialpurpose/pos/src/org/ofbiz/pos/ specialpurpose/pos/src/org/ofbiz/pos/component/ specialpurpose/pos/src/org/ofbiz/pos/screen/ specia...

Author: jleroux
Date: Sat Oct 17 13:43:27 2009
New Revision: 826248

URL: http://svn.apache.org/viewvc?rev=826248&view=rev
Log:
Fix some party error labels and create a new  error dialog box in POS with larger size and smaller font size (style) inside to allow long error messages to be viewed.
Use it in PosTransaction.java for Person creation and update (cardId is unique)
Fix some typos here and there

Added:
    ofbiz/trunk/specialpurpose/pos/screens/default/dialog/error/exceptionLargeSmallFont.xml
Modified:
    ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java
    ofbiz/trunk/specialpurpose/pos/styles/posstyles.xml
    ofbiz/trunk/specialpurpose/pos/styles/posstyles_zh.xml

Modified: ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml?rev=826248&r1=826247&r2=826248&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml Sat Oct 17 13:43:27 2009
@@ -916,10 +916,10 @@
         <value xml:lang="zh">必须的参数 'email' 不能为空。</value>
     </property>
     <property key="person.create.db_error">
-        <value xml:lang="de">Kann Informationen zur Person nicht hinzufügen (Schreibfehler): ${0}</value>
+        <value xml:lang="de">Kann Informationen zur Person nicht hinzufügen (Schreibfehler): {0}</value>
         <value xml:lang="en">Could not add person info (write failure): {0}</value>
-        <value xml:lang="es">No se pudo añadir la información de la persona (error en la escritura)</value>
-        <value xml:lang="fr">Ajout d'information sur la personne impossible (échec écriture): {0}</value>
+        <value xml:lang="es">No se pudo añadir la información de la persona (error en la escritura): {0}</value>
+        <value xml:lang="fr">Ajout d`information sur la personne impossible (échec écriture): {0}</value>
         <value xml:lang="hi_IN">व्यक्ति की जानकारी नहीं जोड़ पाएँ (लिखने में असफल): {0}</value>
         <value xml:lang="it">Non è possibile aggiungere informazioni sulla persona (fallita scrittura): {0}</value>
         <value xml:lang="nl">Could not add person info (write failure): {0}</value>
@@ -972,10 +972,10 @@
         <value xml:lang="zh">无法更新人员信息 (没有找到人员)</value>
     </property>
     <property key="person.update.read_failure">
-        <value xml:lang="de">Daten zur Person können nicht aktualisiert werden (Lesefehler): ${0}</value>
+        <value xml:lang="de">Daten zur Person können nicht aktualisiert werden (Lesefehler): {0}</value>
         <value xml:lang="en">Could not update person information (read failure): {0}</value>
         <value xml:lang="es">No se pudo actualizar la información de la persona(error de lectura): {0}</value>
-        <value xml:lang="fr">Mise à jour d'information personne impossible (échec lecture): {0}</value>
+        <value xml:lang="fr">Mise à jour d`information personne impossible (échec lecture): {0}</value><!-- ` used instead of ' else ' may interfere with the result from {0} and prevent it to appears-->
         <value xml:lang="hi_IN">व्यक्ति की जानकारी अद्यतन(update) नहीं कर पाएँ (पड़ने में असफल): {0}</value>
         <value xml:lang="it">Non è possibile aggiornare informazioni sulla persona (fallita lettura): {0}</value>
         <value xml:lang="nl">Could not update person information (read failure): {0}</value>
@@ -1000,10 +1000,10 @@
         <value xml:lang="zh">已成功更新人员。</value>
     </property>
     <property key="person.update.write_failure">
-        <value xml:lang="de">Daten zur Person können nicht aktualisiert werden (Schreibfehler): ${0}</value>
+        <value xml:lang="de">Daten zur Person können nicht aktualisiert werden (Schreibfehler): {0}</value>
         <value xml:lang="en">Could not update person information (write failure): {0}</value>
         <value xml:lang="es">No se pudo actualizar la información de la persona(error de escritura): {0}</value>
-        <value xml:lang="fr">Mise à jour d'information personne impossible (échec écriture): {0}</value>
+        <value xml:lang="fr">Mise à jour d`information personne impossible (échec écriture): {0}</value><!-- ` used instead of ' else ' may interfere with the result from {0} and prevent it to appears-->
         <value xml:lang="hi_IN">व्यक्ति की जानकारी अद्यतन(update) नहीं कर पाएँ (लिखने में असफल): {0}</value>
         <value xml:lang="it">Non è possibile aggiornare informazioni sulla persona (fallita scrittura): {0}</value>
         <value xml:lang="nl">Could not update person information (write failure): {0}</value>

Added: ofbiz/trunk/specialpurpose/pos/screens/default/dialog/error/exceptionLargeSmallFont.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/screens/default/dialog/error/exceptionLargeSmallFont.xml?rev=826248&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/screens/default/dialog/error/exceptionLargeSmallFont.xml (added)
+++ ofbiz/trunk/specialpurpose/pos/screens/default/dialog/error/exceptionLargeSmallFont.xml Sat Oct 17 13:43:27 2009
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<XPage>
+    <Components>
+        <Panel name="errorPanel" x="0" y="0" w="700" h="400" style="errorpanel" border="0" alignment="Center">
+            <Button w="780" h="580" name="closeBtn" style="errorSmallFont" content="EXCEPTION" alignment="Center"/>
+        </Panel>
+    </Components>
+</XPage>

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=826248&r1=826247&r2=826248&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Sat Oct 17 13:43:27 2009
@@ -264,7 +264,7 @@
         itemInfo.put("adjustments", "");
         if (item.getOtherAdjustments().compareTo(BigDecimal.ZERO) != 0) {
             itemInfo.put("itemDiscount", UtilFormatOut.padString(
-                    UtilProperties.getMessage(resource,"PosItemDiscount", locale), Receipt.pridLength[0] + 1, true, ' '));
+                    UtilProperties.getMessage(resource, "PosItemDiscount", locale), Receipt.pridLength[0] + 1, true, ' '));
             itemInfo.put("adjustments", UtilFormatOut.formatPrice(item.getOtherAdjustments()));
         }
 
@@ -870,7 +870,7 @@
         BigDecimal change = grandTotal.subtract(paymentAmt);
 
         // notify the change due
-        output.print(UtilProperties.getMessage(resource,"PosChange",locale) + " " + UtilFormatOut.formatPrice(this.getTotalDue().negate()));
+        output.print(UtilProperties.getMessage(resource, "PosChange",locale) + " " + UtilFormatOut.formatPrice(this.getTotalDue().negate()));
 
         // threaded drawer/receipt printing
         final PosTransaction currentTrans = this;
@@ -1234,7 +1234,7 @@
         }
 
         if (svcRes == null) {
-            Debug.log(UtilProperties.getMessage("EcommerceUiLabels","EcommerceNoShoppingListsCreate",locale), module);
+            Debug.log(UtilProperties.getMessage("EcommerceUiLabels", "EcommerceNoShoppingListsCreate", locale), module);
         } else if (ServiceUtil.isError(svcRes)) {
             Debug.logError(ServiceUtil.getErrorMessage(svcRes) + " - " + svcRes, module);
         } else{
@@ -1279,7 +1279,7 @@
         }
 
         if (shoppingLists == null) {
-            Debug.log(UtilProperties.getMessage("EcommerceUiLabels","EcommerceNoShoppingListsCreate",locale), module);
+            Debug.log(UtilProperties.getMessage("EcommerceUiLabels", "EcommerceNoShoppingListsCreate", locale), module);
         }
         return shoppingLists;
     }
@@ -1353,7 +1353,7 @@
         }
 
         if (svcRes == null) {
-            Debug.log(UtilProperties.getMessage("EcommerceUiLabels","EcommerceNoShoppingListsCreate",locale), module);
+            Debug.log(UtilProperties.getMessage("EcommerceUiLabels", "EcommerceNoShoppingListsCreate", locale), module);
         } else if (ServiceUtil.isError(svcRes)) {
             Debug.logError(ServiceUtil.getErrorMessage(svcRes) + " - " + svcRes, module);
         } else{
@@ -1736,7 +1736,7 @@
                return null;
             }
             if (ServiceUtil.isError(svcRes)) {
-                pos.showDialog("dialog/error/exception", ServiceUtil.getErrorMessage(svcRes));
+                pos.showDialog("dialog/error/exceptionLargeSmallFont", ServiceUtil.getErrorMessage(svcRes)); // exceptionLargeSmallFont used to show duplicate key error message for card
                 return null;
             }
             partyId = (String) svcRes.get("partyId");
@@ -1822,7 +1822,7 @@
                     return null;
                 }
                 if (ServiceUtil.isError(svcRes)) {
-                    pos.showDialog("dialog/error/exception", ServiceUtil.getErrorMessage(svcRes));
+                    pos.showDialog("dialog/error/exceptionLargeSmallFont", ServiceUtil.getErrorMessage(svcRes));
                     return null;
                 }
             }

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java?rev=826248&r1=826247&r2=826248&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java Sat Oct 17 13:43:27 2009
@@ -19,7 +19,6 @@
 package org.ofbiz.pos.component;
 
 import java.awt.Color;
-import java.awt.Font;
 import java.io.StringWriter;
 import java.util.Locale;
 

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java?rev=826248&r1=826247&r2=826248&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java Sat Oct 17 13:43:27 2009
@@ -20,7 +20,6 @@
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -28,7 +27,6 @@
 import javax.swing.DefaultComboBoxModel;
 
 import javolution.util.FastList;
-
 import net.xoetrope.swing.XButton;
 import net.xoetrope.swing.XComboBox;
 import net.xoetrope.swing.XDialog;

Modified: ofbiz/trunk/specialpurpose/pos/styles/posstyles.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/styles/posstyles.xml?rev=826248&r1=826247&r2=826248&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/styles/posstyles.xml (original)
+++ ofbiz/trunk/specialpurpose/pos/styles/posstyles.xml Sat Oct 17 13:43:27 2009
@@ -44,12 +44,20 @@
         <font_italic value="0"/>
     </style>
     <style name="error">
-        <color_back value="cc0033"/>
-        <color_fore value="ffffff"/>
-        <font_face value="verdana"/>
-        <font_size value="22"/>
-        <font_weight value="1"/>
-        <font_italic value="0"/>
+      <color_back value="cc0033"/>
+      <color_fore value="ffffff"/>
+      <font_face value="verdana"/>
+      <font_size value="22"/>
+      <font_weight value="1"/>
+      <font_italic value="0"/>
+    </style>
+    <style name="errorSmallFont">
+      <color_back value="cc0033"/>
+      <color_fore value="ffffff"/>
+      <font_face value="verdana"/>
+      <font_size value="10"/>
+      <font_weight value="1"/>
+      <font_italic value="0"/>
     </style>
     <style name="blackpanel">
         <color_back value="000000"/>

Modified: ofbiz/trunk/specialpurpose/pos/styles/posstyles_zh.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/styles/posstyles_zh.xml?rev=826248&r1=826247&r2=826248&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/styles/posstyles_zh.xml (original)
+++ ofbiz/trunk/specialpurpose/pos/styles/posstyles_zh.xml Sat Oct 17 13:43:27 2009
@@ -51,6 +51,14 @@
         <font_weight value="1"/>
         <font_italic value="0"/>
     </style>
+    <style name="errorSmallFont">
+      <color_back value="cc0033"/>
+      <color_fore value="ffffff"/>
+      <font_face value="华文中宋"/>
+      <font_size value="10"/>
+      <font_weight value="1"/>
+      <font_italic value="0"/>
+    </style>
     <style name="blackpanel">
         <color_back value="000000"/>
         <color_fore value="000000"/>