You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/10/07 07:29:59 UTC

svn commit: r1763686 - /ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl

Author: jleroux
Date: Fri Oct  7 07:29:58 2016
New Revision: 1763686

URL: http://svn.apache.org/viewvc?rev=1763686&view=rev
Log:
Fixed: cannot edit shopping list for ecommerce and ecomseo
(OFBIZ-8348)

go to https://localhost:8443/ecomseo
login as DemoCustomer
go to https://localhost:8443/ecomseo/editShoppingList
create 2 shopping lists
ofbiz shows the 2 shopping list. but you cannot select the first shopping list 
for editing

Thanks: Wai for report, Pawan Verma for patch

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl

Modified: ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl?rev=1763686&r1=1763685&r2=1763686&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl Fri Oct  7 07:29:58 2016
@@ -94,16 +94,16 @@ under the License.
         <#if shoppingLists?has_content>
           <form id="selectShoppingList" method="post" action="<@o...@ofbizUrl>">
             <fieldset>
-	            <select name="shoppingListId">
-	              <#if shoppingList?has_content>
-	                <option value="${shoppingList.shoppingListId}">${shoppingList.listName}</option>
-	                <option value="${shoppingList.shoppingListId}">--</option>
-	              </#if>
-	              <#list shoppingLists as list>
-	                <option value="${list.shoppingListId}">${list.listName}</option>
-	              </#list>
-	            </select>
-	            <a href="javascript:$('selectShoppingList').submit();" class="button">${uiLabelMap.CommonEdit}</a>
+                <select name="shoppingListId">
+                  <#if shoppingList?has_content>
+                    <option value="${shoppingList.shoppingListId}">${shoppingList.listName}</option>
+                    <option value="${shoppingList.shoppingListId}">--</option>
+                  </#if>
+                  <#list shoppingLists as list>
+                    <option value="${list.shoppingListId}">${list.listName}</option>
+                  </#list>
+                </select>
+                <a href="javascript:document.getElementById('selectShoppingList').submit();" class="button">${uiLabelMap.CommonEdit}</a>
             </fieldset>
           </form>
         <#else>
@@ -247,14 +247,14 @@ under the License.
                 </select>
               </span>
               <span>
-	              <label>${uiLabelMap.CommonStartDate}</label>
-	              <input type="text" class="textBox" name="startDateTime" size="22" value="${(recurrenceInfo.startDateTime)?if_exists}" />
-	              <a href="javascript:call_cal(document.reorderinfo.startDateTime, '${nowTimestamp.toString()}');"><img src="<@o...@ofbizContentUrl>" width="16" height="16" alt="Calendar" /></a>
+                  <label>${uiLabelMap.CommonStartDate}</label>
+                  <input type="text" class="textBox" name="startDateTime" size="22" value="${(recurrenceInfo.startDateTime)?if_exists}" />
+                  <@htmlTemplate.renderDateTimeField name="startDateTime" className="" event="" action="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${(recurrenceInfo.startDateTime)!}" size="25" maxlength="30" id="startDateTime1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
               </span>
               <span>
                 <label>${uiLabelMap.CommonEndDate}</label>
                 <input type="text" class="textBox" name="endDateTime" size="22" value="${(recurrenceRule.untilDateTime)?if_exists}">
-                <a href="javascript:call_cal(document.reorderinfo.endDateTime, '${nowTimestamp.toString()}');"><img src="<@o...@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a>
+                <@htmlTemplate.renderDateTimeField name="endDateTime" className="textBox" event="" action="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${(recurrenceRule.untilDateTime)!}" size="25" maxlength="30" id="endDateTime1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
               </span>
             </div>
             <div>
@@ -365,12 +365,12 @@ under the License.
     <div class="screenlet-body">
         <table>
           <thead>
-	          <tr>
-	            <th>${uiLabelMap.EcommerceListName}</th>
-	            <th>${uiLabelMap.EcommerceListName}</th>
-	            <th>&nbsp;</th>
-	            <th>&nbsp;</th>
-	          </tr>
+              <tr>
+                <th>${uiLabelMap.EcommerceListName}</th>
+                <th>${uiLabelMap.EcommerceListName}</th>
+                <th>&nbsp;</th>
+                <th>&nbsp;</th>
+              </tr>
           </thead>
           <tbody>
           <#list childShoppingListDatas as childShoppingListData>
@@ -416,16 +416,16 @@ under the License.
             <@paginationControls/>
             <table width="100%">
               <thead>
-	              <tr>
-	                <th>${uiLabelMap.OrderProduct}</th>
-	                <th><table><tr><th>- ${uiLabelMap.EcommerceStartdate} -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>- ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>- ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
-	                <#-- <td nowrap="nowrap" align="center"><div><b>Purchased</b></div></td> -->
-	                <th>${uiLabelMap.EcommercePrice}</th>
-	                <th>${uiLabelMap.OrderTotal}</th>
-	                <th>&nbsp;</th>
-	              </tr>
-	            </thead>
-	            <tbody>
+                  <tr>
+                    <th>${uiLabelMap.OrderProduct}</th>
+                    <th><table><tr><th>- ${uiLabelMap.EcommerceStartdate} -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>- ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>- ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
+                    <#-- <td nowrap="nowrap" align="center"><div><b>Purchased</b></div></td> -->
+                    <th>${uiLabelMap.EcommercePrice}</th>
+                    <th>${uiLabelMap.OrderTotal}</th>
+                    <th>&nbsp;</th>
+                  </tr>
+                </thead>
+                <tbody>
               <#list shoppingListItemDatas[lowIndex-1..highIndex-1] as shoppingListItemData>
                 <#assign shoppingListItem = shoppingListItemData.shoppingListItem/>
                 <#assign product = shoppingListItemData.product/>



Re: svn commit: r1763686 - /ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingLis t.ftl

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Scott, Amardeep,

This was previously fixed with r1763686 by Pawan Verma which was correct.

We could have kept it because it's plain js and works, but since we use jQuery and for consistencey reason Amardeep suggested to rather
$('#selectShoppingList').submit()

I reverts r1763686 at r1763754 and applied Amardeep's solution.

It also removes pending work related with OFBIZ-4106. I have asked a question about it yesterday and forgot to remove the related changes in this 
unrelated commit.
Note that it's a progress but I think we should rather get rid of the feature, see my yesterday message in dev ML

There was also tabs replaced by spaces in r1763686.

Jacques

Le 07/10/2016 � 13:22, Amardeep Singh Jhajj a �crit :
> Here $('#selectShoppingList') will do the job instead of
> $('selectShoppingList') because it is an Id selector, we have to use # with
> Id value in jQuery selector. So the correct solution should be
>
> $('#selectShoppingList').submit()
>
> Thanks and Regards
> --
> Amardeep Singh Jhajj
> http://www.hotwaxsystems.com/
>
> On Fri, Oct 7, 2016 at 4:08 PM, Scott Gray <sc...@hotwaxsystems.com>
> wrote:
>
>> Any indication as to why $('selectShoppingList') wasn't working?  I'm not
>> up to date with our latest javascript framework but changing to document.
>> getElementById('selectShoppingList') seems like a workaround rather than a
>> fix.
>>
>> I'm also curious why the diff seems so large when the changes were much
>> smaller, as can be seen here:
>> http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/
>> ecommerce/template/shoppinglist/EditShoppingList.
>> ftl?r1=1763685&r2=1763686&pathrev=1763686&view=diff&diff_format=h
>>
>> Regards
>> Scott
>>
>> On 7 October 2016 at 12:59, <jl...@apache.org> wrote:
>>
>>> Author: jleroux
>>> Date: Fri Oct  7 07:29:58 2016
>>> New Revision: 1763686
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1763686&view=rev
>>> Log:
>>> Fixed: cannot edit shopping list for ecommerce and ecomseo
>>> (OFBIZ-8348)
>>>
>>> go to https://localhost:8443/ecomseo
>>> login as DemoCustomer
>>> go to https://localhost:8443/ecomseo/editShoppingList
>>> create 2 shopping lists
>>> ofbiz shows the 2 shopping list. but you cannot select the first shopping
>>> list
>>> for editing
>>>
>>> Thanks: Wai for report, Pawan Verma for patch
>>>
>>> Modified:
>>>      ofbiz/trunk/specialpurpose/ecommerce/template/
>>> shoppinglist/EditShoppingList.ftl
>>>
>>> Modified: ofbiz/trunk/specialpurpose/ecommerce/template/
>>> shoppinglist/EditShoppingList.ftl
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/
>>> ecommerce/template/shoppinglist/EditShoppingList.
>>> ftl?rev=1763686&r1=1763685&r2=1763686&view=diff
>>> ============================================================
>>> ==================
>>> --- ofbiz/trunk/specialpurpose/ecommerce/template/
>>> shoppinglist/EditShoppingList.ftl (original)
>>> +++ ofbiz/trunk/specialpurpose/ecommerce/template/
>>> shoppinglist/EditShoppingList.ftl Fri Oct  7 07:29:58 2016
>>> @@ -94,16 +94,16 @@ under the License.
>>>           <#if shoppingLists?has_content>
>>>             <form id="selectShoppingList" method="post"
>> action="<@ofbizUrl>
>>> editShoppingList</...@ofbizUrl>">
>>>               <fieldset>
>>> -                   <select name="shoppingListId">
>>> -                     <#if shoppingList?has_content>
>>> -                       <option value="${shoppingList.
>> shoppingListId}">${
>>> shoppingList.listName}</option>
>>> -                       <option value="${shoppingList.
>>> shoppingListId}">--</option>
>>> -                     </#if>
>>> -                     <#list shoppingLists as list>
>>> -                       <option value="${list.shoppingListId}"
>>>> ${list.listName}</option>
>>> -                     </#list>
>>> -                   </select>
>>> -                   <a href="javascript:$('
>> selectShoppingList').submit();"
>>> class="button">${uiLabelMap.CommonEdit}</a>
>>> +                <select name="shoppingListId">
>>> +                  <#if shoppingList?has_content>
>>> +                    <option value="${shoppingList.shoppingListId}">${
>>> shoppingList.listName}</option>
>>> +                    <option value="${shoppingList.
>>> shoppingListId}">--</option>
>>> +                  </#if>
>>> +                  <#list shoppingLists as list>
>>> +                    <option value="${list.shoppingListId}"
>>>> ${list.listName}</option>
>>> +                  </#list>
>>> +                </select>
>>> +                <a href="javascript:document.getElementById('
>>> selectShoppingList').submit();" class="button">${uiLabelMap.
>>> CommonEdit}</a>
>>>               </fieldset>
>>>             </form>
>>>           <#else>
>>> @@ -247,14 +247,14 @@ under the License.
>>>                   </select>
>>>                 </span>
>>>                 <span>
>>> -                     <label>${uiLabelMap.CommonStartDate}</label>
>>> -                     <input type="text" class="textBox"
>>> name="startDateTime" size="22" value="${(recurrenceInfo.
>> startDateTime)?if_exists}"
>>> />
>>> -                     <a href="javascript:call_cal(document.reorderinfo.
>> startDateTime,
>>> '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/
>>> images/cal.gif</...@ofbizContentUrl>" width="16" height="16" alt="Calendar"
>>> /></a>
>>> +                  <label>${uiLabelMap.CommonStartDate}</label>
>>> +                  <input type="text" class="textBox"
>> name="startDateTime"
>>> size="22" value="${(recurrenceInfo.startDateTime)?if_exists}" />
>>> +                  <@htmlTemplate.renderDateTimeField
>>> name="startDateTime" className="" event="" action="" alert=""
>>> title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${(recurrenceInfo.
>> startDateTime)!}"
>>> size="25" maxlength="30" id="startDateTime1" dateType="date"
>>> shortDateInput=false timeDropdownParamName="" defaultDateTimeString=""
>>> localizedIconTitle="" timeDropdown="" timeHourName="" classString=""
>>> hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour=""
>> ampmName=""
>>> amSelected="" pmSelected="" compositeType="" formName=""/>
>>>                 </span>
>>>                 <span>
>>>                   <label>${uiLabelMap.CommonEndDate}</label>
>>>                   <input type="text" class="textBox" name="endDateTime"
>>> size="22" value="${(recurrenceRule.untilDateTime)?if_exists}">
>>> -                <a href="javascript:call_cal(document.reorderinfo.
>> endDateTime,
>>> '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/
>>> images/cal.gif</...@ofbizContentUrl>" width="16" height="16" border="0"
>>> alt="Calendar"></a>
>>> +                <@htmlTemplate.renderDateTimeField name="endDateTime"
>>> className="textBox" event="" action="" alert="" title="Format: yyyy-MM-dd
>>> HH:mm:ss.SSS" value="${(recurrenceRule.untilDateTime)!}" size="25"
>>> maxlength="30" id="endDateTime1" dateType="date" shortDateInput=false
>>> timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle=""
>>> timeDropdown="" timeHourName="" classString="" hour1="" hour2=""
>>> timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected=""
>>> pmSelected="" compositeType="" formName=""/>
>>>                 </span>
>>>               </div>
>>>               <div>
>>> @@ -365,12 +365,12 @@ under the License.
>>>       <div class="screenlet-body">
>>>           <table>
>>>             <thead>
>>> -                 <tr>
>>> -                   <th>${uiLabelMap.EcommerceListName}</th>
>>> -                   <th>${uiLabelMap.EcommerceListName}</th>
>>> -                   <th>&nbsp;</th>
>>> -                   <th>&nbsp;</th>
>>> -                 </tr>
>>> +              <tr>
>>> +                <th>${uiLabelMap.EcommerceListName}</th>
>>> +                <th>${uiLabelMap.EcommerceListName}</th>
>>> +                <th>&nbsp;</th>
>>> +                <th>&nbsp;</th>
>>> +              </tr>
>>>             </thead>
>>>             <tbody>
>>>             <#list childShoppingListDatas as childShoppingListData>
>>> @@ -416,16 +416,16 @@ under the License.
>>>               <@paginationControls/>
>>>               <table width="100%">
>>>                 <thead>
>>> -                     <tr>
>>> -                       <th>${uiLabelMap.OrderProduct}</th>
>>> -                       <th><table><tr><th>- ${uiLabelMap.
>> EcommerceStartdate}
>>> -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>-
>>> ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>-
>>> ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
>>> -                       <#-- <td nowrap="nowrap" align="center"><div><b>
>> Purchased</b></div></td>
>>> -->
>>> -                       <th>${uiLabelMap.EcommercePrice}</th>
>>> -                       <th>${uiLabelMap.OrderTotal}</th>
>>> -                       <th>&nbsp;</th>
>>> -                     </tr>
>>> -                   </thead>
>>> -                   <tbody>
>>> +                  <tr>
>>> +                    <th>${uiLabelMap.OrderProduct}</th>
>>> +                    <th><table><tr><th>- ${uiLabelMap.
>> EcommerceStartdate}
>>> -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>-
>>> ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>-
>>> ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
>>> +                    <#-- <td nowrap="nowrap" align="center"><div><b>
>> Purchased</b></div></td>
>>> -->
>>> +                    <th>${uiLabelMap.EcommercePrice}</th>
>>> +                    <th>${uiLabelMap.OrderTotal}</th>
>>> +                    <th>&nbsp;</th>
>>> +                  </tr>
>>> +                </thead>
>>> +                <tbody>
>>>                 <#list shoppingListItemDatas[lowIndex-1..highIndex-1] as
>>> shoppingListItemData>
>>>                   <#assign shoppingListItem = shoppingListItemData.
>>> shoppingListItem/>
>>>                   <#assign product = shoppingListItemData.product/>
>>>
>>>
>>>


Re: svn commit: r1763686 - /ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl

Posted by Amardeep Singh Jhajj <am...@hotwaxsystems.com>.
Here $('#selectShoppingList') will do the job instead of
$('selectShoppingList') because it is an Id selector, we have to use # with
Id value in jQuery selector. So the correct solution should be

$('#selectShoppingList').submit()

Thanks and Regards
--
Amardeep Singh Jhajj
http://www.hotwaxsystems.com/

On Fri, Oct 7, 2016 at 4:08 PM, Scott Gray <sc...@hotwaxsystems.com>
wrote:

> Any indication as to why $('selectShoppingList') wasn't working?  I'm not
> up to date with our latest javascript framework but changing to document.
> getElementById('selectShoppingList') seems like a workaround rather than a
> fix.
>
> I'm also curious why the diff seems so large when the changes were much
> smaller, as can be seen here:
> http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/
> ecommerce/template/shoppinglist/EditShoppingList.
> ftl?r1=1763685&r2=1763686&pathrev=1763686&view=diff&diff_format=h
>
> Regards
> Scott
>
> On 7 October 2016 at 12:59, <jl...@apache.org> wrote:
>
> > Author: jleroux
> > Date: Fri Oct  7 07:29:58 2016
> > New Revision: 1763686
> >
> > URL: http://svn.apache.org/viewvc?rev=1763686&view=rev
> > Log:
> > Fixed: cannot edit shopping list for ecommerce and ecomseo
> > (OFBIZ-8348)
> >
> > go to https://localhost:8443/ecomseo
> > login as DemoCustomer
> > go to https://localhost:8443/ecomseo/editShoppingList
> > create 2 shopping lists
> > ofbiz shows the 2 shopping list. but you cannot select the first shopping
> > list
> > for editing
> >
> > Thanks: Wai for report, Pawan Verma for patch
> >
> > Modified:
> >     ofbiz/trunk/specialpurpose/ecommerce/template/
> > shoppinglist/EditShoppingList.ftl
> >
> > Modified: ofbiz/trunk/specialpurpose/ecommerce/template/
> > shoppinglist/EditShoppingList.ftl
> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/
> > ecommerce/template/shoppinglist/EditShoppingList.
> > ftl?rev=1763686&r1=1763685&r2=1763686&view=diff
> > ============================================================
> > ==================
> > --- ofbiz/trunk/specialpurpose/ecommerce/template/
> > shoppinglist/EditShoppingList.ftl (original)
> > +++ ofbiz/trunk/specialpurpose/ecommerce/template/
> > shoppinglist/EditShoppingList.ftl Fri Oct  7 07:29:58 2016
> > @@ -94,16 +94,16 @@ under the License.
> >          <#if shoppingLists?has_content>
> >            <form id="selectShoppingList" method="post"
> action="<@ofbizUrl>
> > editShoppingList</...@ofbizUrl>">
> >              <fieldset>
> > -                   <select name="shoppingListId">
> > -                     <#if shoppingList?has_content>
> > -                       <option value="${shoppingList.
> shoppingListId}">${
> > shoppingList.listName}</option>
> > -                       <option value="${shoppingList.
> > shoppingListId}">--</option>
> > -                     </#if>
> > -                     <#list shoppingLists as list>
> > -                       <option value="${list.shoppingListId}"
> > >${list.listName}</option>
> > -                     </#list>
> > -                   </select>
> > -                   <a href="javascript:$('
> selectShoppingList').submit();"
> > class="button">${uiLabelMap.CommonEdit}</a>
> > +                <select name="shoppingListId">
> > +                  <#if shoppingList?has_content>
> > +                    <option value="${shoppingList.shoppingListId}">${
> > shoppingList.listName}</option>
> > +                    <option value="${shoppingList.
> > shoppingListId}">--</option>
> > +                  </#if>
> > +                  <#list shoppingLists as list>
> > +                    <option value="${list.shoppingListId}"
> > >${list.listName}</option>
> > +                  </#list>
> > +                </select>
> > +                <a href="javascript:document.getElementById('
> > selectShoppingList').submit();" class="button">${uiLabelMap.
> > CommonEdit}</a>
> >              </fieldset>
> >            </form>
> >          <#else>
> > @@ -247,14 +247,14 @@ under the License.
> >                  </select>
> >                </span>
> >                <span>
> > -                     <label>${uiLabelMap.CommonStartDate}</label>
> > -                     <input type="text" class="textBox"
> > name="startDateTime" size="22" value="${(recurrenceInfo.
> startDateTime)?if_exists}"
> > />
> > -                     <a href="javascript:call_cal(document.reorderinfo.
> startDateTime,
> > '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/
> > images/cal.gif</...@ofbizContentUrl>" width="16" height="16" alt="Calendar"
> > /></a>
> > +                  <label>${uiLabelMap.CommonStartDate}</label>
> > +                  <input type="text" class="textBox"
> name="startDateTime"
> > size="22" value="${(recurrenceInfo.startDateTime)?if_exists}" />
> > +                  <@htmlTemplate.renderDateTimeField
> > name="startDateTime" className="" event="" action="" alert=""
> > title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${(recurrenceInfo.
> startDateTime)!}"
> > size="25" maxlength="30" id="startDateTime1" dateType="date"
> > shortDateInput=false timeDropdownParamName="" defaultDateTimeString=""
> > localizedIconTitle="" timeDropdown="" timeHourName="" classString=""
> > hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour=""
> ampmName=""
> > amSelected="" pmSelected="" compositeType="" formName=""/>
> >                </span>
> >                <span>
> >                  <label>${uiLabelMap.CommonEndDate}</label>
> >                  <input type="text" class="textBox" name="endDateTime"
> > size="22" value="${(recurrenceRule.untilDateTime)?if_exists}">
> > -                <a href="javascript:call_cal(document.reorderinfo.
> endDateTime,
> > '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/
> > images/cal.gif</...@ofbizContentUrl>" width="16" height="16" border="0"
> > alt="Calendar"></a>
> > +                <@htmlTemplate.renderDateTimeField name="endDateTime"
> > className="textBox" event="" action="" alert="" title="Format: yyyy-MM-dd
> > HH:mm:ss.SSS" value="${(recurrenceRule.untilDateTime)!}" size="25"
> > maxlength="30" id="endDateTime1" dateType="date" shortDateInput=false
> > timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle=""
> > timeDropdown="" timeHourName="" classString="" hour1="" hour2=""
> > timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected=""
> > pmSelected="" compositeType="" formName=""/>
> >                </span>
> >              </div>
> >              <div>
> > @@ -365,12 +365,12 @@ under the License.
> >      <div class="screenlet-body">
> >          <table>
> >            <thead>
> > -                 <tr>
> > -                   <th>${uiLabelMap.EcommerceListName}</th>
> > -                   <th>${uiLabelMap.EcommerceListName}</th>
> > -                   <th>&nbsp;</th>
> > -                   <th>&nbsp;</th>
> > -                 </tr>
> > +              <tr>
> > +                <th>${uiLabelMap.EcommerceListName}</th>
> > +                <th>${uiLabelMap.EcommerceListName}</th>
> > +                <th>&nbsp;</th>
> > +                <th>&nbsp;</th>
> > +              </tr>
> >            </thead>
> >            <tbody>
> >            <#list childShoppingListDatas as childShoppingListData>
> > @@ -416,16 +416,16 @@ under the License.
> >              <@paginationControls/>
> >              <table width="100%">
> >                <thead>
> > -                     <tr>
> > -                       <th>${uiLabelMap.OrderProduct}</th>
> > -                       <th><table><tr><th>- ${uiLabelMap.
> EcommerceStartdate}
> > -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>-
> > ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>-
> > ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
> > -                       <#-- <td nowrap="nowrap" align="center"><div><b>
> Purchased</b></div></td>
> > -->
> > -                       <th>${uiLabelMap.EcommercePrice}</th>
> > -                       <th>${uiLabelMap.OrderTotal}</th>
> > -                       <th>&nbsp;</th>
> > -                     </tr>
> > -                   </thead>
> > -                   <tbody>
> > +                  <tr>
> > +                    <th>${uiLabelMap.OrderProduct}</th>
> > +                    <th><table><tr><th>- ${uiLabelMap.
> EcommerceStartdate}
> > -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>-
> > ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>-
> > ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
> > +                    <#-- <td nowrap="nowrap" align="center"><div><b>
> Purchased</b></div></td>
> > -->
> > +                    <th>${uiLabelMap.EcommercePrice}</th>
> > +                    <th>${uiLabelMap.OrderTotal}</th>
> > +                    <th>&nbsp;</th>
> > +                  </tr>
> > +                </thead>
> > +                <tbody>
> >                <#list shoppingListItemDatas[lowIndex-1..highIndex-1] as
> > shoppingListItemData>
> >                  <#assign shoppingListItem = shoppingListItemData.
> > shoppingListItem/>
> >                  <#assign product = shoppingListItemData.product/>
> >
> >
> >
>

Re: svn commit: r1763686 - /ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl

Posted by Scott Gray <sc...@hotwaxsystems.com>.
Any indication as to why $('selectShoppingList') wasn't working?  I'm not
up to date with our latest javascript framework but changing to document.
getElementById('selectShoppingList') seems like a workaround rather than a
fix.

I'm also curious why the diff seems so large when the changes were much
smaller, as can be seen here:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/shoppinglist/EditShoppingList.ftl?r1=1763685&r2=1763686&pathrev=1763686&view=diff&diff_format=h

Regards
Scott

On 7 October 2016 at 12:59, <jl...@apache.org> wrote:

> Author: jleroux
> Date: Fri Oct  7 07:29:58 2016
> New Revision: 1763686
>
> URL: http://svn.apache.org/viewvc?rev=1763686&view=rev
> Log:
> Fixed: cannot edit shopping list for ecommerce and ecomseo
> (OFBIZ-8348)
>
> go to https://localhost:8443/ecomseo
> login as DemoCustomer
> go to https://localhost:8443/ecomseo/editShoppingList
> create 2 shopping lists
> ofbiz shows the 2 shopping list. but you cannot select the first shopping
> list
> for editing
>
> Thanks: Wai for report, Pawan Verma for patch
>
> Modified:
>     ofbiz/trunk/specialpurpose/ecommerce/template/
> shoppinglist/EditShoppingList.ftl
>
> Modified: ofbiz/trunk/specialpurpose/ecommerce/template/
> shoppinglist/EditShoppingList.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/
> ecommerce/template/shoppinglist/EditShoppingList.
> ftl?rev=1763686&r1=1763685&r2=1763686&view=diff
> ============================================================
> ==================
> --- ofbiz/trunk/specialpurpose/ecommerce/template/
> shoppinglist/EditShoppingList.ftl (original)
> +++ ofbiz/trunk/specialpurpose/ecommerce/template/
> shoppinglist/EditShoppingList.ftl Fri Oct  7 07:29:58 2016
> @@ -94,16 +94,16 @@ under the License.
>          <#if shoppingLists?has_content>
>            <form id="selectShoppingList" method="post" action="<@ofbizUrl>
> editShoppingList</...@ofbizUrl>">
>              <fieldset>
> -                   <select name="shoppingListId">
> -                     <#if shoppingList?has_content>
> -                       <option value="${shoppingList.shoppingListId}">${
> shoppingList.listName}</option>
> -                       <option value="${shoppingList.
> shoppingListId}">--</option>
> -                     </#if>
> -                     <#list shoppingLists as list>
> -                       <option value="${list.shoppingListId}"
> >${list.listName}</option>
> -                     </#list>
> -                   </select>
> -                   <a href="javascript:$('selectShoppingList').submit();"
> class="button">${uiLabelMap.CommonEdit}</a>
> +                <select name="shoppingListId">
> +                  <#if shoppingList?has_content>
> +                    <option value="${shoppingList.shoppingListId}">${
> shoppingList.listName}</option>
> +                    <option value="${shoppingList.
> shoppingListId}">--</option>
> +                  </#if>
> +                  <#list shoppingLists as list>
> +                    <option value="${list.shoppingListId}"
> >${list.listName}</option>
> +                  </#list>
> +                </select>
> +                <a href="javascript:document.getElementById('
> selectShoppingList').submit();" class="button">${uiLabelMap.
> CommonEdit}</a>
>              </fieldset>
>            </form>
>          <#else>
> @@ -247,14 +247,14 @@ under the License.
>                  </select>
>                </span>
>                <span>
> -                     <label>${uiLabelMap.CommonStartDate}</label>
> -                     <input type="text" class="textBox"
> name="startDateTime" size="22" value="${(recurrenceInfo.startDateTime)?if_exists}"
> />
> -                     <a href="javascript:call_cal(document.reorderinfo.startDateTime,
> '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/
> images/cal.gif</...@ofbizContentUrl>" width="16" height="16" alt="Calendar"
> /></a>
> +                  <label>${uiLabelMap.CommonStartDate}</label>
> +                  <input type="text" class="textBox" name="startDateTime"
> size="22" value="${(recurrenceInfo.startDateTime)?if_exists}" />
> +                  <@htmlTemplate.renderDateTimeField
> name="startDateTime" className="" event="" action="" alert=""
> title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${(recurrenceInfo.startDateTime)!}"
> size="25" maxlength="30" id="startDateTime1" dateType="date"
> shortDateInput=false timeDropdownParamName="" defaultDateTimeString=""
> localizedIconTitle="" timeDropdown="" timeHourName="" classString=""
> hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName=""
> amSelected="" pmSelected="" compositeType="" formName=""/>
>                </span>
>                <span>
>                  <label>${uiLabelMap.CommonEndDate}</label>
>                  <input type="text" class="textBox" name="endDateTime"
> size="22" value="${(recurrenceRule.untilDateTime)?if_exists}">
> -                <a href="javascript:call_cal(document.reorderinfo.endDateTime,
> '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/
> images/cal.gif</...@ofbizContentUrl>" width="16" height="16" border="0"
> alt="Calendar"></a>
> +                <@htmlTemplate.renderDateTimeField name="endDateTime"
> className="textBox" event="" action="" alert="" title="Format: yyyy-MM-dd
> HH:mm:ss.SSS" value="${(recurrenceRule.untilDateTime)!}" size="25"
> maxlength="30" id="endDateTime1" dateType="date" shortDateInput=false
> timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle=""
> timeDropdown="" timeHourName="" classString="" hour1="" hour2=""
> timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected=""
> pmSelected="" compositeType="" formName=""/>
>                </span>
>              </div>
>              <div>
> @@ -365,12 +365,12 @@ under the License.
>      <div class="screenlet-body">
>          <table>
>            <thead>
> -                 <tr>
> -                   <th>${uiLabelMap.EcommerceListName}</th>
> -                   <th>${uiLabelMap.EcommerceListName}</th>
> -                   <th>&nbsp;</th>
> -                   <th>&nbsp;</th>
> -                 </tr>
> +              <tr>
> +                <th>${uiLabelMap.EcommerceListName}</th>
> +                <th>${uiLabelMap.EcommerceListName}</th>
> +                <th>&nbsp;</th>
> +                <th>&nbsp;</th>
> +              </tr>
>            </thead>
>            <tbody>
>            <#list childShoppingListDatas as childShoppingListData>
> @@ -416,16 +416,16 @@ under the License.
>              <@paginationControls/>
>              <table width="100%">
>                <thead>
> -                     <tr>
> -                       <th>${uiLabelMap.OrderProduct}</th>
> -                       <th><table><tr><th>- ${uiLabelMap.EcommerceStartdate}
> -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>-
> ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>-
> ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
> -                       <#-- <td nowrap="nowrap" align="center"><div><b>Purchased</b></div></td>
> -->
> -                       <th>${uiLabelMap.EcommercePrice}</th>
> -                       <th>${uiLabelMap.OrderTotal}</th>
> -                       <th>&nbsp;</th>
> -                     </tr>
> -                   </thead>
> -                   <tbody>
> +                  <tr>
> +                    <th>${uiLabelMap.OrderProduct}</th>
> +                    <th><table><tr><th>- ${uiLabelMap.EcommerceStartdate}
> -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>-
> ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>-
> ${uiLabelMap.CommonQuantity} -</th></tr></table></th>
> +                    <#-- <td nowrap="nowrap" align="center"><div><b>Purchased</b></div></td>
> -->
> +                    <th>${uiLabelMap.EcommercePrice}</th>
> +                    <th>${uiLabelMap.OrderTotal}</th>
> +                    <th>&nbsp;</th>
> +                  </tr>
> +                </thead>
> +                <tbody>
>                <#list shoppingListItemDatas[lowIndex-1..highIndex-1] as
> shoppingListItemData>
>                  <#assign shoppingListItem = shoppingListItemData.
> shoppingListItem/>
>                  <#assign product = shoppingListItemData.product/>
>
>
>