Author: jleroux
Date: Wed Oct 28 17:14:06 2009 New Revision: 830676 URL: http://svn.apache.org/viewvc?rev=830676&view=rev Log: A patch from Deepak Dixit "Html cleanup of keyword search boxes." (https://issues.apache.org/jira/browse/OFBIZ-2986) - OFBIZ-2986 For the product component. Modified: ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl 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=830676&r1=830675&r2=830676&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl Wed Oct 28 17:14:06 2009 @@ -18,57 +18,63 @@ --> <#if (requestAttributes.uiLabelMap)?exists><#assign uiLabelMap = requestAttributes.uiLabelMap></#if> -<script language="JavaScript" type="text/javascript"> - <!-- +<script type="text/javascript"> +//<![CDATA[ function changeCategory() { document.forms["keywordsearchform"].elements["SEARCH_CATEGORY_ID"].value=document.forms["advancedsearchform"].elements["DUMMYCAT"].value; document.forms["advancedsearchform"].elements["SEARCH_CATEGORY_ID"].value=document.forms["advancedsearchform"].elements["DUMMYCAT"].value; } function submitProductJump() { - productId = document.forms["productjumpform"].elements["productId"].value; - document.forms["productjumpform"].elements["productId"].value = productId.replace(" ",""); - document.forms["productjumpform"].action = document.forms["productjumpform"].elements["DUMMYPAGE"].value; - document.forms["productjumpform"].submit(); + productId = $('productJumpFormProductId').value; + $('productJumpFormProductId').value = productId.replace(" ",""); + $('productJumpForm').action = $('dummyPage').value; + $('productJumpForm').submit(); } - //--> +//]]> </script> -<form name="keywordsearchform" method="post" action="<@ofbizUrl>keywordsearch?VIEW_SIZE=25&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}: - </span> - <input type="text" name="SEARCH_CATEGORY_ID" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/><a href="javascript:call_fieldlookup2(document.keywordsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a> - <span class="label"> - ${uiLabelMap.CommonNoContains} - </span> - <input type="checkbox" name="SEARCH_CONTAINS" value="N" <#if requestParameters.SEARCH_CONTAINS?if_exists == "N">checked="checked"</#if>/> - <span class="label"> - ${uiLabelMap.CommonAny} - </span> - <input type="radio" name="SEARCH_OPERATOR" value="OR" <#if requestParameters.SEARCH_OPERATOR?if_exists != "AND">checked="checked"</#if>/> - <span class="label"> - ${uiLabelMap.CommonAll} - </span> - <input type="radio" name="SEARCH_OPERATOR" value="AND" <#if requestParameters.SEARCH_OPERATOR?if_exists == "AND">checked="checked"</#if>/> - - <a href="javascript:document.keywordsearchform.submit()" class="buttontext">${uiLabelMap.CommonFind}</a> +<form name="keywordsearchform" id="keywordSearchForm" method="post" action="<@ofbizUrl>keywordsearch?VIEW_SIZE=25&PAGING=Y</@ofbizUrl>"> + <fieldset> + <div> + <label for="keywordSearchString">${uiLabelMap.ProductKeywords}:</label> + <input type="text" name="SEARCH_STRING" id="keywordSearchString" size="20" maxlength="50" value="${requestParameters.SEARCH_STRING?if_exists}" /> + </div> + <div> + <label for="keywordSearchCategoryId">${uiLabelMap.ProductCategoryId}:</label> + <input type="text" name="SEARCH_CATEGORY_ID" id="keywordSearchCategoryId" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/><a href="javascript:call_fieldlookup2($('keywordSearchCategoryId'),'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' alt="${uiLabelMap.CommonClickHereForFieldLookup}" /></a> + </div> + <div> + <label for="keywordSearchCointains">${uiLabelMap.CommonNoContains}</label> + <input type="checkbox" name="SEARCH_CONTAINS" id="keywordSearchCointains" value="N" <#if requestParameters.SEARCH_CONTAINS?if_exists == "N">checked="checked"</#if> /> + <label for="keywordSearchOperatorOr">${uiLabelMap.CommonAny}</label> + <input type="radio" name="SEARCH_OPERATOR" id="keywordSearchOperatorOr" value="OR" <#if requestParameters.SEARCH_OPERATOR?if_exists != "AND">checked="checked"</#if> /> + <label for="keywordSearchOperatorAnd">${uiLabelMap.CommonAll}</label> + <input type="radio" name="SEARCH_OPERATOR" id="keywordSearchOperatorAnd" value="AND" <#if requestParameters.SEARCH_OPERATOR?if_exists == "AND">checked="checked"</#if> /> + </div> + <div> + <a href="javascript:$('keywordSearchForm').submit()" class="buttontext">${uiLabelMap.CommonFind}</a> + </div> + </fieldset> </form> -<form name="advancedsearchform" method="post" action="<@ofbizUrl>advancedsearch</@ofbizUrl>" style="margin: 0;"> - <span class="label"> - ${uiLabelMap.ProductCategoryId}: - </span> - <input type="text" name="SEARCH_CATEGORY_ID" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/><a href="javascript:call_fieldlookup2(document.advancedsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a> - <div> - <a href="javascript:document.advancedsearchform.submit()" class="buttontext">${uiLabelMap.ProductAdvancedSearch}</a> - </div> +<form name="advancedsearchform" id="advancedSearchForm" method="post" action="<@ofbizUrl>advancedsearch</@ofbizUrl>"> + <fieldset> + <div> + <label for="searchCategoryId">${uiLabelMap.ProductCategoryId}:</label> + <input type="text" name="SEARCH_CATEGORY_ID" id="searchCategoryId" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/> + <a href="javascript:call_fieldlookup2($('searchCategoryId'),'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' alt="${uiLabelMap.CommonClickHereForFieldLookup}" /></a> + </div> + <div> + <a href="javascript:$('advancedSearchForm').submit()" class="buttontext">${uiLabelMap.ProductAdvancedSearch}</a> + </div> + </fieldset> </form> -<form name="productjumpform" method="post" action="<@ofbizUrl>EditProduct</@ofbizUrl>" style="margin: 0;"> - <input type="text" name="productId" size="10" maxlength="20" value="${requestParameters.productId?if_exists}"/> - <input type="hidden" name="viewSize" value="20"/> - <input type="hidden" name="viewIndex" value="1"/> - <a href="javascript:call_fieldlookup2(document.productjumpform.productId,'LookupProduct');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a> - <select name="DUMMYPAGE" onchange="submitProductJump()"> +<form name="productjumpform" id="productJumpForm" method="post" action="<@ofbizUrl>EditProduct</@ofbizUrl>"> + <fieldset> + <input type="text" name="productId" id="productJumpFormProductId" size="10" maxlength="20" value="${requestParameters.productId?if_exists}" /> + <input type="hidden" name="viewSize" value="20" /> + <input type="hidden" name="viewIndex" value="1" /> + <a href="javascript:call_fieldlookup2($('productJumpFormProductId'),'LookupProduct');"><img src='/images/fieldlookup.gif' width='15' height='14' alt="${uiLabelMap.CommonClickHereForFieldLookup}" /></a> + <select name="DUMMYPAGE" id="dummyPage" onchange="submitProductJump()"> <option value="<@ofbizUrl>EditProduct</@ofbizUrl>">-${uiLabelMap.ProductProductJump}-</option> <option value="<@ofbizUrl>EditProductQuickAdmin</@ofbizUrl>">${uiLabelMap.ProductQuickAdmin}</option> <option value="<@ofbizUrl>EditProduct</@ofbizUrl>">${uiLabelMap.ProductProduct}</option> @@ -97,4 +103,5 @@ <option value="<@ofbizUrl>viewProductOrder</@ofbizUrl>">${uiLabelMap.OrderOrders}</option> <option value="<@ofbizUrl>EditProductCommunicationEvents</@ofbizUrl>">${uiLabelMap.PartyCommunications}</option> </select> -</form> + </fieldset> +</form> \ No newline at end of file |
Free forum by Nabble | Edit this page |