svn commit: r1000483 - in /ofbiz/branches/jquery: ./ applications/order/script/org/ofbiz/order/customer/ applications/party/webapp/partymgr/WEB-INF/actions/party/ applications/product/script/org/ofbiz/product/test/ framework/common/script/org/ofbiz/com...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1000483 - in /ofbiz/branches/jquery: ./ applications/order/script/org/ofbiz/order/customer/ applications/party/webapp/partymgr/WEB-INF/actions/party/ applications/product/script/org/ofbiz/product/test/ framework/common/script/org/ofbiz/com...

jleroux@apache.org
Author: jleroux
Date: Thu Sep 23 14:34:00 2010
New Revision: 1000483

URL: http://svn.apache.org/viewvc?rev=1000483&view=rev
Log:
Merges the trunk at r1000434

Modified:
    ofbiz/branches/jquery/   (props changed)
    ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml   (props changed)
    ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy   (props changed)
    ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml   (props changed)
    ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml
    ofbiz/branches/jquery/framework/common/servicedef/services.xml
    ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/common-controller.xml
    ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml   (props changed)
    ofbiz/branches/jquery/specialpurpose/ebaystore/lib/   (props changed)
    ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy   (props changed)
    ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy   (props changed)
    ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy   (props changed)

Propchange: ofbiz/branches/jquery/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:951708-1000106
+/ofbiz/trunk:951708-1000480

Propchange: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:921280-927264
-/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1000106
+/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1000480

Propchange: ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:418499-490456
 /ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:921280-927264
-/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-1000106
+/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-1000480

Propchange: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/applications/product/script/org/ofbiz/shipment/test/FacilityTests.xml:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:921280-927264
-/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-1000106
+/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-1000480

Modified: ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml?rev=1000483&r1=1000482&r2=1000483&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml (original)
+++ ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml Thu Sep 23 14:34:00 2010
@@ -263,21 +263,65 @@ under the License.
             <field-to-list list="stateList" field="stateName"/>
         </iterate>
         <if-empty field="stateList">
-            <property-to-field resource="CommonUiLabels" property="CommonNoStatesProvinces" field="noOption"/>
-            <field-to-list list="stateList" field="noOption"/>
+            <property-to-field resource="CommonUiLabels" property="CommonNoStatesProvinces" field="noOptions"/>
+            <field-to-list list="stateList" field="noOptions"/>
         </if-empty>
         <field-to-result field="stateList"/>
     </simple-method>
 
     <simple-method method-name="linkGeos" short-description="Link Geos to another Geo">
-        <iterate list="parameters.geoIds" entry="geoId">
-            <make-value value-field="newGeoAssoc" entity-name="GeoAssoc"/>
-            <set field="newGeoAssoc.geoId" from-field="geoId"/>
-            <set field="newGeoAssoc.geoIdTo" from-field="parameters.geoId"/>
-            <set field="newGeoAssoc.geoAssocTypeId" from-field="parameters.geoAssocTypeId"/>
-            <create-value value-field="newGeoAssoc"/>
-            <check-errors/>            
+        <entity-and entity-name="GeoAssoc" list="geoAssocs">
+            <field-map field-name="geoIdTo" from-field="parameters.geoId"/>
+        </entity-and>
+        <!-- Current list contains old values? -->
+        <iterate list="geoAssocs" entry="geoAssoc">
+            <if-compare-field field="parameters.geoIds" operator="contains" to-field="geoAssoc.geoId">
+                <!-- Yes, nothing to do, it already exists and we keep it -->
+                <else><!-- Remove -->
+                    <entity-one entity-name="GeoAssoc" value-field="oldGeoAssoc">
+                        <field-map field-name="geoId" from-field="geoAssoc.geoId"/>
+                        <field-map field-name="geoIdTo" from-field="parameters.geoId"/>
+                    </entity-one>
+                    <remove-value value-field="oldGeoAssoc"/>
+                </else>                
+            </if-compare-field>
         </iterate>
+        <!-- Old list contains current values -->
+        <iterate list="parameters.geoIds" entry="geoId">            
+            <if-compare-field field="oldGeoIds" operator="contains" to-field="geoId">
+                <!-- Yes, nothing to do, it already exists and we keep it -->
+                <else>
+                    <entity-one entity-name="GeoAssoc" value-field="oldGeoAssoc">
+                        <field-map field-name="geoId" from-field="geoId"/>
+                        <field-map field-name="geoIdTo" from-field="parameters.geoId"/>
+                    </entity-one>
+                    <if-empty field="oldGeoAssoc">                    
+                        <!-- Add as it does not exist -->
+                        <make-value value-field="newGeoAssoc" entity-name="GeoAssoc"/>
+                        <set field="newGeoAssoc.geoId" from-field="geoId"/>
+                        <set field="newGeoAssoc.geoIdTo" from-field="parameters.geoId"/>
+                        <set field="newGeoAssoc.geoAssocTypeId" from-field="parameters.geoAssocTypeId"/>
+                        <create-value value-field="newGeoAssoc"/>
+                    </if-empty>
+                </else>
+            </if-compare-field>
+        </iterate>
+        <check-errors/>
     </simple-method>
+
+    <simple-method method-name="getRelatedGeos" short-description="get related geos to a geo through a geoAssoc" login-required="false">      
+        <entity-and entity-name="GeoAssoc" list="geoAssoc">
+            <field-map field-name="geoIdTo" from-field="parameters.geoId"/>
+            <field-map field-name="geoAssocTypeId" from-field="parameters.geoAssocTypeId"/>
+        </entity-and>
+        <iterate list="geoAssoc" entry="geo">
+            <field-to-list list="geoList" field="geo.geoId"/>
+        </iterate>
+        <if-empty field="geoList">
+            <property-to-field resource="CommonUiLabels" property="CommonNoOptions" field="noOptions"/>
+            <field-to-list list="geoList" field="noOptions"/>
+        </if-empty>
+        <field-to-result field="geoList"/>
+    </simple-method>    
     
 </simple-methods>

Modified: ofbiz/branches/jquery/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/servicedef/services.xml?rev=1000483&r1=1000482&r2=1000483&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/servicedef/services.xml (original)
+++ ofbiz/branches/jquery/framework/common/servicedef/services.xml Thu Sep 23 14:34:00 2010
@@ -711,9 +711,9 @@ under the License.
         location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="linkGeos">        
         <description>Link Geos to another Geo</description>
         <permission-service service-name="commonGenericPermission" main-action="CREATE"/>
-        <attribute name="geoIds" type="List" mode="IN"></attribute>
-        <attribute name="geoId" type="String" mode="IN"></attribute>
-        <attribute name="geoAssocTypeId" type="String" mode="IN"></attribute>
+        <attribute name="geoIds" type="List" mode="IN" optional="true"/>
+        <attribute name="geoId" type="String" mode="IN"/>
+        <attribute name="geoAssocTypeId" type="String" mode="IN"/>
     </service>
     
     <!-- GeoPoint services -->
@@ -753,4 +753,12 @@ under the License.
         <attribute name="listOrderBy" mode="IN" type="String" optional="true"/>
         <attribute name="stateList" mode="OUT" type="java.util.List"/>
     </service>
+    
+    <service name="getRelatedGeos" engine="simple" auth="false"
+        location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="getRelatedGeos">
+        <attribute name="geoId" mode="IN" type="String"/>
+        <attribute name="geoAssocTypeId" mode="IN" type="String"/>        
+        <attribute name="geoList" mode="OUT" type="java.util.List"/>
+    </service>
+    
 </services>

Modified: ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/common-controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/common-controller.xml?rev=1000483&r1=1000482&r2=1000483&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/common-controller.xml (original)
+++ ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/common-controller.xml Thu Sep 23 14:34:00 2010
@@ -218,6 +218,13 @@ under the License.
         <response name="success" type="request" value="json"/>
         <response name="error" type="request" value="json"/>
     </request-map>
+
+    <request-map uri="getRelatedGeos">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="getRelatedGeos"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
     <!--========================== AJAX events =====================-->
 
     <!-- View Mappings -->

Propchange: ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/applications/commonext/widget/HelpScreens.xml:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264
-/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1000106
+/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1000480

Propchange: ofbiz/branches/jquery/specialpurpose/ebaystore/lib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/specialpurpose/ebay/lib:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/specialpurpose/ebaystore/lib:921280-927264
-/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-1000106
+/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-1000480

Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:418499-490456
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-1000106
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-1000480

Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:418499-490456
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-1000106
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-1000480

Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 14:34:00 2010
@@ -1,3 +1,3 @@
 /incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:418499-490456
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-1000106
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-1000480