Author: buscob
Date: Sun Mar 7 21:17:54 2010 New Revision: 920117 URL: http://svn.apache.org/viewvc?rev=920117&view=rev Log: Starting to use the widget macros in FTL files. Part of OFBIZ-3541 Modified: ofbiz/trunk/applications/product/webapp/catalog/main.ftl ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl Modified: ofbiz/trunk/applications/product/webapp/catalog/main.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/main.ftl?rev=920117&r1=920116&r2=920117&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/main.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/main.ftl Sun Mar 7 21:17:54 2010 @@ -31,18 +31,18 @@ <br/> <div class="label">${uiLabelMap.ProductEditCategoryWithCategoryId}:</div> <form method="post" action="<@ofbizUrl>EditCategory</@ofbizUrl>" style="margin: 0;" name="EditCategoryForm"> - <input type="text" size="20" maxlength="20" name="productCategoryId" value=""/> - <a href="javascript:call_fieldlookup2(document.EditCategoryForm.productCategoryId,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a> + <@formrenderer.renderLookupField name="productCategoryId" id="productCategoryId" formName="EditCategoryForm" lookupFieldFormName="LookupProductCategory"/> <input type="submit" value="${uiLabelMap.ProductEditCategory}" class="smallSubmit"/> </form> + <br/> <div class="label">${uiLabelMap.CommonOr}: <a href="<@ofbizUrl>EditCategory</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductCreateNewCategory}</a></div> <br/> <div class="label">${uiLabelMap.ProductEditProductWithProductId}:</div> <form method="post" action="<@ofbizUrl>EditProduct</@ofbizUrl>" style="margin: 0;" name="EditProductForm"> - <input type="text" size="20" maxlength="20" name="productId" value=""/> - <a href="javascript:call_fieldlookup2(document.EditProductForm.productId,'LookupProduct');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}"/></a> + <@formrenderer.renderLookupField name="productId" id="productId" formName="EditProductForm" lookupFieldFormName="LookupProduct"/> <input type="submit" value=" ${uiLabelMap.ProductEditProduct}" class="smallSubmit"/> </form> + <br/> <div class="label">${uiLabelMap.CommonOr}: <a href="<@ofbizUrl>EditProduct</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductCreateNewProduct}</a></div> <br/> <div class="label">${uiLabelMap.CommonOr}: <a href="<@ofbizUrl>CreateVirtualWithVariantsForm</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductQuickCreateVirtualFromVariants}</a></div> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl?rev=920117&r1=920116&r2=920117&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl Sun Mar 7 21:17:54 2010 @@ -16,32 +16,17 @@ specific language governing permissions and limitations under the License. --> - <#macro tableNav> - <div class="nav-pager"> - <ul> - <#if (viewIndex > 0)> - <li class="nav-first"><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexFirst}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>'>${uiLabelMap.CommonFirst}</a></li> - <li class="nav-previous"><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexPrevious}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>'>${uiLabelMap.CommonPrevious}</a></li> - <#else> - <li class="nav-first-disabled"><span>${uiLabelMap.CommonFirst}<span></li> - <li class="nav-previous-disabled"><span>${uiLabelMap.CommonPrevious}<span></li> - </#if> - <#if (arraySize > 0)> - <li>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${arraySize}</li> - </#if> - <#if (arraySize > highIndex)> - <li class="nav-next"><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexNext}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>'>${uiLabelMap.CommonNext}</a></li> - <li class="nav-last"><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexLast}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>'>${uiLabelMap.CommonLast}</a></li> - <#else> - <li class="nav-next-disabled"><span>${uiLabelMap.CommonNext}<span></li> - <li class="nav-last-disabled"><span>${uiLabelMap.CommonLast}<span></li> - </#if> - </ul> - <br class="clear"/> - </div> - </#macro> <#if (arraySize > 0)> - <@tableNav/> + <#assign commonUrl="FindGeneric?${curFindString}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default(\"false\")}&"/> + <#assign firstUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexFirst}"/> + <#assign previousUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexPrevious}"/> + <#assign nextUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexNext}"/> + <#assign lastUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexLast}"/> + <#assign selectUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX="/> + <#assign selectSizeUrl=commonUrl+"VIEW_SIZE='+this.value+'&VIEW_INDEX=0"/> + <#assign commonDisplaying="${uiLabelMap.CommonDisplaying} ${lowIndex} - ${highIndex} of ${arraySize}"/> + + <@formrenderer.renderNextPrev listSize=arraySize viewSize=viewSize viewIndex=viewIndex highIndex=highIndex commonDisplaying=commonDisplaying firstUrl=firstUrl previousUrl=previousUrl nextUrl=nextUrl lastUrl=lastUrl selectUrl=selectUrl selectSizeUrl=selectSizeUrl/> </#if> <table class="basic-table hover-bar" cellspacing="0"> <tr class="header-row-2"> @@ -75,5 +60,5 @@ </#if> </table> <#if (arraySize > 0)> - <@tableNav/> + <@formrenderer.renderNextPrev listSize=arraySize viewSize=viewSize viewIndex=viewIndex highIndex=highIndex commonDisplaying=commonDisplaying firstUrl=firstUrl previousUrl=previousUrl nextUrl=nextUrl lastUrl=lastUrl selectUrl=selectUrl selectSizeUrl=selectSizeUrl/> </#if> |
Free forum by Nabble | Edit this page |