svn commit: r1213245 [3/3] - in /ofbiz/branches/jackrabbit20100709: ./ applications/content/src/org/ofbiz/content/content/ applications/marketing/widget/sfa/ applications/marketing/widget/sfa/forms/ applications/order/config/ applications/order/src/org...

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

svn commit: r1213245 [3/3] - in /ofbiz/branches/jackrabbit20100709: ./ applications/content/src/org/ofbiz/content/content/ applications/marketing/widget/sfa/ applications/marketing/widget/sfa/forms/ applications/order/config/ applications/order/src/org...

sascharodekamp
Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Dec 12 13:53:03 2011
@@ -137,17 +137,23 @@ under the License.
 
                   jQuery("#${id}").change(function() {
                       var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
-                      var dateObj = Date.parseExact(this.value, ofbizTime);
-                      var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists && !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
-                      var formatedObj = dateObj.toString(dateFormat);
-                      jQuery("#${id}_i18n").val(formatedObj);
+                      var newValue = ""
+                      if (this.value != "") {
+                          var dateObj = Date.parseExact(this.value, ofbizTime);
+                          var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists && !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
+                          newValue = dateObj.toString(dateFormat);
+                      }
+                      jQuery("#${id}_i18n").val(newValue);
                   });
                   jQuery("#${id}_i18n").change(function() {
                       var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists && !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
-                      var dateObj = Date.parseExact(this.value, dateFormat);
-                      var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
-                      var formatedObj = dateObj.toString(ofbizTime);
-                      jQuery("#${id}").val(formatedObj);
+                      var newValue = ""
+                      if (this.value != "") {
+                          var dateObj = Date.parseExact(this.value, dateFormat);
+                          var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+                          newValue = dateObj.toString(ofbizTime);
+                      }
+                      jQuery("#${id}").val(newValue);
                   });
               } else {
                   <#-- fallback if no language specific js date file is found -->

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProductAdditionalViewData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProductAdditionalViewData.xml?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProductAdditionalViewData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProductAdditionalViewData.xml Mon Dec 12 13:53:03 2011
@@ -40,7 +40,7 @@ under the License.
     <Content contentId="GZ-2644-Add3-CTNT-T" contentTypeId="DOCUMENT" contentName="web_browser4.png" dataResourceId="GZ-2644-Add3-T" statusId="CTNT_IN_PROGRESS"/>
     <ContentAssoc contentId="GZ-2644-Add3-CTNT" contentIdTo="GZ-2644-Add3-CTNT-T" contentAssocTypeId="IMAGE_THUMBNAIL" fromDate="2001-05-13 12:00:00.0"/>
 
-    <DataResource dataResourceId="GZ-2644-Add4" dataResourceTypeId="IMAGE_OBJECT" dataTemplateTypeId="NONE" dataResourceName="web_browser5.png" objectInfo="/images/products/GZ-2644/web_browser5.png" isPublic="Y"/>
+    <DataResource dataResourceId="GZ-2644-Add4" dataResourceTypeId="IMAGE_OBJECT" dataTemplateTypeId="NONE" dataResourceName="web_browser5.png" objectInfo="/images/products/GZ-2644/web_browser5.png" isPublic="N"/>
     <Content contentId="GZ-2644-Add4-CTNT" contentTypeId="DOCUMENT" contentName="web_browser5.png" dataResourceId="GZ-2644-Add4" statusId="IM_APPROVED"/>
     <ProductContent productId="GZ-2644" contentId="GZ-2644-Add4-CTNT" productContentTypeId="IMAGE" fromDate="2001-05-13 12:00:00.0"/>
     <DataResource dataResourceId="GZ-2644-Add1-T" dataResourceTypeId="IMAGE_OBJECT" dataTemplateTypeId="NONE" dataResourceName="web_browser5.png" objectInfo="/images/products/GZ-2644/web_browser5.png" isPublic="Y"/>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Mon Dec 12 13:53:03 2011
@@ -48,6 +48,7 @@ under the License.
         <event name="autoLoginCheck" type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="autoLoginCheck"/>
         <event name="checkTrackingCodeCookies" type="java" path="org.ofbiz.marketing.tracking.TrackingCodeEvents" invoke="checkTrackingCodeCookies"/>
         <event name="setDefaultStoreSettings" type="java" path="org.ofbiz.product.product.ProductEvents" invoke="setDefaultStoreSettings"/>
+        <event name="createGuestShoppingListCookies" type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="createGuestShoppingListCookies"/>
         <event name="restoreAutoSaveList" type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="restoreAutoSaveList"/>
     </firstvisit>
 
@@ -75,6 +76,7 @@ under the License.
         <event name="restoreAutoSaveList" type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="restoreAutoSaveList"/>
         <!-- after login and restoring from the auto-save list, save everything to the auto-save list to handle anything that may have already been in the cart before login -->
         <event name="saveCartToAutoSaveList" type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="saveCartToAutoSaveList"/>
+        <event name="clearGuestShoppingListCookies" type="java" path="org.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="clearGuestShoppingListCookies"/>
     </after-login>
 
     <!-- default request; call into CMS -->

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/web.xml?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/web.xml Mon Dec 12 13:53:03 2011
@@ -63,7 +63,6 @@ under the License.
         <display-name>CatalogUrlFilter</display-name>
         <filter-class>org.ofbiz.product.category.CatalogUrlFilter</filter-class>
         <init-param><param-name>defaultLocaleString</param-name><param-value>en_US</param-value></init-param>
-        <init-param><param-name>redirectUrl</param-name><param-value>/control/main</param-value></init-param>
     </filter>
     <filter>
         <filter-name>ContentUrlFilter</filter-name>
@@ -73,7 +72,6 @@ under the License.
             <param-name>defaultLocaleString</param-name>
             <param-value>en_US</param-value>
         </init-param>
-        <init-param><param-name>redirectUrl</param-name><param-value>/control/main</param-value></init-param>
         <init-param><param-name>viewRequest</param-name><param-value>ViewBlogArticle</param-value></init-param>
     </filter>
     <filter>
@@ -88,14 +86,6 @@ under the License.
             <param-name>allowedPaths</param-name>
             <param-value>/error:/control:/products:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images</param-value>
         </init-param>
-        <init-param>
-            <param-name>errorCode</param-name>
-            <param-value>403</param-value>
-        </init-param>
-        <init-param>
-            <param-name>redirectPath</param-name>
-            <param-value>/control/main</param-value>
-        </init-param>
     </filter>
     <filter-mapping>
         <filter-name>CatalogUrlFilter</filter-name>
@@ -110,6 +100,11 @@ under the License.
         <url-pattern>/*</url-pattern>
     </filter-mapping>
 
+    <error-page>
+        <error-code>404</error-code>
+        <location>/error/404.jsp</location>
+    </error-page>
+
     <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
     <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
     <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl Mon Dec 12 13:53:03 2011
@@ -272,7 +272,17 @@ function setAlternateGwp(field) {
                     <#-- this is a non-product item -->
                     ${cartLine.getItemTypeDescription()?if_exists}: ${cartLine.getName()?if_exists}
                   </#if>
-
+                  <#assign attrs = cartLine.getOrderItemAttributes()/>
+                  <#if attrs?has_content>
+                    <#assign attrEntries = attrs.entrySet()/>
+                    <ul>
+                    <#list attrEntries as attrEntry>
+                        <li>
+                            ${attrEntry.getKey()} : ${attrEntry.getValue()}
+                        </li>
+                    </#list>
+                    </ul>
+                  </#if>
                 <#if (cartLine.getIsPromo() && cartLine.getAlternativeOptionProductIds()?has_content)>
                   <#-- Show alternate gifts if there are any... -->
                   <div class="tableheadtext">${uiLabelMap.OrderChooseFollowingForGift}:</div>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl Mon Dec 12 13:53:03 2011
@@ -541,6 +541,11 @@ ${virtualVariantJavaScript?if_exists}
           <form method="post" action="<@ofbizUrl>additem</@ofbizUrl>" name="addform"  style="margin: 0;">
           <fieldset>
             <#assign inStock = true />
+            <#assign commentEnable = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("order.properties", "order.item.comment.enable")>
+            <#if commentEnable.equals("Y")>
+                <#assign orderItemAttr = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("order.properties", "order.item.attr.prefix")>
+                ${uiLabelMap.CommonComment}&nbsp;<input type="text" name="${orderItemAttr}comment"/>
+            </#if>
             <#-- Variant Selection -->
             <#if product.isVirtual?if_exists?upper_case == "Y">
               <#if product.virtualVariantMethodEnum?if_exists == "VV_FEATURETREE" && featureLists?has_content>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl Mon Dec 12 13:53:03 2011
@@ -123,6 +123,16 @@ under the License.
           <#assign product = orderItem.getRelatedOneCache("Product")?if_exists/> <#-- should always exist because of FK constraint, but just in case -->
           <td >
             <a href="<@ofbizCatalogAltUrl fullPath="true" secure="false" productId=orderItem.productId/>" class="linktext">${orderItem.productId} - ${orderItem.itemDescription?default("")}</a>
+            <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute")/>
+            <#if orderItemAttributes?has_content>
+                <ul>
+                <#list orderItemAttributes as orderItemAttribute>
+                    <li>
+                        ${orderItemAttribute.attrName} : ${orderItemAttribute.attrValue}
+                    </li>
+                </#list>
+                </ul>
+            </#if>
             <#if product?has_content>
               <#if product.piecesIncluded?exists && product.piecesIncluded?long != 0>
                   [${uiLabelMap.OrderPieces}: ${product.piecesIncluded}]

Modified: ofbiz/branches/jackrabbit20100709/themes/bizznesstime/includes/messages.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/themes/bizznesstime/includes/messages.ftl?rev=1213245&r1=1213244&r2=1213245&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/themes/bizznesstime/includes/messages.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/themes/bizznesstime/includes/messages.ftl Mon Dec 12 13:53:03 2011
@@ -36,20 +36,30 @@ under the License.
 
 <#-- display the error messages -->
 <#if (errorMessage?has_content || errorMessageList?has_content)>
-<script type="text/javascript">
-    document.observe('dom:loaded', function() {
-        humanMsg.displayMsg('<div class="errorMessage"><#if errorMessage?has_content><p>${errorMessage}</p></#if><#if errorMessageList?has_content><#list errorMessageList as errorMsg><p>${errorMsg}</p></#list></#if></p></div>');
-        return false;
-    });
-</script>
+  <div id="content-messages" class="content-messages errorMessage" onclick="document.getElementById('content-messages').parentNode.removeChild(this)">
+    <p>${uiLabelMap.CommonFollowingErrorsOccurred}:</p>
+    <#if errorMessage?has_content>
+      <p>${errorMessage}</p>
+    </#if>
+    <#if errorMessageList?has_content>
+      <#list errorMessageList as errorMsg>
+        <p>${errorMsg}</p>
+      </#list>
+    </#if>
+  </div>
 </#if>
 
 <#-- display the event messages -->
 <#if (eventMessage?has_content || eventMessageList?has_content)>
-<script type="text/javascript">
-    document.observe('dom:loaded', function() {
-        humanMsg.displayMsg('<div class="eventMessage"><#if eventMessage?has_content><p>${eventMessage}</p></#if><#if eventMessageList?has_content><#list eventMessageList as eventMsg><p>${eventMsg}</p></#list></#if></div>');
-        return false;
-    });
-</script>
+  <div id="content-messages" class="content-messages eventMessage" onclick="document.getElementById('content-messages').parentNode.removeChild(this)">
+    <p>${uiLabelMap.CommonFollowingOccurred}:</p>
+    <#if eventMessage?has_content>
+      <p>${eventMessage}</p>
+    </#if>
+    <#if eventMessageList?has_content>
+      <#list eventMessageList as eventMsg>
+        <p>${eventMsg}</p>
+      </#list>
+    </#if>
+  </div>
 </#if>