svn commit: r1220299 - in /ofbiz/branches/release11.04: ./ applications/order/webapp/ordermgr/order/ordershippinginfo.ftl

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

svn commit: r1220299 - in /ofbiz/branches/release11.04: ./ applications/order/webapp/ordermgr/order/ordershippinginfo.ftl

jleroux@apache.org
Author: jleroux
Date: Sat Dec 17 23:04:43 2011
New Revision: 1220299

URL: http://svn.apache.org/viewvc?rev=1220299&view=rev
Log:
"Applied fix from trunk for revision: 1220298"
------------------------------------------------------------------------
r1220298 | jleroux | 2011-12-18 00:02:01 +0100 (dim., 18 déc. 2011) | 4 lines

A patch from Sergei Biletnikov "Shipping group Instructions and gift messages can not be changed/set if there are several shipping groups" https://issues.apache.org/jira/browse/OFBIZ-4609

Just add more than 1 shipping group for an order, and you notice that it is not possible to set or edit the shipping instructions and gift messages, because the code ignores multiple shipping groups and the html have the same DOM id elements, so only first shipping group can be edited. Of course, it is just a development issue.

------------------------------------------------------------------------


Modified:
    ofbiz/branches/release11.04/   (props changed)
    ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl

Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 17 23:04:43 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4:951708-952957
 /ofbiz/branches/jquery:952958-1044489
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:1100197,1100880,1104423,1131144,1131396,1132496,1132749,1133353,1134990,1135199,1135686,1135929,1137201,1137433,1137435,1138463,1138485,1139346,1139385,1139504,1139521,1140358,1140362,1140375,1140469,1144537,1144791,1153073,1153768,1158124,1158126,1158608,1159080,1163036,1163093,1163533,1165130,1166591,1167116,1167314,1167480,1167501,1167510,1167517,1167606,1172213,1172243,1174964,1175130,1175135,1175143,1177128,1178175,1178199,1180398,1181878,1182259,1182310,1182731,1182858,1183651,1184906,1184996,1184999,1185179,1187515,1187528,1187933,1187944,1188042,1188564,1189592,1189601,1190134,1194958,1196778,1199276,1199450,1200207,1201110,1201125,1201941,1203350,1203776,1206507,1206690,1208335,1209250,1209362,1210193,1210211,1212147,1214124
+/ofbiz/trunk:1100197,1100880,1104423,1131144,1131396,1132496,1132749,1133353,1134990,1135199,1135686,1135929,1137201,1137433,1137435,1138463,1138485,1139346,1139385,1139504,1139521,1140358,1140362,1140375,1140469,1144537,1144791,1153073,1153768,1158124,1158126,1158608,1159080,1163036,1163093,1163533,1165130,1166591,1167116,1167314,1167480,1167501,1167510,1167517,1167606,1172213,1172243,1174964,1175130,1175135,1175143,1177128,1178175,1178199,1180398,1181878,1182259,1182310,1182731,1182858,1183651,1184906,1184996,1184999,1185179,1187515,1187528,1187933,1187944,1188042,1188564,1189592,1189601,1190134,1194958,1196778,1199276,1199450,1200207,1201110,1201125,1201941,1203350,1203776,1206507,1206690,1208335,1209250,1209362,1210193,1210211,1212147,1214124,1220298

Modified: ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=1220299&r1=1220298&r2=1220299&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original)
+++ ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Sat Dec 17 23:04: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>
 
@@ -491,7 +491,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 +501,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 +529,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>