svn commit: r1222182 [1/2] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/script/org/ofbiz/accounting/test/ applications/accounting/testdef/ applications/accounting/webapp/accounting/finaccounttrans/ applications/accounting/webapp/...

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

svn commit: r1222182 [1/2] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/script/org/ofbiz/accounting/test/ applications/accounting/testdef/ applications/accounting/webapp/accounting/finaccounttrans/ applications/accounting/webapp/...

sascharodekamp
Author: sascharodekamp
Date: Thu Dec 22 11:21:43 2011
New Revision: 1222182

URL: http://svn.apache.org/viewvc?rev=1222182&view=rev
Log:
Update the Jackrabbit branch with the current trunk version to keep the branch up to date

Added:
    ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml
      - copied unchanged from r1222180, ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml
    ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsSales.xml
      - copied unchanged from r1222180, ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsSales.xml
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/EcommerceSecurityData.xml
      - copied unchanged from r1222180, ofbiz/trunk/specialpurpose/ecommerce/data/EcommerceSecurityData.xml
Removed:
    ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
Modified:
    ofbiz/branches/jackrabbit20100709/   (props changed)
    ofbiz/branches/jackrabbit20100709/applications/accounting/testdef/accountingtests.xml
    ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl
    ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl
    ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl
    ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
    ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/invoice/ListInvoices.ftl
    ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/payment/batchPayments.ftl
    ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
    ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentWorker.java
    ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
    ofbiz/branches/jackrabbit20100709/applications/manufacturing/data/ManufacturingExampleData.xml
    ofbiz/branches/jackrabbit20100709/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml
    ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
    ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderServices.java
    ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
    ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/branches/jackrabbit20100709/applications/order/testdef/ShoppingCartTests.xml
    ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy
    ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
    ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderitems.ftl
    ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
    ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml
    ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml
    ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
    ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
    ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java
    ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/reviews/pendingReviews.ftl
    ofbiz/branches/jackrabbit20100709/framework/common/widget/HelpScreens.xml   (contents, props changed)
    ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java
    ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/test.properties
    ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd
    ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
    ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
    ofbiz/branches/jackrabbit20100709/rc.ofbiz.for.ubuntu
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/ofbiz-component.xml
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/customer/viewprofile.ftl
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/error/404.jsp

Propchange: ofbiz/branches/jackrabbit20100709/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 22 11:21:43 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4:951708-952957
 /ofbiz/branches/jquery:952958-1044489
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:962442-1215057
+/ofbiz/trunk:962442-1222180

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/testdef/accountingtests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/testdef/accountingtests.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/testdef/accountingtests.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/testdef/accountingtests.xml Thu Dec 22 11:21:43 2011
@@ -27,10 +27,14 @@
     </test-case>
 
 
-    <test-case case-name="accounting-tests"><junit-test-suite class-name="org.ofbiz.accounting.test.FinAccountTests"/></test-case>
+    <test-case case-name="accounting-tests">
+        <junit-test-suite class-name="org.ofbiz.accounting.test.FinAccountTests"/>
+    </test-case>
 
-    <!-- commented out for now...test data seems to be missing and i wondered if theyu ever worked, went back to rev: 903431 and ever there the same problem -->
-    <!-- test-case case-name="auto-accounting-transaction-tests">
-        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml"/>
-    </test-case-->
+    <test-case case-name="auto-accounting-transaction-tests-sales">
+        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsSales.xml"/>
+    </test-case>
+    <test-case case-name="auto-accounting-transaction-tests-purchase">
+        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml"/>
+    </test-case>
 </test-suite>

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Thu Dec 22 11:21:43 2011
@@ -74,7 +74,7 @@ function getFinAccountTransRunningTotalA
             jQuery('#endingBalance').html(jQuery('#endingBalanceInput').val());
 
         }
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
     }
 }
 </script>

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl Thu Dec 22 11:21:43 2011
@@ -63,7 +63,7 @@ function getPaymentRunningTotal() {
         });
     } else {
         jQuery('#showPaymentRunningTotal').html("");
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
     }
 }
 

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/CommissionRun.ftl Thu Dec 22 11:21:43 2011
@@ -68,7 +68,7 @@ function enableSubmitButton() {
     if (!isSingle && jQuery('#serviceName').val() != "") {
         jQuery('#submitButton').removeAttr("disabled");
     } else {
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
     }
 }
 

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl Thu Dec 22 11:21:43 2011
@@ -71,7 +71,7 @@ function getInvoiceRunningTotal() {
         }
 
     } else {
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
         jQuery('#showInvoiceRunningTotal').html("");
     }
 }

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/invoice/ListInvoices.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/invoice/ListInvoices.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/invoice/ListInvoices.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/invoice/ListInvoices.ftl Thu Dec 22 11:21:43 2011
@@ -64,11 +64,11 @@ under the License.
             });
 
             if(jQuery('#serviceName').val() != "") {
-                jQuery('#submitButton').attr('disabled', '');
+                jQuery('#submitButton').removeAttr('disabled');
             }
 
         } else {
-            jQuery('#submitButton').attr('disabled', 'disabled');
+            jQuery('#submitButton').attr('disabled', true);
             jQuery('#showInvoiceRunningTotal').html("");
         }
     }
@@ -104,7 +104,9 @@ under the License.
         });
 
         if(anyChecked && (jQuery('#serviceName').val() != "")) {
-            jQuery('#submitButton').attr('disabled' , '');
+            jQuery('#submitButton').removeAttr('disabled');
+        } else {
+            jQuery('#submitButton').attr('disabled', true);
         }
     }
 //]]>
@@ -179,6 +181,7 @@ under the License.
               <td><@ofbizCurrency amount=invoicePaymentInfo.amount isoCode=defaultOrganizationPartyCurrencyUomId/></td>
               <td><@ofbizCurrency amount=invoicePaymentInfo.paidAmount isoCode=defaultOrganizationPartyCurrencyUomId/></td>
               <td><@ofbizCurrency amount=invoicePaymentInfo.outstandingAmount isoCode=defaultOrganizationPartyCurrencyUomId/></td>
+              mlml
               <td align="right"><input type="checkbox" id="invoiceId_${invoice_index}" name="invoiceIds" value="${invoice.invoiceId}" onclick="javascript:getInvoiceRunningTotal();"/></td>
             </tr>
             <#-- toggle the row color -->

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/payment/batchPayments.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/payment/batchPayments.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/payment/batchPayments.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ar/payment/batchPayments.ftl Thu Dec 22 11:21:43 2011
@@ -65,11 +65,13 @@ function getPaymentRunningTotal() {
         });
 
         if(jQuery('#serviceName').val() != "") {
-            jQuery('#submitButton').attr('disabled', '');
+            jQuery('#submitButton').removeAttr('disabled');
+        } else {
+            jQuery('#submitButton').attr('disabled', true);
         }
 
     } else {
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
         jQuery('#showPaymentRunningTotal').html("");
     }
 }
@@ -108,9 +110,9 @@ function setServiceName(selection) {
     });
 
     if(anyChecked && (jQuery('#serviceName').val() != "")) {
-        jQuery('#submitButton').attr('disabled' , '');
+        jQuery('#submitButton').removeAttr('disabled');
     } else {
-       jQuery('#submitButton').attr('disabled' , 'disabled');
+       jQuery('#submitButton').attr('disabled' , true);
     }
 
 }

Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Thu Dec 22 11:21:43 2011
@@ -284,8 +284,14 @@ public class CmsEvents {
                     templateMap.put("formStringRenderer", formStringRenderer);
                     //include DOCTYPE for cms screens
                     writer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
+                    
+                    // if use web analytics
+                    List<GenericValue> webAnalytics = delegator.findByAnd("WebAnalyticsConfig", UtilMisc.toMap("webSiteId", webSiteId));
+                    
                     // render
-                    if (UtilValidate.isEmpty(mapKey)) {
+                    if (UtilValidate.isNotEmpty(webAnalytics) && hasErrorPage) {
+                        ContentWorker.renderContentAsText(dispatcher, delegator, contentId, writer, templateMap, locale, "text/html", null, null, true, webAnalytics);
+                    } else if (UtilValidate.isEmpty(mapKey)) {
                         ContentWorker.renderContentAsText(dispatcher, delegator, contentId, writer, templateMap, locale, "text/html", null, null, true);
                     } else {
                         ContentWorker.renderSubContentAsText(dispatcher, delegator, contentId, writer, mapKey, templateMap, locale, "text/html", true);

Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/content/ContentWorker.java Thu Dec 22 11:21:43 2011
@@ -180,7 +180,7 @@ public class ContentWorker implements or
     }
 
     public static void renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, GenericValue content, Appendable out,
-            Map<String,Object>templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
+            Map<String,Object>templateContext, Locale locale, String mimeTypeId, boolean cache, List<GenericValue> webAnalytics) throws GeneralException, IOException {
         // if the content has a service attached run the service
 
         String serviceName = content.getString("serviceName");
@@ -266,7 +266,12 @@ public class ContentWorker implements or
                     Debug.logError("No content ID found.", module);
                     return;
                 }
-                DataResourceWorker.renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, mimeTypeId, cache);
+                
+                if (UtilValidate.isNotEmpty(webAnalytics)) {
+                    DataResourceWorker.renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, mimeTypeId, cache, webAnalytics);
+                } else {
+                    DataResourceWorker.renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, mimeTypeId, cache);
+                }
 
             // there is a template; render the data and then the template
             } else {
@@ -325,10 +330,17 @@ public class ContentWorker implements or
         return writer.toString();
     }
 
+    public static String renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out,
+            Map<String, Object> templateContext, Locale locale, String mimeTypeId, String partyId, String roleTypeId, boolean cache, List<GenericValue> webAnalytics) throws GeneralException, IOException {
+        GenericValue content = ContentWorker.findContentForRendering(delegator, contentId, locale, partyId, roleTypeId, cache);
+        ContentWorker.renderContentAsText(dispatcher, delegator, content, out, templateContext, locale, mimeTypeId, cache, webAnalytics);
+        return out.toString();
+    }
+
     public static void renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out,
             Map<String, Object> templateContext, Locale locale, String mimeTypeId, String partyId, String roleTypeId, boolean cache) throws GeneralException, IOException {
         GenericValue content = ContentWorker.findContentForRendering(delegator, contentId, locale, partyId, roleTypeId, cache);
-        ContentWorker.renderContentAsText(dispatcher, delegator, content, out, templateContext, locale, mimeTypeId, cache);
+        ContentWorker.renderContentAsText(dispatcher, delegator, content, out, templateContext, locale, mimeTypeId, cache, null);
     }
 
     public static String renderSubContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, String mapKey, Map<String, Object> templateContext,

Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Thu Dec 22 11:21:43 2011
@@ -55,6 +55,7 @@ import org.ofbiz.base.location.FlexibleL
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.FileUtil;
 import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilIO;
@@ -62,6 +63,7 @@ import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.base.util.StringUtil.StringWrapper;
 import org.ofbiz.base.util.collections.MapStack;
 import org.ofbiz.base.util.template.FreeMarkerWorker;
 import org.ofbiz.base.util.template.XslTransform;
@@ -585,12 +587,18 @@ public class DataResourceWorker  impleme
     public static String renderDataResourceAsText(Delegator delegator, String dataResourceId, Map<String, Object> templateContext,
              Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
         Writer writer = new StringWriter();
-        renderDataResourceAsText(delegator, dataResourceId, writer, templateContext, locale, targetMimeTypeId, cache);
+        renderDataResourceAsText(delegator, dataResourceId, writer, templateContext, locale, targetMimeTypeId, cache, null);
         return writer.toString();
     }
 
-    public static void renderDataResourceAsText(Delegator delegator, String dataResourceId, Appendable out,
+    public static String renderDataResourceAsText(Delegator delegator, String dataResourceId, Appendable out,
             Map<String, Object> templateContext, Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
+       renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, targetMimeTypeId, cache, null);
+       return out.toString();
+   }
+
+    public static void renderDataResourceAsText(Delegator delegator, String dataResourceId, Appendable out,
+            Map<String, Object> templateContext, Locale locale, String targetMimeTypeId, boolean cache, List<GenericValue> webAnalytics) throws GeneralException, IOException {
         if (dataResourceId == null) {
             throw new GeneralException("Cannot lookup data resource with for a null dataResourceId");
         }
@@ -655,6 +663,19 @@ public class DataResourceWorker  impleme
                     // get the template data for rendering
                     String templateText = getDataResourceText(dataResource, targetMimeTypeId, locale, templateContext, delegator, cache);
 
+                    // if use web analytics.
+                    if (UtilValidate.isNotEmpty(webAnalytics)) {
+                        StringBuffer newTemplateText = new StringBuffer(templateText);
+                        String webAnalyticsCode = "<script language=\"JavaScript\" type=\"text/javascript\">";
+                        for (GenericValue webAnalytic : webAnalytics) {
+                            StringWrapper wrapString = StringUtil.wrapString((String) webAnalytic.get("webAnalyticsCode"));
+                            webAnalyticsCode += wrapString.toString();
+                        }
+                        webAnalyticsCode += "</script>";
+                        newTemplateText.insert(templateText.lastIndexOf("</head>"), webAnalyticsCode);
+                        templateText = newTemplateText.toString();
+                    }
+
                     // render the FTL template
                     FreeMarkerWorker.renderTemplate("DataResource:" + dataResourceId, templateText, templateContext, out);
                 } catch (TemplateException e) {

Modified: ofbiz/branches/jackrabbit20100709/applications/manufacturing/data/ManufacturingExampleData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/manufacturing/data/ManufacturingExampleData.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/manufacturing/data/ManufacturingExampleData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/manufacturing/data/ManufacturingExampleData.xml Thu Dec 22 11:21:43 2011
@@ -45,6 +45,11 @@ under the License.
     <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_2" fixedAssetName="Demo Production Equipment Two" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-01-01" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000" purchaseCostUomId="USD"/>
     <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_2" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
 
+    <FixedAsset fixedAssetId="DEMO_BOOK_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Book Group"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_BOOK_GROUP" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/>
+    <FixedAsset fixedAssetId="DEMO_BOOK" fixedAssetName="Demo Book" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_BOOK_GROUP" calendarId="DEMO_CALENDAR" purchaseCost="200" purchaseCostUomId="USD"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_BOOK" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/>
+
     <FixedAssetDepMethod depreciationCustomMethodId="STR_LINE_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_1"/>
     <FixedAssetDepMethod depreciationCustomMethodId="DBL_DECL_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_2"/>
 </entity-engine-xml>

Modified: ofbiz/branches/jackrabbit20100709/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/script/org/ofbiz/order/test/ShoppingCartTests.xml Thu Dec 22 11:21:43 2011
@@ -541,7 +541,7 @@ under the License.
         <set field="createQuoteAdjustmentMap.quoteId" from-field="quoteId"/>
         <set field="createQuoteAdjustmentMap.quoteItemSeqId" from-field="quoteItemSeqId"/>
         <set field="createQuoteAdjustmentMap.amount" value="15.00" type="BigDecimal"/>
-        <set field="createQuoteAdjustmentMap.includeInShipping " value="N"/>
+        <set field="createQuoteAdjustmentMap.includeInShipping" value="N"/>
         <set field="createQuoteAdjustmentMap.includeInTax" value="Y"/>
         <set field="createQuoteAdjustmentMap.quoteAdjustmentTypeId" value="SALES_TAX"/>
         <set field="createQuoteAdjustmentMap.taxAuthGeoId" value="UT"/>
@@ -576,4 +576,100 @@ under the License.
         <check-errors/>
     </simple-method>
 
+    <simple-method method-name="testCreateOrderConfigurableServiceProduct" short-description="Test create an order using a configurable service product" login-required="false">
+        <set field="request" from-field="parameters.request"/>
+        <set field="response" from-field="parameters.response"/>
+        <call-class-method method-name="routeOrderEntry" class-name="org.ofbiz.order.shoppingcart.ShoppingCartEvents" ret-field="result">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : routeOrderEntry, Response : ${result}"/>
+        <!-- Set parameters -->
+        <set field="testParams.add_product_id" value="CFSV1001"/>
+        <set field="testParams.product_id" value="CFSV1001"/>
+        <set field="testParams.FT0_0_0TYPE" value="SCAN_TYPE"/>
+        <set field="testParams.product_id0_0_0" value="SCAN_TYPE"/>
+        <set field="testParams.0" value="0"/>
+        <set field="testParams.add_product_id0_0_0" value="SCAN-EC"/>
+        <set field="testParams.productStoreId" value="9000"/>
+        <set field="testParams.currencyUom" value="USD"/>
+        <set field="testParams.quantity" value="1"/>
+        <set field="testParams.orderMode" value="SALES_ORDER"/>
+        <set field="testParams.partyId" value="DemoCustomer"/>
+        <set field="testParams.checkoutpage" value="quick"/>
+        <set field="testParams.shipping_contact_mech_id" value="9015"/>
+        <set field="testParams.shipping_method" value="GROUND@UPS"/>
+        <set field="testParams.checkOutPaymentId" value="EXT_COD"/>
+        <set field="testParams.is_gift" value="false"/>
+        <set field="testParams.may_split" value="false"/>
+        <call-object-method method-name="addParameters" obj-field="request">
+            <field field="testParams" type="java.util.Map"/>
+        </call-object-method>
+        
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="DemoCustomer"/>
+        </entity-one>
+        <call-bsh><![CDATA[
+            session = request.getSession();
+            session.setAttribute("userLogin", userLogin);
+        ]]></call-bsh>
+        <call-class-method method-name="initializeOrderEntry" class-name="org.ofbiz.order.shoppingcart.ShoppingCartEvents" ret-field="result">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : initializeOrderEntry, Response : ${result}"/>
+        <call-class-method method-name="setOrderCurrencyAgreementShipDates" class-name="org.ofbiz.order.shoppingcart.ShoppingCartEvents" ret-field="result">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : setOrderCurrencyAgreementShipDates, Response : ${result}"/>
+        
+        <call-class-method method-name="addToCart" class-name="org.ofbiz.order.shoppingcart.ShoppingCartEvents" ret-field="result">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : addToCart, Response : ${result}"/>
+        
+        <field-to-request field="nullField" request-name="shoppingCart"/>
+        <call-class-method method-name="setQuickCheckOutOptions" class-name="org.ofbiz.order.shoppingcart.CheckOutEvents" ret-field="result">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : setQuickCheckOutOptions, Response : ${result}"/>
+        <call-class-method method-name="createOrder" class-name="org.ofbiz.order.shoppingcart.CheckOutEvents" ret-field="orderCreateResult">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : createOrder, Response : ${orderCreateResult}"/>
+        <call-class-method method-name="processPayment" class-name="org.ofbiz.order.shoppingcart.CheckOutEvents" ret-field="result">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : processPayment, Response : ${result}"/>
+        <call-service-asynch service-name="sendOrderConfirmation"/>
+        <call-class-method method-name="destroyCart" class-name="org.ofbiz.order.shoppingcart.ShoppingCartEvents" ret-field="result">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <field field="response" type="javax.servlet.http.HttpServletResponse"/>
+        </call-class-method>
+        <log level="info" message="===== >>> Event : destroyCart, Response = ${result}"/>
+        <entity-condition list="orderHeaders" entity-name="OrderHeader">
+            <condition-expr field-name="orderTypeId" value="SALES_ORDER"/>
+            <order-by field-name="-entryDate"/>
+        </entity-condition>
+        <first-from-list entry="orderHeader" list="orderHeaders"/>
+        <set field="orderId" from-field="orderHeader.orderId"/>
+        <log level="info" message="======== Test order with id: [${orderId}] has been approved: [${approved}]========"/>
+
+        <entity-one entity-name="UserLogin" value-field="systemUserLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="quickShipEntireOrderMap.orderId" from-field="orderId"/>
+        <set field="quickShipEntireOrderMap.userLogin" from-field="systemUserLogin"/>
+        <call-service service-name="quickShipEntireOrder" in-map-name="quickShipEntireOrderMap"/>
+        <log level="info" message="========Test order with id: [${orderId}] has been shipped"/>
+
+        <assert><not><if-empty field="orderId"/></not></assert>
+        <check-errors/>
+    </simple-method>
+
 </simple-methods>

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Thu Dec 22 11:21:43 2011
@@ -2884,6 +2884,37 @@ public class OrderReadHelper {
        return EntityUtil.orderBy(EntityUtil.filterByAnd(newOrderStatuses, contraints2), UtilMisc.toList("-statusDatetime"));
    }
 
+    public static String getOrderItemAttribute(GenericValue orderItem, String attributeName) {
+        String attributeValue = null;
+        if (orderItem != null) {
+            try {
+                GenericValue orderItemAttribute = EntityUtil.getFirst(orderItem.getRelatedByAnd("OrderItemAttribute", UtilMisc.toMap("attrName", attributeName)));
+                if (orderItemAttribute != null) {
+                    attributeValue = orderItemAttribute.getString("attrValue");
+                }
+            } catch (GenericEntityException e) {
+                Debug.logError(e, module);
+            }
+        }
+        return attributeValue;
+    }
+
+    public String getOrderAttribute(String attributeName) {
+        String attributeValue = null;
+        if (orderHeader != null) {
+            try {
+                GenericValue orderAttribute = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderAttribute", UtilMisc.toMap("attrName", attributeName)));
+                if (orderAttribute != null) {
+                    attributeValue = orderAttribute.getString("attrValue");
+                }
+            } catch (GenericEntityException e) {
+                Debug.logError(e, module);
+            }
+        }
+        return attributeValue;
+    }
+    
+
    public static Map<String, Object> getOrderTaxByTaxAuthGeoAndParty(List<GenericValue> orderAdjustments) {
        BigDecimal taxGrandTotal = BigDecimal.ZERO;
        List<Map<String, Object>> taxByTaxAuthGeoAndPartyList = FastList.newInstance();

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/order/OrderServices.java Thu Dec 22 11:21:43 2011
@@ -1138,7 +1138,7 @@ public class OrderServices {
                     String productId = (String) orderItem.get("productId");
                     GenericValue product = delegator.getRelatedOne("Product", orderItem);
                     
-                    if("SERVICE_PRODUCT".equals(product.get("productTypeId"))){
+                    if("SERVICE_PRODUCT".equals(product.get("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.get("productTypeId"))){
                         String inventoryFacilityId = null;
                         if ("Y".equals(productStore.getString("oneInventoryFacility"))) {
                             inventoryFacilityId = productStore.getString("inventoryFacilityId");

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Thu Dec 22 11:21:43 2011
@@ -644,7 +644,7 @@ public class CheckOutHelper {
                     GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system"));
                     GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
                     GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
-                    if ("AGGREGATED_CONF".equals(product.getString("productTypeId"))) {
+                    if ("AGGREGATED_CONF".equals(product.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.getString("productTypeId"))) {
                         org.ofbiz.product.config.ProductConfigWrapper config = this.cart.findCartItem(counter).getConfigWrapper();
                         Map<String, Object> inputMap = new HashMap<String, Object>();
                         inputMap.put("config", config);

Modified: ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Thu Dec 22 11:21:43 2011
@@ -3430,7 +3430,11 @@ public class ShoppingCart implements Ite
             serviceContext.put("internalName", internalName);
             serviceContext.put("productName", productName);
             serviceContext.put("description", description);
-            serviceContext.put("productTypeId", "AGGREGATED_CONF");
+            if(ProductWorker.isAggregateService(delegator, item.getProductId()))
+                serviceContext.put("productTypeId", "AGGREGATEDSERV_CONF");
+            else
+                serviceContext.put("productTypeId", "AGGREGATED_CONF");
+            
             serviceContext.put("configId", configId);
             if (UtilValidate.isNotEmpty(product.getString("requirementMethodEnumId"))) {
                 serviceContext.put("requirementMethodEnumId", product.getString("requirementMethodEnumId"));

Modified: ofbiz/branches/jackrabbit20100709/applications/order/testdef/ShoppingCartTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/testdef/ShoppingCartTests.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/testdef/ShoppingCartTests.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/testdef/ShoppingCartTests.xml Thu Dec 22 11:21:43 2011
@@ -36,4 +36,8 @@ under the License.
     <test-case case-name="loadCartFromQuote-test">
         <simple-method-test location="component://order/script/org/ofbiz/order/test/ShoppingCartTests.xml" name="testLoadCartFromQuote"/>
     </test-case>
+    
+    <test-case case-name="configurableServiceOrder-test">
+        <simple-method-test location="component://order/script/org/ofbiz/order/test/ShoppingCartTests.xml" name="testCreateOrderConfigurableServiceProduct"/>
+    </test-case>
 </test-suite>

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Thu Dec 22 11:21:43 2011
@@ -124,7 +124,7 @@ if (productId) {
         }
 
         // Set the default template for aggregated product (product component configurator ui)
-        if (product.productTypeId && "AGGREGATED".equals(product.productTypeId) && context.configproductdetailScreen) {
+        if (product.productTypeId && ("AGGREGATED".equals(product.productTypeId) || "AGGREGATED_SERVICE".equals(product.productTypeId)) && context.configproductdetailScreen) {
             detailScreen = context.configproductdetailScreen;
         }
 

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Thu Dec 22 11:21:43 2011
@@ -101,7 +101,7 @@ ${virtualJavaScript?if_exists}
           <#elseif product.productTypeId?if_exists == "ASSET_USAGE">
             <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a>
           <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen-->
-          <#elseif product.productTypeId?if_exists == "AGGREGATED">
+          <#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE">
             <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderConfigure}...</a>
           <#-- check to see if the product is a virtual product -->
           <#elseif product.isVirtual?exists && product.isVirtual == "Y">

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderitems.ftl Thu Dec 22 11:21:43 2011
@@ -81,6 +81,12 @@ under the License.
                                         </#if>
                                     </div>
                                     <div style="float:right;">
+                                        <#assign downloadContents = delegator.findByAnd("OrderItemAndProductContentInfo", {"orderId" : orderId, "orderItemSeqId" : orderItem.orderItemSeqId, "productContentTypeId" : "DIGITAL_DOWNLOAD", "statusId" : "ITEM_COMPLETED"})/>
+                                        <#if downloadContents?has_content>
+                                            <#list downloadContents as downloadContent>
+                                                <a href="/content/control/ViewSimpleContent?contentId=${downloadContent.contentId}" class="buttontext" target="_blank">${uiLabelMap.ContentDownload}</a>&nbsp;
+                                            </#list>
+                                        </#if>
                                         <a href="/catalog/control/EditProduct?productId=${productId}${externalKeyParam}" class="buttontext" target="_blank">${uiLabelMap.ProductCatalog}</a>
                                         <a href="/ecommerce/control/product?product_id=${productId}" class="buttontext" target="_blank">${uiLabelMap.OrderEcommerce}</a>
                                         <#if orderItemContentWrapper.get("IMAGE_URL")?has_content>

Modified: ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Thu Dec 22 11:21:43 2011
@@ -18,33 +18,33 @@ under the License.
 -->
 
 <script language="JavaScript" type="text/javascript">
-    function editInstruction() {
-        jQuery('#shippingInstructions').css({display:'block'});
-        jQuery('#saveInstruction').css({display:'inline'});
-        jQuery('#editInstruction').css({display:'none'});
-        jQuery('#instruction').css({display:'none'});
+    function editInstruction(shipGroupSeqId) {
+        jQuery('#shippingInstructions_' + shipGroupSeqId).css({display:'block'});
+        jQuery('#saveInstruction_' + shipGroupSeqId).css({display:'inline'});
+        jQuery('#editInstruction_' + shipGroupSeqId).css({display:'none'});
+        jQuery('#instruction_' + shipGroupSeqId).css({display:'none'});
     }
-    function addInstruction() {
-        jQuery('#shippingInstructions').css({display:'block'});
-        jQuery('#saveInstruction').css({display:'inline'});
-        jQuery('#addInstruction').css({display:'none'});
+    function addInstruction(shipGroupSeqId) {
+        jQuery('#shippingInstructions_' + shipGroupSeqId).css({display:'block'});
+        jQuery('#saveInstruction_' + shipGroupSeqId).css({display:'inline'});
+        jQuery('#addInstruction_' + shipGroupSeqId).css({display:'none'});
     }
-    function saveInstruction() {
-        document.updateShippingInstructionsForm.submit();
+    function saveInstruction(shipGroupSeqId) {
+        jQuery("#updateShippingInstructionsForm_" + shipGroupSeqId).submit();
     }
-    function editGiftMessage() {
-        jQuery('#giftMessage').css({display:'block'});
-        jQuery('#saveGiftMessage').css({display:'inline'});
-        jQuery('#editGiftMessage').css({display:'none'});
-        jQuery('#message').css({display:'none'});
+    function editGiftMessage(shipGroupSeqId) {
+        jQuery('#giftMessage_' + shipGroupSeqId).css({display:'block'});
+        jQuery('#saveGiftMessage_' + shipGroupSeqId).css({display:'inline'});
+        jQuery('#editGiftMessage_' + shipGroupSeqId).css({display:'none'});
+        jQuery('#message_' + shipGroupSeqId).css({display:'none'});
     }
-    function addGiftMessage() {
-        jQuery('#giftMessage').css({display:'block'});
-        jQuery('#saveGiftMessage').css({display:'inline'});
-        jQuery('#addGiftMessage').css({display:'none'});
+    function addGiftMessage(shipGroupSeqId) {
+        jQuery('#giftMessage_' + shipGroupSeqId).css({display:'block'});
+        jQuery('#saveGiftMessage_' + shipGroupSeqId).css({display:'inline'});
+        jQuery('#addGiftMessage_' + shipGroupSeqId).css({display:'none'});
     }
-    function saveGiftMessage() {
-        document.setGiftMessageForm.submit();
+    function saveGiftMessage(shipGroupSeqId) {
+        jQuery("#setGiftMessageForm_" + shipGroupSeqId).submit();
     }
 </script>
 
@@ -264,10 +264,12 @@ under the License.
                                 </#list>
                             </select>
                             <#else>
-                            <#if shipGroup.carrierPartyId != "_NA_">
-                            ${shipGroup.carrierPartyId?if_exists}
-                            </#if>
-                            ${shipmentMethodType?if_exists.get("description",locale)?default("")}
+                                <#if (shipGroup.carrierPartyId)?default("_NA_") != "_NA_">
+                                ${shipGroup.carrierPartyId?if_exists}
+                                </#if>
+                                <#if shipmentMethodType?has_content>
+                                    ${shipmentMethodType.get("description",locale)?default("")}
+                                </#if>
                             </#if>
                         </div>
                     </td>
@@ -491,7 +493,7 @@ under the License.
           <td width="5">&nbsp;</td>
           <td align="left" valign="top" width="80%">
             <#if (!orderHeader.statusId.equals("ORDER_COMPLETED")) && !(orderHeader.statusId.equals("ORDER_REJECTED")) && !(orderHeader.statusId.equals("ORDER_CANCELLED"))>
-              <form name="updateShippingInstructionsForm" method="post" action="<@ofbizUrl>setShippingInstructions</@ofbizUrl>">
+              <form id="updateShippingInstructionsForm_${shipGroup.shipGroupSeqId}" name="updateShippingInstructionsForm" method="post" action="<@ofbizUrl>setShippingInstructions</@ofbizUrl>">
                 <input type="hidden" name="orderId" value="${orderHeader.orderId}"/>
                 <input type="hidden" name="shipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/>
                 <#if shipGroup.shippingInstructions?has_content>
@@ -501,15 +503,15 @@ under the License.
                         <label>${shipGroup.shippingInstructions}</label>
                       </td>
                       <td>
-                        <a href="javascript:editInstruction();" class="buttontext" id="editInstruction">${uiLabelMap.CommonEdit}</a>
+                        <a href="javascript:editInstruction('${shipGroup.shipGroupSeqId}');" class="buttontext" id="editInstruction_${shipGroup.shipGroupSeqId}">${uiLabelMap.CommonEdit}</a>
                       </td>
                     </tr>
                   </table>
                 <#else>
-                  <a href="javascript:addInstruction();" class="buttontext" id="addInstruction">${uiLabelMap.CommonAdd}</a>
+                  <a href="javascript:addInstruction('${shipGroup.shipGroupSeqId}');" class="buttontext" id="addInstruction_${shipGroup.shipGroupSeqId}">${uiLabelMap.CommonAdd}</a>
                 </#if>
-                <a href="javascript:saveInstruction();" class="buttontext" id="saveInstruction" style="display:none">${uiLabelMap.CommonSave}</a>
-                <textarea name="shippingInstructions" id="shippingInstructions" style="display:none" rows="0" cols="0">${shipGroup.shippingInstructions?if_exists}</textarea>
+                <a href="javascript:saveInstruction('${shipGroup.shipGroupSeqId}');" class="buttontext" id="saveInstruction_${shipGroup.shipGroupSeqId}" style="display:none">${uiLabelMap.CommonSave}</a>
+                <textarea name="shippingInstructions" id="shippingInstructions_${shipGroup.shipGroupSeqId}" style="display:none" rows="0" cols="0">${shipGroup.shippingInstructions?if_exists}</textarea>
               </form>
             <#else>
               <#if shipGroup.shippingInstructions?has_content>
@@ -529,17 +531,17 @@ under the License.
           </td>
           <td width="5">&nbsp;</td>
           <td>
-            <form name="setGiftMessageForm" method="post" action="<@ofbizUrl>setGiftMessage</@ofbizUrl>">
+            <form id="setGiftMessageForm_${shipGroup.shipGroupSeqId}" name="setGiftMessageForm" method="post" action="<@ofbizUrl>setGiftMessage</@ofbizUrl>">
               <input type="hidden" name="orderId" value="${orderHeader.orderId}"/>
               <input type="hidden" name="shipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/>
               <#if shipGroup.giftMessage?has_content>
                 <label>${shipGroup.giftMessage}</label>
-                <a href="javascript:editGiftMessage();" class="buttontext" id="editGiftMessage">${uiLabelMap.CommonEdit}</a>
+                <a href="javascript:editGiftMessage('${shipGroup.shipGroupSeqId}');" class="buttontext" id="editGiftMessage_${shipGroup.shipGroupSeqId}">${uiLabelMap.CommonEdit}</a>
               <#else>
-                <a href="javascript:addGiftMessage();" class="buttontext" id="addGiftMessage">${uiLabelMap.CommonAdd}</a>
+                <a href="javascript:addGiftMessage('${shipGroup.shipGroupSeqId}');" class="buttontext" id="addGiftMessage_${shipGroup.shipGroupSeqId}">${uiLabelMap.CommonAdd}</a>
               </#if>
-              <textarea name="giftMessage" id="giftMessage" style="display:none" rows="0" cols="0">${shipGroup.giftMessage?if_exists}</textarea>
-              <a href="javascript:saveGiftMessage();" class="buttontext" id="saveGiftMessage" style="display:none">${uiLabelMap.CommonSave}</a>
+              <textarea name="giftMessage" id="giftMessage_${shipGroup.shipGroupSeqId}" style="display:none" rows="0" cols="0">${shipGroup.giftMessage?if_exists}</textarea>
+              <a href="javascript:saveGiftMessage('${shipGroup.shipGroupSeqId}');" class="buttontext" id="saveGiftMessage_${shipGroup.shipGroupSeqId}" style="display:none">${uiLabelMap.CommonSave}</a>
             </form>
           </td>
         </tr>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml Thu Dec 22 11:21:43 2011
@@ -160,6 +160,7 @@ under the License.
     <GoodIdentificationType description="UPCE" goodIdentificationTypeId="UPCE" hasTable="N" parentTypeId=""/>
     <GoodIdentificationType description="EAN" goodIdentificationTypeId="EAN" hasTable="N" parentTypeId=""/>
     <GoodIdentificationType description="Library of Congress" goodIdentificationTypeId="LOC" hasTable="N" parentTypeId=""/>
+    <GoodIdentificationType description="Harmonized System Codes (HS Code)" goodIdentificationTypeId="HS_CODE" hasTable="N" parentTypeId=""/>
 
     <InventoryItemType description="Serialized" hasTable="N" inventoryItemTypeId="SERIALIZED_INV_ITEM" parentTypeId=""/>
     <InventoryItemType description="Non-Serialized" hasTable="N" inventoryItemTypeId="NON_SERIAL_INV_ITEM" parentTypeId=""/>
@@ -499,7 +500,9 @@ under the License.
     <ProductType description="Work In Process" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="GOOD" productTypeId="WIP"/>
     <ProductType description="Configurable Good Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED" productTypeId="AGGREGATED_CONF"/>
     <ProductType description="Fixed Asset Usage For Rental of an asset which is shipped from and returned to inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="ASSET_USAGE_OUT_IN"/>
-    <ProductType description="Service a product which is received to- and shipped from inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/>
+    <ProductType description="Service a product using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/>
+    <ProductType description="Configurable Service using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="SERVICE_PRODUCT" productTypeId="AGGREGATED_SERVICE"/>
+    <ProductType description="Configurable Service Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED_SERVICE" productTypeId="AGGREGATEDSERV_CONF"/>
     
     <EnumerationType description="Product Requirement Method" enumTypeId="PROD_REQ_METHOD" hasTable="N" parentTypeId=""/>
     <!-- NONE: no requirement is created (default) -->

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Thu Dec 22 11:21:43 2011
@@ -53,6 +53,7 @@ under the License.
                         <or>
                             <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/>
                             <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/>
+                            <if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/>
                         </or>
                     </condition>
                     <then>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Thu Dec 22 11:21:43 2011
@@ -53,6 +53,7 @@ under the License.
                 <or>
                     <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/>
                     <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/>
+                    <if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/>
                 </or>
             </condition>
             <then>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Thu Dec 22 11:21:43 2011
@@ -97,7 +97,7 @@ public class ProductConfigWrapper implem
 
     private void init(Delegator delegator, LocalDispatcher dispatcher, String productId, String productStoreId, String catalogId, String webSiteId, String currencyUomId, Locale locale, GenericValue autoUserLogin) throws Exception {
         product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
-        if (product == null || !product.getString("productTypeId").equals("AGGREGATED")) {
+        if (product == null || !product.getString("productTypeId").equals("AGGREGATED") && !product.getString("productTypeId").equals("AGGREGATED_SERVICE")) {
             throw new ProductConfigWrapperException("Product " + productId + " is not an AGGREGATED product.");
         }
         this.dispatcher = dispatcher;
@@ -123,7 +123,7 @@ public class ProductConfigWrapper implem
             basePrice = price;
         }
         questions = FastList.newInstance();
-        if ("AGGREGATED".equals(product.getString("productTypeId"))) {
+        if ("AGGREGATED".equals(product.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) {
             List<GenericValue> questionsValues = delegator.findByAnd("ProductConfig", UtilMisc.toMap("productId", productId), UtilMisc.toList("sequenceNum"));
             questionsValues = EntityUtil.filterByDate(questionsValues);
             Set<String> itemIds = FastSet.newInstance();

Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java Thu Dec 22 11:21:43 2011
@@ -146,7 +146,7 @@ public class ProductWorker {
     public static String getInstanceAggregatedId(Delegator delegator, String instanceProductId) throws GenericEntityException {
         GenericValue instanceProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", instanceProductId));
 
-        if (UtilValidate.isNotEmpty(instanceProduct) && "AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId"))) {
+        if (UtilValidate.isNotEmpty(instanceProduct) && ("AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(instanceProduct.getString("productTypeId")))) {
             GenericValue productAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(instanceProduct.getRelatedByAnd("AssocProductAssoc",
                     UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"))));
             if (UtilValidate.isNotEmpty(productAssoc)) {
@@ -172,7 +172,7 @@ public class ProductWorker {
     public static List<GenericValue> getAggregatedAssocs(Delegator delegator, String  aggregatedProductId) throws GenericEntityException {
         GenericValue aggregatedProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", aggregatedProductId));
 
-        if (UtilValidate.isNotEmpty(aggregatedProduct) && "AGGREGATED".equals(aggregatedProduct.getString("productTypeId"))) {
+        if (UtilValidate.isNotEmpty(aggregatedProduct) && ("AGGREGATED".equals(aggregatedProduct.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId")))) {
             List<GenericValue> productAssocs = EntityUtil.filterByDate(aggregatedProduct.getRelatedByAnd("MainProductAssoc",
                     UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF")));
             return productAssocs;
@@ -1193,4 +1193,16 @@ nextProd:
         return Boolean.TRUE;
     }
 
+    public static boolean isAggregateService(Delegator delegator, String aggregatedProductId) {
+        try {
+            GenericValue aggregatedProduct = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", aggregatedProductId));
+            if (UtilValidate.isNotEmpty(aggregatedProduct) && "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId"))) {
+                return true;
+            }
+        } catch (GenericEntityException e) {
+            Debug.logWarning(e.getMessage(), module);
+        }
+
+        return false;
+    }
 }

Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/reviews/pendingReviews.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/reviews/pendingReviews.ftl?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/reviews/pendingReviews.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/reviews/pendingReviews.ftl Thu Dec 22 11:21:43 2011
@@ -74,19 +74,21 @@ under the License.
                           ${review.postedDateTime?if_exists}
                       </td>
                       <td>
-                      <#if postedPerson?has_content>
+                      <#if review.userLoginId?has_content && postedPerson?has_content>
+                        <td>
                         <#if postedPerson.firstName?has_content && postedPerson.lastName?has_content>
                             ${postedPerson.firstName} ${postedPerson.lastName}
                         <#else>
                             ${postedPerson.groupName}
                         </#if>
+                        </td>
                       <#else>
                           <td></td>
                       </#if>
                       </td>
                       <td>
                           <select name='postedAnonymous_o_${rowCount}'>
-                              <option>${review.postedAnonymous?default("N")}</option>
+                              <option value="${review.postedAnonymous?default("N")}">${review.postedAnonymous?default("N")}</option>
                               <option value="${review.postedAnonymous?default("N")}">----</option>
                               <option value="N">${uiLabelMap.CommonN}</option>
                               <option value="Y">${uiLabelMap.CommonY}</option>

Modified: ofbiz/branches/jackrabbit20100709/framework/common/widget/HelpScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/widget/HelpScreens.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/widget/HelpScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/widget/HelpScreens.xml Thu Dec 22 11:21:43 2011
@@ -76,10 +76,17 @@ under the License.
                         <if-empty field="parameters.portalPageId"/>
                     </condition>
                     <actions>
-                        <entity-and entity-name="ContentAssoc" list="contentAssocs">
-                            <field-map field-name="mapKey" from-field="parameters.helpTopic"/>
+                        <entity-condition entity-name="ContentAssoc" list="contentAssocs">
+                            <condition-list>
+                                <condition-expr field-name="mapKey" from-field="parameters.helpTopic"/>
+                                <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
+                                <condition-list combine="or">
+                                    <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/>
+                                    <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
+                                </condition-list>
+                            </condition-list>
                             <order-by field-name="sequenceNum"/>
-                        </entity-and>
+                        </entity-condition>
                         <set field="contentId" from-field="contentAssocs[0].contentIdTo"/>
                         <entity-one entity-name="Content" value-field="content"/>
                     </actions>
@@ -168,11 +175,18 @@ under the License.
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleNavigateContent"/>
-                <entity-and entity-name="ContentAssoc" list="contentAssoc">
-                    <field-map field-name="contentId" value="HELP_ROOT"/>
-                    <field-map field-name="contentAssocTypeId" value="TREE_CHILD"/>
+                <entity-condition entity-name="ContentAssoc" list="contentAssoc">
+                    <condition-list>
+                        <condition-expr field-name="contentId" value="HELP_ROOT"/>
+                        <condition-expr field-name="contentAssocTypeId" value="TREE_CHILD"/>
+                        <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/>
+                        <condition-list combine="or">
+                            <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/>
+                            <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
+                        </condition-list>
+                    </condition-list>
                     <order-by field-name="sequenceNum"/>
-                </entity-and>
+                </entity-condition>
                 <set field="contentId" from-field="parameters.contentId" default-value="HELP_ROOT"/>
             </actions>
             <widgets>

Propchange: ofbiz/branches/jackrabbit20100709/framework/common/widget/HelpScreens.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 22 11:21:43 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/framework/common/widget/HelpScreens.xml:951708-952957
 /ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264
-/ofbiz/trunk/framework/common/widget/HelpScreens.xml:962442-1186940
+/ofbiz/trunk/framework/common/widget/HelpScreens.xml:962442-1222180

Modified: ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java Thu Dec 22 11:21:43 2011
@@ -354,7 +354,7 @@ public class EntitySyncContext {
                 long valuesPerEntity = 0;
                 while ((nextValue = eli.next()) != null) {
                     // sort by the tx stamp and then the record stamp
-                    // find first value in valuesToStore list, starting with the current insertBefore value, that has a CREATE_STAMP_TX_FIELD after the nextValue.CREATE_STAMP_TX_FIELD, then do the same with CREATE_STAMP_FIELD
+                    // find first value in valuesToCreate list, starting with the current insertBefore value, that has a CREATE_STAMP_TX_FIELD after the nextValue.CREATE_STAMP_TX_FIELD, then do the same with CREATE_STAMP_FIELD
                     while (insertBefore < valuesToCreate.size() && valuesToCreate.get(insertBefore).getTimestamp(ModelEntity.CREATE_STAMP_TX_FIELD).before(nextValue.getTimestamp(ModelEntity.CREATE_STAMP_TX_FIELD))) {
                         insertBefore++;
                     }
@@ -441,7 +441,13 @@ public class EntitySyncContext {
             }
             Debug.logInfo(toCreateInfo.toString(), module);
         }
-
+        
+        // As the this.nextCreateTxTime calculation is only based on entities without values to create, if there at least one value to create returned
+        // this calculation is false, so it needs to be nullified
+        if (valuesToCreate.size() > 0) {
+            this.nextCreateTxTime = null;
+        }
+        
         return valuesToCreate;
     }
 
@@ -579,6 +585,12 @@ public class EntitySyncContext {
             }
             Debug.logInfo(toStoreInfo.toString(), module);
         }
+        
+        // As the this.nextUpdateTxTime calculation is only based on entities without values to store, if there at least one value to store returned
+        // this calculation is false, so it needs to be nullified
+        if (valuesToStore.size() > 0) {
+            this.nextUpdateTxTime = null;
+        }        
 
         return valuesToStore;
     }
@@ -653,8 +665,8 @@ public class EntitySyncContext {
                 eliNext.close();
                 if (firstVal != null) {
                     Timestamp nextTxTime = firstVal.getTimestamp(ModelEntity.STAMP_TX_FIELD);
-                    if (this.nextUpdateTxTime == null || nextTxTime.before(this.nextUpdateTxTime)) {
-                        this.nextUpdateTxTime = nextTxTime;
+                    if (this.nextRemoveTxTime == null || nextTxTime.before(this.nextRemoveTxTime)) {
+                        this.nextRemoveTxTime = nextTxTime;
                     }
                 }
             }
@@ -695,6 +707,12 @@ public class EntitySyncContext {
             Debug.logInfo(toRemoveInfo.toString(), module);
         }
 
+        // As this.nextRemoveTxTime calculation is only based on entities without keys to remove, if there at least one key to remove returned
+        // this calculation is false, so it needs to be nullified
+        if (keysToRemove.size() > 0) {
+            this.nextRemoveTxTime = null;
+        }
+        
         return keysToRemove;
     }
 

Modified: ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/test.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/test.properties?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/test.properties (original)
+++ ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/test.properties Thu Dec 22 11:21:43 2011
@@ -59,5 +59,8 @@ ofbiz.instrumenterFile=runtime/logs/cobe
 # --- By default we will find base/config/debug.properties and point to there
 #log4j.configuration=log4j.xml
 
+# -- The default locale for this OFBiz instance.
+ofbiz.locale.default=en
+
 # --- Tells AWT (i.e. JasperReports/FOP/etc) to not require a head (X11)
 java.awt.headless=true

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd Thu Dec 22 11:21:43 2011
@@ -356,6 +356,7 @@ under the License.
     <xs:element name="sort-field">
         <xs:complexType>
             <xs:attributeGroup ref="attlist.sort-field"/>
+            <xs:attribute name="position" type="xs:positiveInteger"/>
         </xs:complexType>
     </xs:element>
     <xs:attributeGroup name="attlist.sort-field">

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Thu Dec 22 11:21:43 2011
@@ -1424,7 +1424,7 @@ public class MacroFormRenderer implement
         Iterator<ModelFormField> submitFields = modelForm.getMultiSubmitFields().iterator();
         while (submitFields.hasNext()) {
             ModelFormField submitField = submitFields.next();
-            if (submitField != null) {
+            if (submitField != null && submitField.shouldUse(context)) {
 
                 // Threw this in that as a hack to keep the submit button from expanding the first field
                 // Needs a more rugged solution

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Thu Dec 22 11:21:43 2011
@@ -132,7 +132,7 @@ public class ModelForm extends ModelWidg
     protected List<AltTarget> altTargets = FastList.newInstance();
     protected List<AutoFieldsService> autoFieldsServices = FastList.newInstance();
     protected List<AutoFieldsEntity> autoFieldsEntities = FastList.newInstance();
-    protected List<String> sortOrderFields = FastList.newInstance();
+    protected List<SortField> sortOrderFields = FastList.newInstance();
     protected List<AltRowStyle> altRowStyles = FastList.newInstance();
 
     /** This List will contain one copy of each field for each field name in the order
@@ -538,7 +538,8 @@ public class ModelForm extends ModelWidg
                 String tagName = sortFieldElement.getTagName();
                 if (tagName.equals("sort-field")) {
                     String fieldName = sortFieldElement.getAttribute("name");
-                    this.sortOrderFields.add(fieldName);
+                    String position = sortFieldElement.getAttribute("position");
+                    this.sortOrderFields.add(new SortField(fieldName, position));
                     this.fieldGroupMap.put(fieldName, lastFieldGroup);
                 } else if (tagName.equals("banner")) {
                     Banner thisBanner = new Banner(sortFieldElement, this);
@@ -559,7 +560,8 @@ public class ModelForm extends ModelWidg
         // reorder fields according to sort order
         if (sortOrderFields.size() > 0) {
             List<ModelFormField> sortedFields = FastList.newInstance();
-            for (String fieldName: this.sortOrderFields) {
+            for (SortField sortField: this.sortOrderFields) {
+                String fieldName = sortField.getFieldName();
                 if (UtilValidate.isEmpty(fieldName)) {
                     continue;
                 }
@@ -570,6 +572,9 @@ public class ModelForm extends ModelWidg
                     ModelFormField modelFormField = fieldIter.next();
                     if (fieldName.equals(modelFormField.getName())) {
                         // matched the name; remove from the original last and add to the sorted list
+                        if (UtilValidate.isNotEmpty(sortField.getPosition())) {
+                            modelFormField.setPosition(sortField.getPosition());
+                        }
                         fieldIter.remove();
                         sortedFields.add(modelFormField);
                     }
@@ -2894,6 +2899,35 @@ public class ModelForm extends ModelWidg
         }
     }
 
+    public static class SortField {
+        protected String fieldName;
+        protected Integer position = null;
+
+        public SortField(String name, String position) {
+            this.fieldName = name;
+            if (UtilValidate.isNotEmpty(position)){
+                Integer posParam = null;
+                try {
+                    posParam = Integer.valueOf(position);
+                }
+                catch(Exception e) {/* just ignore the exception*/}
+                this.position = posParam;
+            }
+        }
+
+        public SortField(String name) {
+            this(name, null);
+        }
+
+        public String getFieldName() {
+            return this.fieldName;
+        }
+
+        public Integer getPosition() {
+            return this.position;
+        }
+    }
+
     public static interface FieldGroupBase {}
 
     public static class FieldGroup implements FieldGroupBase {
@@ -2923,7 +2957,7 @@ public class ModelForm extends ModelWidg
                 }
 
                 for (Element sortFieldElement: UtilXml.childElementList(sortOrderElement, "sort-field")) {
-                    modelForm.sortOrderFields.add(sortFieldElement.getAttribute("name"));
+                    modelForm.sortOrderFields.add(new SortField(sortFieldElement.getAttribute("name"),sortFieldElement.getAttribute("position")));
                     modelForm.fieldGroupMap.put(sortFieldElement.getAttribute("name"), this);
                 }
             } else {

Modified: ofbiz/branches/jackrabbit20100709/rc.ofbiz.for.ubuntu
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/rc.ofbiz.for.ubuntu?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/rc.ofbiz.for.ubuntu (original)
+++ ofbiz/branches/jackrabbit20100709/rc.ofbiz.for.ubuntu Thu Dec 22 11:21:43 2011
@@ -26,7 +26,7 @@
 
 # the userlogin the script should run under and is the home dirname, in this case /home/ofbiz/ofbiz
 OFBIZUSER="ofbiz"
-OFBIZDIR=""ofbiz"
+OFBIZDIR="ofbiz"
 
 #============== no need to change anything below this line =======================
 
@@ -38,8 +38,8 @@ start() {
         return 0
     fi
     if [ "$USER" = "$OFBIZUSER" ]; then
-        echo "starting standard /home/$OFBIZUSER/$OFBIZDIR/startofbiz.sh"
-        cd /home/$OFBIZUSER/$OFBIZDIR
+        echo "starting standard ~/$OFBIZDIR/startofbiz.sh"
+        cd ~/$OFBIZDIR
         ./startofbiz.sh
         if [ $? = 0 ]; then
             echo "start success"
@@ -53,7 +53,7 @@ start() {
 stop() {
     if [ "$USER" = "$OFBIZUSER" ]; then
         echo "stopping standard /home/$OFBIZUSER/$OFBIZDIR/stopofbiz.sh"
-        cd /home/$OFBIZUSER/$OFBIZDIR
+        cd ~/$OFBIZDIR
     MAXCOUNT=10
         COUNTER=0
         until [ $COUNTER -gt $MAXCOUNT ]; do
@@ -119,6 +119,5 @@ case "$1" in
         exit 1
     ;;
 esac
-echo
 exit $?
 

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml?rev=1222182&r1=1222181&r2=1222182&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml Thu Dec 22 11:21:43 2011
@@ -122,7 +122,7 @@ under the License.
     <PartyRole partyId="DemoCustomer" roleTypeId="BILL_TO_CUSTOMER"/>
     <PartyGeoPoint partyId="DemoCustomer" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
     <PartyRelationship partyIdFrom="DemoCustCompany" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
-
+    <UserLoginSecurityGroup groupId="ECOMMERCE_CUSTOMER" userLoginId="DemoCustomer" fromDate="2000-01-01 00:00:00.0"/>
 
     <ContactMech contactMechId="9015" contactMechTypeId="POSTAL_ADDRESS"/>
     <PostalAddress contactMechId="9015" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000"/>