Author: jleroux
Date: Wed Aug 17 10:07:31 2011
New Revision: 1158608
URL:
http://svn.apache.org/viewvc?rev=1158608&view=revLog:
A patch from Ankit Jain "Update is not working in Shopping List."
https://issues.apache.org/jira/browse/OFBIZ-4369While trying to update any list item in Shopping List the Update is not working.
http://demo-trunk.ofbiz.apache.org:8080/ecommerce/control/editShoppingListModified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl?rev=1158608&r1=1158607&r2=1158608&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl Wed Aug 17 10:07:31 2011
@@ -20,12 +20,15 @@ under the License.
<script type="text/javascript">
<!-- function to add extra info for Timestamp format -->
function TimestampSubmit(obj) {
- if (obj.elements["reservStartStr"].value.length == 10) {
- obj.elements["reservStart"].value = obj.elements["reservStartStr"].value + " 00:00:00.000000000";
+ reservStartStr = jQuery(obj).find("input[name='reservStartStr']");
+ val1 = reservStartStr.val();
+ reservStart = jQuery(obj).find("input[name='reservStart']");
+ if (reservStartStr.val().length == 10) {
+ reservStart.val(reservStartStr.val() + " 00:00:00.000000000");
} else {
- obj.elements["reservStart"].value = obj.elements["reservStartStr"].value;
+ reservStart.val(reservStartStr.val());
}
- obj.submit();
+ jQuery(obj).submit();
}
</script>
<br />
@@ -423,7 +426,7 @@ under the License.
<div class="tabletext"><@ofbizCurrency amount=totalPrice isoCode=currencyUomId/></div>
</td>
<td align="right">
- <a href="javascript:TimestampSubmit(listform_${shoppingListItem.shoppingListItemSeqId});" class="buttontext">${uiLabelMap.CommonUpdate}</a>
+ <a href="#" onclick="javascript:TimestampSubmit(listform_${shoppingListItem.shoppingListItemSeqId});" class="buttontext">${uiLabelMap.CommonUpdate}</a>
<a href="<@ofbizUrl>removeFromShoppingList?shoppingListId=${shoppingListItem.shoppingListId}&shoppingListItemSeqId=${shoppingListItem.shoppingListItemSeqId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRemove}</a>
<#if isVirtual && productVariantAssocs?has_content>
<#assign replaceItemAction = "/replaceShoppingListItem/" + requestAttributes._CURRENT_VIEW_?if_exists>