This looks really ugly, and I don't understand the need for it. We already share JavaScripts across applications, so what makes this one different?

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 7/21/2014 8:32 AM, jler...@apache.org wrote:
Author: jleroux
Date: Mon Jul 21 07:32:10 2014
New Revision: 1612202

URL: http://svn.apache.org/r1612202
Log:
Since we removed the specialpurpose components (but ecommerce), there was an 
issue with ordermgr js scripts.

The problem was double. It'd have been easy to add the missing "/js:" patch in 
allowedPaths in the web.xml of birt component from where the js scripts are now expected 
to be loaded in trunk.
But then you would need to also copy the js scripst there (in birt component). 
You could not simply move them because for upcoming branches we also need them 
in ordermgr component (they were there in images/js) else they would miss again.

This commit rather adds them under a simple ordermgr-js new webapp (simple, ie 
like framework/images, only to load resources) under commonext: 
applications/commonext/webapp/ordermgr-js to prevent the duplication 
maintenance hazards.

Added:
     ofbiz/trunk/applications/commonext/webapp/ordermgr-js/
       - copied from r1611410, 
ofbiz/trunk/applications/order/webapp/ordermgr/images/js/
Removed:
     ofbiz/trunk/applications/order/webapp/ordermgr/images/js/
Modified:
     ofbiz/trunk/applications/commonext/ofbiz-component.xml
     ofbiz/trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml
     ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
     ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
     ofbiz/trunk/specialpurpose/ecommerce/widget/CustomerScreens.xml
     ofbiz/trunk/specialpurpose/ecommerce/widget/OrderScreens.xml

Modified: ofbiz/trunk/applications/commonext/ofbiz-component.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/ofbiz-component.xml?rev=1612202&r1=1612201&r2=1612202&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/ofbiz-component.xml (original)
+++ ofbiz/trunk/applications/commonext/ofbiz-component.xml Mon Jul 21 07:32:10 
2014
@@ -44,4 +44,12 @@ under the License.
          location="webapp/ofbizsetup"
          base-permission="OFBTOOLS,SETUP"
          mount-point="/ofbizsetup"/>
+
+    <webapp name="ordermgr-js"
+        title="ordermgr-js"
+        server="default-server"
+        location="webapp/ordermgr-js"
+        mount-point="/ordermgr-js"
+        app-bar-display="false"/>
+
  </ofbiz-component>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml?rev=1612202&r1=1612201&r2=1612202&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml 
(original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml Mon 
Jul 21 07:32:10 2014
@@ -88,7 +88,7 @@ under the License.
                  <set field="titleProperty" value="PageTitleReturnHeader"/>
                  <set field="headerItem" value="return"/>
                  <set field="tabButtonItem" value="OrderReturnHeader"/>
-                <set field="layoutSettings.javaScripts[+0]" 
value="/ordermgr/images/js/return.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/ordermgr-js/return.js" 
global="true"/>
                  <property-to-field field="defaultCurrencyUomId" resource="general" 
property="currency.uom.id.default" default="USD"/>
                  <script 
location="component://order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy"/>
              </actions>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=1612202&r1=1612201&r2=1612202&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml 
(original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Mon Jul 
21 07:32:10 2014
@@ -52,9 +52,9 @@ under the License.
              <actions>
                  <set field="titleProperty" value="OrderViewOrder"/>
                  <set field="headerItem" value="findorders"/>
-                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr/images/js/order.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr/images/js/OrderShippingInfo.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr/images/js/geoAutoCompleter.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/ordermgr-js/order.js" 
global="true"/>
+                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr-js/OrderShippingInfo.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr-js/geoAutoCompleter.js" global="true"/>
                  <script 
location="component://order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy"/>
                  <script 
location="component://order/webapp/ordermgr/WEB-INF/actions/order/OrderViewWebSecure.groovy"/>
              </actions>

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=1612202&r1=1612201&r2=1612202&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml 
(original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Mon 
Jul 21 07:32:10 2014
@@ -1093,7 +1093,7 @@ under the License.
                  <entity-one entity-name="Facility" value-field="facility"/>
                  <property-map resource="ProductUiLabels" 
map-name="uiLabelMap"/>
                  <set field="title" 
value="${uiLabelMap.ProductReceiveInventory}"/>
-                <set field="layoutSettings.javaScripts[+0]" 
value="/ordermgr/images/js/ConvertUom.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" 
value="/ordermgr-js/ConvertUom.js" global="true"/>
              </actions>
              <widgets>
                  <decorator-screen name="CommonFacilityDecorator" 
location="${parameters.commonFacilityDecoratorLocation}">

Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/CustomerScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/CustomerScreens.xml?rev=1612202&r1=1612201&r2=1612202&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/CustomerScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/CustomerScreens.xml Mon Jul 21 
07:32:10 2014
@@ -553,7 +553,7 @@ under the License.
                  <property-map resource="SecurityextUiLabels" map-name="uiLabelMap" 
global="true"/>
                  <set field="titleProperty" value="PageTitleNewCustomer"/>
                  <set field="layoutSettings.javaScripts[]" 
value="/ecommerce/images/profile.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr/images/js/geoAutoCompleter.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr-js/geoAutoCompleter.js" global="true"/>
              </actions>
              <widgets>
                  <decorator-screen name="main-decorator" 
location="${parameters.mainDecoratorLocation}">
@@ -616,7 +616,7 @@ under the License.
                  <set field="partyId" from-field="userLogin.partyId"/>

                  <set field="layoutSettings.javaScripts[]" 
value="/ecommerce/images/profile.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr/images/js/geoAutoCompleter.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr-js/geoAutoCompleter.js" global="true"/>
                  <script 
location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy"/>
                  <script 
location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy"/>
                  <script 
location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy"/>

Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/OrderScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/OrderScreens.xml?rev=1612202&r1=1612201&r2=1612202&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/OrderScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/OrderScreens.xml Mon Jul 21 
07:32:10 2014
@@ -612,7 +612,7 @@ under the License.
              <actions>
                  <set field="titleProperty" value="EcommerceOnePageCheckout"/>
                  <set field="layoutSettings.javaScripts[]" 
value="/ecommerce/images/checkoutProcess.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr/images/js/geoAutoCompleter.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" 
value="/ordermgr-js/geoAutoCompleter.js" global="true"/>
                  <script 
location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy"/>
                  <script 
location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy"/>
                  <script 
location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy"/>


Reply via email to