svn commit: r812466 - in /ofbiz/trunk/applications/product: webapp/catalog/find/keywordsearchbox.ftl webapp/catalog/product/EditProductFeatures.ftl widget/catalog/CommonScreens.xml

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

svn commit: r812466 - in /ofbiz/trunk/applications/product: webapp/catalog/find/keywordsearchbox.ftl webapp/catalog/product/EditProductFeatures.ftl widget/catalog/CommonScreens.xml

lektran
Author: lektran
Date: Tue Sep  8 11:25:25 2009
New Revision: 812466

URL: http://svn.apache.org/viewvc?rev=812466&view=rev
Log:
More xhtml validation fixes

Modified:
    ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl
    ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl?rev=812466&r1=812465&r2=812466&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl Tue Sep  8 11:25:25 2009
@@ -33,7 +33,7 @@
  //-->
  </script>
 
-<form name="keywordsearchform" method="post" action="<@ofbizUrl>keywordsearch?VIEW_SIZE=25&PAGING=Y</@ofbizUrl>" style="margin: 0;">
+<form name="keywordsearchform" method="post" action="<@ofbizUrl>keywordsearch?VIEW_SIZE=25&amp;PAGING=Y</@ofbizUrl>" style="margin: 0;">
   <span class="label">${uiLabelMap.ProductKeywords}:</span><input type="text"name="SEARCH_STRING" size="20" maxlength="50" value="${requestParameters.SEARCH_STRING?if_exists}"/>
   <span class="label">
     ${uiLabelMap.ProductCategoryId}:

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl?rev=812466&r1=812465&r2=812466&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl Tue Sep  8 11:25:25 2009
@@ -22,11 +22,11 @@
         <h3>${uiLabelMap.PageTitleEditProductFeatures}</h3>
     </div>
     <div class="screenlet-body">
+        <form method="post" action="<@ofbizUrl>UpdateFeatureToProductApplication</@ofbizUrl>" name="selectAllForm">
+        <input type="hidden" name="_useRowSubmit" value="Y"/>
+        <input type="hidden" name="_checkGlobalScope" value="Y"/>
+        <input type="hidden" name="productId" value="${productId}"/>
         <table cellspacing="0" class="basic-table">
-            <form method="post" action="<@ofbizUrl>UpdateFeatureToProductApplication</@ofbizUrl>" name="selectAllForm">
-            <input type="hidden" name="_useRowSubmit" value="Y">
-            <input type="hidden" name="_checkGlobalScope" value="Y">
-            <input type="hidden" name="productId" value="${productId}">
             <tr class="header-row">
                 <td><b>${uiLabelMap.CommonId}</b></td>
                 <td><b>${uiLabelMap.CommonDescription}</b></td>
@@ -34,18 +34,17 @@
                 <td><b>${uiLabelMap.ProductCategory}</b></td>
                 <td><b>${uiLabelMap.CommonFromDate}</b></td>
                 <td><b>${uiLabelMap.ProductThruDateAmountSequenceApplicationType}</b></td>
-                <td><b>${uiLabelMap.CommonAll}<input type="checkbox" name="selectAll" value="${uiLabelMap.CommonY}" onclick="javascript:toggleAll(this, 'selectAllForm');highlightAllRows(this, 'productFeatureId_tableRow_', 'selectAllForm');"></td>
+                <td><b>${uiLabelMap.CommonAll}<input type="checkbox" name="selectAll" value="${uiLabelMap.CommonY}" onclick="javascript:toggleAll(this, 'selectAllForm');highlightAllRows(this, 'productFeatureId_tableRow_', 'selectAllForm');"/></b></td>
             </tr>
-            <#assign rowCount = 0>
             <#assign rowClass = "2">
             <#list productFeatureAndAppls as productFeatureAndAppl>
                 <#assign curProductFeatureType = productFeatureAndAppl.getRelatedOneCache("ProductFeatureType")>
                 <#assign curProductFeatureApplType = productFeatureAndAppl.getRelatedOneCache("ProductFeatureApplType")>
                 <#assign curProductFeatureCategory = (productFeatureAndAppl.getRelatedOneCache("ProductFeatureCategory")?if_exists)>
-                <tr id="productFeatureId_tableRow_${rowCount}" valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
-                    <input type="hidden" name="productId_o_${rowCount}" value="${(productFeatureAndAppl.productId)?if_exists}">
-                    <input type="hidden" name="productFeatureId_o_${rowCount}" value="${(productFeatureAndAppl.productFeatureId)?if_exists}">
-                    <input type="hidden" name="fromDate_o_${rowCount}" value="${(productFeatureAndAppl.fromDate)?if_exists}">
+                <tr id="productFeatureId_tableRow_${productFeatureAndAppl_index}" valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
+                    <input type="hidden" name="productId_o_${productFeatureAndAppl_index}" value="${(productFeatureAndAppl.productId)?if_exists}">
+                    <input type="hidden" name="productFeatureId_o_${productFeatureAndAppl_index}" value="${(productFeatureAndAppl.productFeatureId)?if_exists}">
+                    <input type="hidden" name="fromDate_o_${productFeatureAndAppl_index}" value="${(productFeatureAndAppl.fromDate)?if_exists}">
                     <td><a href="<@ofbizUrl>EditFeature?productFeatureId=${(productFeatureAndAppl.productFeatureId)?if_exists}</@ofbizUrl>" class="buttontext">
                         ${(productFeatureAndAppl.productFeatureId)?if_exists}</a></td>
                     <td>${(productFeatureAndAppl.get("description",locale))?if_exists}</td>
@@ -59,11 +58,11 @@
                     <td>
                         <#assign hasExpired = false>
                         <#if (productFeatureAndAppl.getTimestamp("thruDate"))?exists && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().after(productFeatureAndAppl.getTimestamp("thruDate"))> <#assign hasExpired = true></#if>
-                        <input type='text' size='25' name='thruDate_o_${rowCount}' value='${(productFeatureAndAppl.thruDate)?if_exists}' <#if hasExpired> style='color: red;'</#if>>
-                        <a href="javascript:call_cal(document.selectAllForm.thruDate_o_${rowCount}, '${(productFeatureAndAppl.thruDate)?default(nowTimestamp?string)}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a>
-                        <input type="text" size='6' name='amount_o_${rowCount}' value='${(productFeatureAndAppl.amount)?if_exists}'>
-                        <input type="text" size='5' name='sequenceNum_o_${rowCount}' value='${(productFeatureAndAppl.sequenceNum)?if_exists}'>
-                        <select name='productFeatureApplTypeId_o_${rowCount}' size="1">
+                        <input type='text' size='25' name='thruDate_o_${productFeatureAndAppl_index}' value='${(productFeatureAndAppl.thruDate)?if_exists}' <#if hasExpired> style='color: red;'</#if>>
+                        <a href="javascript:call_cal(document.selectAllForm.thruDate_o_${productFeatureAndAppl_index}, '${(productFeatureAndAppl.thruDate)?default(nowTimestamp?string)}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'/></a>
+                        <input type="text" size='6' name='amount_o_${productFeatureAndAppl_index}' value='${(productFeatureAndAppl.amount)?if_exists}'>
+                        <input type="text" size='5' name='sequenceNum_o_${productFeatureAndAppl_index}' value='${(productFeatureAndAppl.sequenceNum)?if_exists}'>
+                        <select name='productFeatureApplTypeId_o_${productFeatureAndAppl_index}' size="1">
                         <#if (productFeatureAndAppl.productFeatureApplTypeId)?exists>
                             <option value='${(productFeatureAndAppl.productFeatureApplTypeId)?if_exists}'><#if curProductFeatureApplType?exists> ${(curProductFeatureApplType.get("description",locale))?if_exists} <#else> [${productFeatureAndAppl.productFeatureApplTypeId}]</#if></option>
                             <option value='${productFeatureAndAppl.productFeatureApplTypeId}'> </option>
@@ -74,18 +73,12 @@
                         </select>
                     </td>
                     <td align="right">
-                        <input type="checkbox" name="_rowSubmit_o_${rowCount}" value="Y" onclick="javascript:checkToggle(this, 'selectAllForm');highlightRow(this,'productFeatureId_tableRow_${rowCount}');">
+                        <input type="checkbox" name="_rowSubmit_o_${productFeatureAndAppl_index}" value="Y" onclick="javascript:checkToggle(this, 'selectAllForm');highlightRow(this,'productFeatureId_tableRow_${productFeatureAndAppl_index}');">
                     </td>
                     <td>
-                      <form name= "RemoveFeatureFromProduct_o_${rowCount}" method= "post" action= "<@ofbizUrl>RemoveFeatureFromProduct</@ofbizUrl>">
-                        <input type= "hidden" name= "productId" value= "${(productFeatureAndAppl.productId)?if_exists}">
-                        <input type= "hidden" name= "productFeatureId" value= "${(productFeatureAndAppl.productFeatureId)?if_exists}">
-                        <input type= "hidden" name= "fromDate" value= "${productFeatureAndAppl.getString("fromDate")}">
-                        <a href="javascript:document.RemoveFeatureFromProduct_o_${rowCount}.submit()" class="buttontext">${uiLabelMap.CommonDelete}</a>
-                      </form>
+                      <a href="javascript:document.RemoveFeatureFromProduct_o_${productFeatureAndAppl_index}.submit()" class="buttontext">${uiLabelMap.CommonDelete}</a>
                     </td>
                 </tr>
-                <#assign rowCount = rowCount + 1>
                 <#-- toggle the row color -->
                 <#if rowClass == "2">
                     <#assign rowClass = "1">
@@ -93,10 +86,22 @@
                     <#assign rowClass = "2">
                 </#if>
             </#list>
-            <input type="hidden" name="_rowCount" value="${rowCount}">
-            <tr><td colspan="8" align="center"><input type="submit" value='${uiLabelMap.CommonUpdate}'/></td></tr>
+            
+            <tr>
+              <td colspan="8" align="center">
+                <input type="hidden" name="_rowCount" value="${productFeatureAndAppls.size()}"/>
+                <input type="submit" value='${uiLabelMap.CommonUpdate}'/>
+              </td>
+            </tr>
+          </table>
+        </form>
+        <#list productFeatureAndAppls as productFeatureAndAppl>
+            <form name= "RemoveFeatureFromProduct_o_${productFeatureAndAppl_index}" method= "post" action= "<@ofbizUrl>RemoveFeatureFromProduct</@ofbizUrl>">
+              <input type= "hidden" name= "productId" value= "${(productFeatureAndAppl.productId)?if_exists}"/>
+              <input type= "hidden" name= "productFeatureId" value= "${(productFeatureAndAppl.productFeatureId)?if_exists}"/>
+              <input type= "hidden" name= "fromDate" value= "${productFeatureAndAppl.getString("fromDate")}"/>
             </form>
-        </table>
+        </#list>
     </div>
 </div>
 <div class="screenlet">
@@ -105,15 +110,15 @@
     </div>
     <div class="screenlet-body">
         <form method="post" action="<@ofbizUrl>ApplyFeaturesFromCategory</@ofbizUrl>" style='margin: 0;'>
-            <input type="hidden" name="productId" value="${productId}">
+            <input type="hidden" name="productId" value="${productId}"/>
             <select name='productFeatureCategoryId' size="1">
-                <option value='' selected>${uiLabelMap.ProductChooseFeatureCategory}</option>
+                <option value='' selected="selected">${uiLabelMap.ProductChooseFeatureCategory}</option>
                 <#list productFeatureCategories as productFeatureCategory>
                     <option value='${(productFeatureCategory.productFeatureCategoryId)?if_exists}'>${(productFeatureCategory.description)?if_exists} [${(productFeatureCategory.productFeatureCategoryId)?if_exists}]</option>
                 </#list>
             </select>
             <select name='productFeatureGroupId' size="1">
-                <option value='' selected>${uiLabelMap.ProductChooseFeatureGroup}</option>
+                <option value='' selected="selected">${uiLabelMap.ProductChooseFeatureGroup}</option>
                 <#list productFeatureGroups as productFeatureGroup>
                     <option value='${(productFeatureGroup.productFeatureGroupId)?if_exists}'>${(productFeatureGroup.description)?if_exists} [${(productFeatureGroup.productFeatureGroupId)?if_exists}]</option>
                 </#list>
@@ -122,12 +127,12 @@
             <select name='productFeatureApplTypeId' size="1">
                 <#list productFeatureApplTypes as productFeatureApplType>
                    <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}'
-                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected</#if>
-                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId?if_exists =="STANDARD_FEATURE")>selected</#if>
+                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected="selected"</#if>
+                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId?if_exists =="STANDARD_FEATURE")>selected="selected"</#if>
                    >${(productFeatureApplType.get("description",locale))?if_exists} </option>
                 </#list>
             </select>
-            <input type="submit" value='${uiLabelMap.CommonAdd}'>
+            <input type="submit" value='${uiLabelMap.CommonAdd}'/>
         </form>
     </div>
 </div>
@@ -137,30 +142,30 @@
     </div>
     <div class="screenlet-body">
         <form method="post" action="<@ofbizUrl>ApplyFeatureToProductFromTypeAndCode</@ofbizUrl>" name='addFeatureByTypeIdCode'>
-            <input type="hidden" name="productId" value="${productId}">
+            <input type="hidden" name="productId" value="${productId}"/>
             <span class='label'>${uiLabelMap.ProductFeatureType}: </span><select name='productFeatureTypeId' size="1">
                 <#list productFeatureTypes as productFeatureType>
                 <option value='${(productFeatureType.productFeatureTypeId)?if_exists}'>${(productFeatureType.get("description",locale))?if_exists} </option>
                 </#list>
             </select>
-            <span class='label'>${uiLabelMap.CommonIdCode}: </span><input type="text" size='10' name='idCode' value=''>
+            <span class='label'>${uiLabelMap.CommonIdCode}: </span><input type="text" size='10' name='idCode' value=''/>
             <br/>
             <span class='label'>${uiLabelMap.ProductFeatureApplicationType}: </span>
             <select name='productFeatureApplTypeId' size="1">
                 <#list productFeatureApplTypes as productFeatureApplType>
                    <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}'
-                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected</#if>
-                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId =="STANDARD_FEATURE")>selected</#if>
+                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected="selected"</#if>
+                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId =="STANDARD_FEATURE")>selected="selected"</#if>
                    >${(productFeatureApplType.get("description",locale))?if_exists} </option>
                 </#list>
             </select>
             <br/>
-            <span class='label'>${uiLabelMap.CommonFrom} : </span><input type="text" size='25' name='fromDate'>
-            <a href="javascript:call_cal(document.addFeatureByTypeIdCode.fromDate, '${nowTimestamp?string}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a>
-            <span class='label'>${uiLabelMap.CommonThru} : </span><input type="text" size='25' name='thruDate'>
-            <a href="javascript:call_cal(document.addFeatureByTypeIdCode.thruDate, '${nowTimestamp?string}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a>
-            <span class='label'>${uiLabelMap.CommonSequence} : </span><input type="text" size='5' name='sequenceNum'>
-            <input type="submit" value="${uiLabelMap.CommonAdd}">
+            <span class='label'>${uiLabelMap.CommonFrom} : </span><input type="text" size='25' name='fromDate'/>
+            <a href="javascript:call_cal(document.addFeatureByTypeIdCode.fromDate, '${nowTimestamp?string}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'/></a>
+            <span class='label'>${uiLabelMap.CommonThru} : </span><input type="text" size='25' name='thruDate'/>
+            <a href="javascript:call_cal(document.addFeatureByTypeIdCode.thruDate, '${nowTimestamp?string}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'/></a>
+            <span class='label'>${uiLabelMap.CommonSequence} : </span><input type="text" size='5' name='sequenceNum'/>
+            <input type="submit" value="${uiLabelMap.CommonAdd}"/>
         </form>
     </div>
 </div>
@@ -170,30 +175,30 @@
     </div>
     <div class="screenlet-body">
         <form method="post" action="<@ofbizUrl>ApplyFeatureToProduct</@ofbizUrl>" name="addFeatureById">
-            <input type="hidden" name="productId" value="${productId}">
+            <input type="hidden" name="productId" value="${productId}"/>
             <span class="label">${uiLabelMap.CommonId}: </span>
-            <input type="text" size="10" name="productFeatureId" value="">
+            <input type="text" size="10" name="productFeatureId" value=""/>
             <span class='label'>
                 <a href="javascript:call_fieldlookup2(document.addFeatureById.productFeatureId,'LookupProductFeature');">
-                    <img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}">
+                    <img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/>
                 </a>
             </span>
             <span class="label">${uiLabelMap.ProductFeatureApplicationType}: </span>
             <select name="productFeatureApplTypeId" size="1">
                 <#list productFeatureApplTypes as productFeatureApplType>
                    <option value='${(productFeatureApplType.productFeatureApplTypeId)?if_exists}'
-                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected</#if>
-                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId =="STANDARD_FEATURE")>selected</#if>
+                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'Y' && productFeatureApplType.productFeatureApplTypeId =="SELECTABLE_FEATURE")>selected="selected"</#if>
+                   <#if (productFeatureApplType.productFeatureApplTypeId?exists && product?exists && product.isVirtual == 'N' && productFeatureApplType.productFeatureApplTypeId =="STANDARD_FEATURE")>selected="selected"</#if>
                    >${(productFeatureApplType.get("description",locale))?if_exists} </option>
                 </#list>
             </select>
             <br/>
-            <span class="label">${uiLabelMap.CommonFrom} : </span><input type="text" size="25" name="fromDate">
-            <a href="javascript:call_cal(document.addFeatureById.fromDate, '${nowTimestamp?string}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a>
-            <span class="label">${uiLabelMap.CommonThru} : </span><input type="text" size="25" name="thruDate">
-            <a href="javascript:call_cal(document.addFeatureById.thruDate, '${nowTimestamp?string}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a>
-            <span class="label">${uiLabelMap.CommonSequence} : </span><input type="text" size="5" name="sequenceNum">
-            <input type="submit" value="${uiLabelMap.CommonAdd}">
+            <span class="label">${uiLabelMap.CommonFrom} : </span><input type="text" size="25" name="fromDate"/>
+            <a href="javascript:call_cal(document.addFeatureById.fromDate, '${nowTimestamp?string}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"/></a>
+            <span class="label">${uiLabelMap.CommonThru} : </span><input type="text" size="25" name="thruDate"/>
+            <a href="javascript:call_cal(document.addFeatureById.thruDate, '${nowTimestamp?string}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"/></a>
+            <span class="label">${uiLabelMap.CommonSequence} : </span><input type="text" size="5" name="sequenceNum"/>
+            <input type="submit" value="${uiLabelMap.CommonAdd}"/>
         </form>
     </div>
 </div>

Modified: ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml?rev=812466&r1=812465&r2=812466&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml Tue Sep  8 11:25:25 2009
@@ -78,7 +78,7 @@
                                         <include-menu name="ProductTabBar" location="component://product/widget/catalog/Menus.xml"/>
                                         <container>
                                             <label style="h1">${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${productId}]  ${${extraFunctionName}}</label>
-                                            <image src="${product.smallImageUrl}" height="40" width="40" url-mode="content"/>
+                                            <image src="${product.smallImageUrl}" height="40" width="40" url-mode="content" alt="${product.internalName}"/>
                                         </container>
 
                                         <!-- add Create Product and View Product (in ecommerce) links -->