You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2008/11/17 12:15:19 UTC
svn commit: r718220 - in
/ofbiz/trunk/applications/ecommerce/webapp/ecommerce:
customer/profile/EditShipToAddress.ftl customer/profile/NewCustomer.ftl
images/geoAutoCompleter.js images/profile.js order/OnePageCheckoutProcess.ftl
Author: mor
Date: Mon Nov 17 03:15:17 2008
New Revision: 718220
URL: http://svn.apache.org/viewvc?rev=718220&view=rev
Log:
Improvement over making state optional, part of Jira Issue OFBIZ-2043 (https://issues.apache.org/jira/browse/OFBIZ-2043). Thanks Surya Kusumakar for the patch
Modified:
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/geoAutoCompleter.js
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl?rev=718220&r1=718219&r2=718220&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl Mon Nov 17 03:15:17 2008
@@ -56,7 +56,7 @@
<span>
<select name="countryGeoId" id="shipToCountryGeoId" class="left required" style="width: 70%">
<#if shipToCountryGeoId??>
- <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryProvinceGeoId!)}</option>
+ <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryGeoId!)}</option>
</#if>
${screens.render("component://common/widget/CommonScreens.xml#countries")}
</select>
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl?rev=718220&r1=718219&r2=718220&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl Mon Nov 17 03:15:17 2008
@@ -94,7 +94,7 @@
<div>
<select name="shipToCountryGeoId" id="shipToCountryGeoId">
<#if shipToCountryGeoId??>
- <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryProvinceGeoId!)}</option>
+ <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryGeoId!)}</option>
</#if>
${screens.render("component://common/widget/CommonScreens.xml#countries")}
</select>
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/geoAutoCompleter.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/geoAutoCompleter.js?rev=718220&r1=718219&r2=718220&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/geoAutoCompleter.js (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/geoAutoCompleter.js Mon Nov 17 03:15:17 2008
@@ -105,7 +105,7 @@
optionList.push("<option value = "+geoValues[1]+" >"+geoValues[0]+"</option>");
});
$(stateId).update(optionList);
- if (stateList.size() == 1) {
+ if (stateList.size() <= 1) {
if ($(divId).visible() || $(errorId).visible()) {
Effect.Fade(divId, {duration: 0.0});
Effect.Fade(errorId, {duration: 0.0});
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js?rev=718220&r1=718219&r2=718220&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js Mon Nov 17 03:15:17 2008
@@ -359,10 +359,7 @@
Event.observe($('shipToStateProvinceGeoId'), 'change', function() {
$('billToStateProvinceGeoId').value = $F('shipToStateProvinceGeoId')
});
- Event.observe($('shipToCountryGeoId'), 'change', function() {
- $('billToCountryGeoId').value = $F('shipToCountryGeoId')
- getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates');
- });
+ Event.observe($('shipToCountryGeoId'), 'change', copyShipToCountryToBillToCountry);
Event.observe($('shipToPostalCode'), 'change', function() {
$('billToPostalCode').value = $F('shipToPostalCode')
});
@@ -373,7 +370,7 @@
Event.stopObserving($('shipToAddress2'), 'change', "");
Event.stopObserving($('shipToCity'), 'change', "");
Event.stopObserving($('shipToStateProvinceGeoId'), 'change', "");
- Event.stopObserving($('shipToCountryGeoId'), 'change', "");
+ Event.stopObserving($('shipToCountryGeoId'), 'change', copyShipToCountryToBillToCountry);
Event.stopObserving($('shipToPostalCode'), 'change', "");
}
@@ -398,4 +395,9 @@
getAssociatedStateList('countryGeoId_'+id, 'stateProvinceGeoId_'+id, 'advice-required-stateProvinceGeoId_'+id, 'states_'+id);
}
}
+}
+
+function copyShipToCountryToBillToCountry(){
+ $('billToCountryGeoId').value = $F('shipToCountryGeoId');
+ getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates');
}
\ No newline at end of file
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=718220&r1=718219&r2=718220&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Mon Nov 17 03:15:17 2008
@@ -346,9 +346,9 @@
<label for="shipToCountryGeoId">${uiLabelMap.PartyCountry}<span class="requiredLabel">*<span id="advice-required-shipToCountryGeo" style="display:none" class="errorMessage"> (required)</span></label>
</div>
<div>
- <select name="countryGeoId" id="shipToCountryGeoId" class="required selectBox">
+ <select name="countryGeoId" id="shipToCountryGeoId">
<#if shipToCountryGeoId??>
- <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryProvinceGeoId!)}</option>
+ <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryGeoId!)}</option>
</#if>
${screens.render("component://common/widget/CommonScreens.xml#countries")}
</select>