Author: hansbak
Date: Tue Jul 16 08:41:17 2013
New Revision: 1503615

URL: http://svn.apache.org/r1503615
Log:
remove a non functional jquery error messaging in costcenter perc screens with 
the standard, but working messages

Removed:
    ofbiz/trunk/applications/accounting/webapp/accounting/images/costCenters.js
Modified:
    
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ledger/GeneralLedgerServices.java
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl
    ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml

Modified: 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ledger/GeneralLedgerServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ledger/GeneralLedgerServices.java?rev=1503615&r1=1503614&r2=1503615&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ledger/GeneralLedgerServices.java
 (original)
+++ 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ledger/GeneralLedgerServices.java
 Tue Jul 16 08:41:17 2013
@@ -45,6 +45,7 @@ public class GeneralLedgerServices {
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Map<String, String> amountPercentageMap = 
UtilGenerics.checkMap(context.get("amountPercentageMap"));
         totalAmountPercentage = 
GeneralLedgerServices.calculateCostCenterTotal(amountPercentageMap);
+        Map<String, Object> result = ServiceUtil.returnSuccess();
         for (String rowKey : amountPercentageMap.keySet()) {
             String rowValue = amountPercentageMap.get(rowKey);
             if (UtilValidate.isNotEmpty(rowValue)) {
@@ -57,13 +58,13 @@ public class GeneralLedgerServices {
                         "userLogin", userLogin, "totalAmountPercentage", 
totalAmountPercentage);
             }
             try {
-                dispatcher.runSync("createGlAcctCatMemFromCostCenters", 
createGlAcctCatMemFromCostCentersMap);
+                result = 
dispatcher.runSync("createGlAcctCatMemFromCostCenters", 
createGlAcctCatMemFromCostCentersMap);
             } catch (GenericServiceException e) {
                 Debug.logError(e, module);
                 return ServiceUtil.returnError(e.getMessage());
             }
         }
-        return ServiceUtil.returnSuccess();
+        return result;
     }
 
     public static BigDecimal calculateCostCenterTotal(Map<String, String> 
amountPercentageMap) {

Modified: 
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=1503615&r1=1503614&r2=1503615&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml 
(original)
+++ 
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml 
Tue Jul 16 08:41:17 2013
@@ -2565,8 +2565,8 @@ under the License.
     <request-map uri="createUpdateCostCenter">
         <security auth="true" https="true"/>
         <event type="service-multi"  invoke="createUpdateCostCenter"/>
-        <response name="success" type="request" value="json"/>
-        <response name="error" type="request" value="json"/>
+        <response name="success" type="view" value="CostCenters"/>
+        <response name="error" type="view" value="CostCenters"/>
     </request-map>
 
     <request-map uri="GlAccountBalanceByCostCenter">

Modified: 
ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl?rev=1503615&r1=1503614&r2=1503615&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl 
(original)
+++ 
ofbiz/trunk/applications/accounting/webapp/accounting/ledger/CostCenters.ftl 
Tue Jul 16 08:41:17 2013
@@ -17,11 +17,7 @@ specific language governing permissions 
 under the License.
 -->
 <#if glAcctgAndAmountPercentageList?has_content && 
glAccountCategories?has_content>
-
   <form id="costCenters" method="post" 
action="<@ofbizUrl>createUpdateCostCenter</@ofbizUrl>">
-    <div id="errorMessage" class="errorMessage" style="display : 
none">${uiLabelMap.AccountingTotalAmountPercentageIsNotEqualOneHundred}</div>
-    <div id="eventMessage" class="eventMessage" style="display : 
none">${uiLabelMap.AccountingTotalCostCenterAmount}.</div>
-    <input type="hidden" name="_useRowSubmit" value="Y" />
     <table class="basic-table hover-bar" cellspacing="0">
       <tr class="header-row">
         <th>${uiLabelMap.FormFieldTitle_organizationPartyId}</th>
@@ -35,7 +31,7 @@ under the License.
 
     <#assign alt_row = false>
       <#list glAcctgAndAmountPercentageList as glAcctgAndAmountPercentage>
-        <tr id="row_${glAcctgAndAmountPercentage.glAccountId}" <#if alt_row> 
class="alternate-row"</#if>>
+        <tr id="row_${glAcctgAndAmountPercentage.glAccountId}" 
class="alternate-row">
           <td>${glAcctgAndAmountPercentage.organizationPartyId}</td>
           <td><input type="hidden" 
id="glAccountId_${glAcctgAndAmountPercentage.glAccountId}" 
name="glAccountId_o_${glAcctgAndAmountPercentage_index}" 
value="${glAcctgAndAmountPercentage.glAccountId!}"/>
               <input name="_rowSubmit_o_${glAcctgAndAmountPercentage_index}" 
type="hidden" value="Y"/>          
@@ -47,7 +43,7 @@ under the License.
               <#if 
(glAcctgAndAmountPercentage[glAccountCategory.glAccountCategoryId!])??>
                 <input type="text" 
id="cc_${glAcctgAndAmountPercentage.glAccountId}_${glAccountCategory.glAccountCategoryId}"
 size="5" 
name="amp_${glAccountCategory.glAccountCategoryId!}_o_${glAcctgAndAmountPercentage_index}"
 
value="${(glAcctgAndAmountPercentage[glAccountCategory.glAccountCategoryId!])!}"/>%
               <#else>
-                <input type="text" 
id="cc_${glAcctgAndAmountPercentage.glAccountId}_${glAccountCategory.glAccountCategoryId}"
  size="5" 
name="amp_${glAccountCategory.glAccountCategoryId!}_o_${glAcctgAndAmountPercentage_index}"
 value=""/>%
+                <input type="text" 
id="cc_${glAcctgAndAmountPercentage.glAccountId}_${glAccountCategory.glAccountCategoryId}"
 size="5" 
name="amp_${glAccountCategory.glAccountCategoryId!}_o_${glAcctgAndAmountPercentage_index}"
 value=""/>%
               </#if>
             </td>
           </#list>
@@ -55,7 +51,7 @@ under the License.
         <#assign alt_row = !alt_row>
       </#list>
     </table>
-    <div align="right"><input type="button" id="costCentersSubmit" 
value="${uiLabelMap.CommonSubmit}"/></div>
+    <div align="right"><input type="submit" value='${uiLabelMap.CommonSubmit}' 
/></div>
   </form>
 <#else>
   <label>${uiLabelMap.CommonNoRecordFound}</label>

Modified: ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml?rev=1503615&r1=1503614&r2=1503615&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml 
(original)
+++ ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml Tue 
Jul 16 08:41:17 2013
@@ -349,7 +349,6 @@ under the License.
                 <property-map resource="AccountingUiLabels" 
map-name="uiLabelMap" global="true"/>
                 <set field="titleProperty" value="FormFieldTitle_costCenters"/>
                 <set field="tabButtonItem" value="CostCenters"/>
-                <set field="layoutSettings.javaScripts[+0]" 
value="/accounting/images/costCenters.js" global="true"/>
             </actions>
             <widgets>
                <decorator-screen name="GlobalGLSettingsDecorator" 
location="${parameters.mainDecoratorLocation}">


Reply via email to