From 9161b85ce2cdbbb2e04c3e92d2f630192ab8eeda Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Thu, 17 Sep 2009 03:22:32 +0000 Subject: [PATCH] spaces for tabs git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@816036 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/GetContentLookupList.groovy | 72 +++++++++---------- .../webapp/content/content/ContentNav.ftl | 18 ++--- .../content/lookup/ContentTreeLookupList.ftl | 64 ++++++++--------- 3 files changed, 77 insertions(+), 77 deletions(-) diff --git a/applications/content/webapp/content/WEB-INF/actions/content/GetContentLookupList.groovy b/applications/content/webapp/content/WEB-INF/actions/content/GetContentLookupList.groovy index dfb34c88c4..51aea9cd60 100644 --- a/applications/content/webapp/content/WEB-INF/actions/content/GetContentLookupList.groovy +++ b/applications/content/webapp/content/WEB-INF/actions/content/GetContentLookupList.groovy @@ -35,7 +35,7 @@ try { viewIndex = Integer.valueOf((String)parameters.get("VIEW_INDEX")).intValue(); } catch (NumberFormatException nfe) { - viewIndex = 0; + viewIndex = 0; } context.viewIndexFirst = 0; @@ -70,9 +70,9 @@ if (errMsgList) { curFindString = UtilFormatOut.encodeQuery(curFindString); context.curFindString = curFindString; try { - viewSize = Integer.valueOf((String)parameters.get("VIEW_SIZE")).intValue(); + viewSize = Integer.valueOf((String)parameters.get("VIEW_SIZE")).intValue(); } catch (NumberFormatException nfe) { - + } context.viewSize = viewSize; @@ -83,42 +83,42 @@ int highIndex = (viewIndex+1)*viewSize; context.lowIndex = lowIndex; int arraySize = 0; List resultPartialList = null; - conditions = [EntityCondition.makeCondition("contentIdStart", EntityOperator.EQUALS,(String)parameters.get("contentId"))]; + conditions = [EntityCondition.makeCondition("contentIdStart", EntityOperator.EQUALS,(String)parameters.get("contentId"))]; if ((highIndex - lowIndex + 1) > 0) { - // get the results as an entity list iterator - boolean beganTransaction = false; - if(resultPartialList==null){ + // get the results as an entity list iterator + boolean beganTransaction = false; + if(resultPartialList==null){ try { - beganTransaction = TransactionUtil.begin(); - allConditions = EntityCondition.makeCondition( conditions, EntityOperator.AND ); - fieldsToSelect = FastSet.newInstance(); - //fieldsToSelect=["contentId", "contentName", "mimeTypeId"] as Set; - findOptions = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true); - EntityListIterator listIt=null; - listIt = delegator.find("ContentAssocViewTo", allConditions, null, null, ["contentId ASC"], findOptions); - resultPartialList = listIt.getPartialList(lowIndex, highIndex - lowIndex + 1); - - arraySize = listIt.getResultsSizeAfterPartialList(); - if (arraySize < highIndex) { - highIndex = arraySize; - } - listIt.close(); - } catch (GenericEntityException e) { - Debug.logError(e, "Failure in operation, rolling back transaction", "GetContentLookupList.groovy"); - try { - // only rollback the transaction if we started one... - TransactionUtil.rollback(beganTransaction, "Error looking up entity values in WebTools Entity Data Maintenance", e); - } catch (GenericEntityException e2) { - Debug.logError(e2, "Could not rollback transaction: " + e2.toString(), "GetContentLookupList.groovy"); - } - // after rolling back, rethrow the exception - throw e; - } finally { - // only commit the transaction if we started one... this will throw an exception if it fails - TransactionUtil.commit(beganTransaction); - } - } + beganTransaction = TransactionUtil.begin(); + allConditions = EntityCondition.makeCondition( conditions, EntityOperator.AND ); + fieldsToSelect = FastSet.newInstance(); + //fieldsToSelect=["contentId", "contentName", "mimeTypeId"] as Set; + findOptions = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true); + EntityListIterator listIt=null; + listIt = delegator.find("ContentAssocViewTo", allConditions, null, null, ["contentId ASC"], findOptions); + resultPartialList = listIt.getPartialList(lowIndex, highIndex - lowIndex + 1); + + arraySize = listIt.getResultsSizeAfterPartialList(); + if (arraySize < highIndex) { + highIndex = arraySize; + } + listIt.close(); + } catch (GenericEntityException e) { + Debug.logError(e, "Failure in operation, rolling back transaction", "GetContentLookupList.groovy"); + try { + // only rollback the transaction if we started one... + TransactionUtil.rollback(beganTransaction, "Error looking up entity values in WebTools Entity Data Maintenance", e); + } catch (GenericEntityException e2) { + Debug.logError(e2, "Could not rollback transaction: " + e2.toString(), "GetContentLookupList.groovy"); + } + // after rolling back, rethrow the exception + throw e; + } finally { + // only commit the transaction if we started one... this will throw an exception if it fails + TransactionUtil.commit(beganTransaction); + } + } } context.highIndex = highIndex; context.arraySize = arraySize; diff --git a/applications/content/webapp/content/content/ContentNav.ftl b/applications/content/webapp/content/content/ContentNav.ftl index 873e22e31f..10f3bc6d53 100644 --- a/applications/content/webapp/content/content/ContentNav.ftl +++ b/applications/content/webapp/content/content/ContentNav.ftl @@ -77,13 +77,13 @@ <#-------------------------------------------------------------------------------------call ofbiz function--> function callDocument(ctx) { - var tabitem='${tabButtonItem?if_exists}'; - if(tabitem=="navigateContent") - listDocument='<@ofbizUrl>/views/ListDocument'; + var tabitem='${tabButtonItem?if_exists}'; + if(tabitem=="navigateContent") + listDocument='<@ofbizUrl>/views/ListDocument'; if(tabitem=="LookupContentTree") - listDocument='<@ofbizUrl>/views/ListContentTree'; + listDocument='<@ofbizUrl>/views/ListContentTree'; if(tabitem=="LookupDetailContentTree") - listDocument='<@ofbizUrl>/views/ViewContentDetail'; + listDocument='<@ofbizUrl>/views/ViewContentDetail'; var bindArgs = { url: listDocument, method: 'POST', @@ -199,8 +199,8 @@ } <#------------------------------------------------------pagination function --> function nextPrevDocumentList(url){ - url= '<@ofbizUrl>'+url+''; - var bindArgs = { + url= '<@ofbizUrl>'+url+''; + var bindArgs = { url: url, method: 'POST', mimetype: 'text/html', @@ -222,12 +222,12 @@ font-size: 10px; } <#if tabButtonItem?has_content> - <#if tabButtonItem=="LookupContentTree"||tabButtonItem=="LookupDetailContentTree"> + <#if tabButtonItem=="LookupContentTree"||tabButtonItem=="LookupDetailContentTree"> body{background:none;} .left-border{float:left;width:25%;} .contentarea{margin: 0 0 0 0.5em;padding:0 0 0 0.5em;} .leftonly{float:none;min-height:25em;} - + diff --git a/applications/content/webapp/content/lookup/ContentTreeLookupList.ftl b/applications/content/webapp/content/lookup/ContentTreeLookupList.ftl index 4d12fa8dfd..6ea6ded7e3 100644 --- a/applications/content/webapp/content/lookup/ContentTreeLookupList.ftl +++ b/applications/content/webapp/content/lookup/ContentTreeLookupList.ftl @@ -40,7 +40,7 @@ <#if (arraySize > 0)> -
+
@@ -63,39 +63,39 @@ <#if contentAssoc?has_content> - <#assign alt_row = false/> - <#assign listcount=0> - <#list contentAssoc as contentData> - <#if tabButtonItem=="ListContentTree"> - <#--Form ListContentTree--> - class="alternate-row"> - - - - - <#elseif tabButtonItem=="ListDocument"> - <#--Form ListDocument--> - class="alternate-row"> - - - - - <#if contentData.caFromDate?has_content> + <#assign alt_row = false/> + <#assign listcount=0> + <#list contentAssoc as contentData> + <#if tabButtonItem=="ListContentTree"> + <#--Form ListContentTree--> + class="alternate-row"> + + + + + <#elseif tabButtonItem=="ListDocument"> + <#--Form ListDocument--> + class="alternate-row"> + + + + + <#if contentData.caFromDate?has_content> <#assign caFromDate = Static["org.ofbiz.base.util.UtilDateTime"].toDateString(contentData.caFromDate, "dd/MM/yyyy")/> - - - - - - - - - - - <#assign alt_row = !alt_row/> - <#assign listcount=listcount+1> - + + + + + + + + + + + <#assign alt_row = !alt_row/> + <#assign listcount=listcount+1> +
${contentData.contentId?if_exists}${contentData.contentName?if_exists}${contentData.mimeTypeId?if_exists}
${contentData.contentId?if_exists}${contentData.contentTypeId?if_exists}${contentData.mimeTypeId?if_exists}${contentData.statusId?if_exists}
${contentData.contentId?if_exists}${contentData.contentName?if_exists}${contentData.mimeTypeId?if_exists}
${contentData.contentId?if_exists}${contentData.contentTypeId?if_exists}${contentData.mimeTypeId?if_exists}${contentData.statusId?if_exists}${caFromDate?if_exists}${uiLabelMap.CommonDelete}
${caFromDate?if_exists}${uiLabelMap.CommonDelete}