spaces for tabs

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@816036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2009-09-17 03:22:32 +00:00
parent 69a9cfb394
commit 9161b85ce2
3 changed files with 77 additions and 77 deletions
@@ -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;
@@ -77,13 +77,13 @@
<#-------------------------------------------------------------------------------------call ofbiz function-->
function callDocument(ctx) {
var tabitem='${tabButtonItem?if_exists}';
if(tabitem=="navigateContent")
listDocument='<@ofbizUrl>/views/ListDocument</@ofbizUrl>';
var tabitem='${tabButtonItem?if_exists}';
if(tabitem=="navigateContent")
listDocument='<@ofbizUrl>/views/ListDocument</@ofbizUrl>';
if(tabitem=="LookupContentTree")
listDocument='<@ofbizUrl>/views/ListContentTree</@ofbizUrl>';
listDocument='<@ofbizUrl>/views/ListContentTree</@ofbizUrl>';
if(tabitem=="LookupDetailContentTree")
listDocument='<@ofbizUrl>/views/ViewContentDetail</@ofbizUrl>';
listDocument='<@ofbizUrl>/views/ViewContentDetail</@ofbizUrl>';
var bindArgs = {
url: listDocument,
method: 'POST',
@@ -199,8 +199,8 @@
}
<#------------------------------------------------------pagination function -->
function nextPrevDocumentList(url){
url= '<@ofbizUrl>'+url+'</@ofbizUrl>';
var bindArgs = {
url= '<@ofbizUrl>'+url+'</@ofbizUrl>';
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;}
</#if>
</#if>
</#if>
</style>
@@ -40,7 +40,7 @@
<td></td>
</tr>
<#if (arraySize > 0)>
<tr><td colspan="3"><hr/></td></tr>
<tr><td colspan="3"><hr/></td></tr>
</#if>
</table>
<table class="basic-table hover-bar" cellspacing="0">
@@ -63,39 +63,39 @@
</tr>
</#if>
<#if contentAssoc?has_content>
<#assign alt_row = false/>
<#assign listcount=0>
<#list contentAssoc as contentData>
<#if tabButtonItem=="ListContentTree">
<#--Form ListContentTree-->
<tr <#if alt_row> class="alternate-row"</#if>>
<td><a class="plain" href="javascript:set_value('${contentData.contentId?if_exists}')">${contentData.contentId?if_exists}</a></td>
<td>${contentData.contentName?if_exists}</td>
<td>${contentData.mimeTypeId?if_exists}</td>
</tr>
<#elseif tabButtonItem=="ListDocument">
<#--Form ListDocument-->
<tr <#if alt_row> class="alternate-row"</#if>>
<td><a class="plain" href="/content/control/editContent?contentId=${contentData.contentId?if_exists}">${contentData.contentId?if_exists}</a></td>
<td>${contentData.contentTypeId?if_exists}</td>
<td>${contentData.mimeTypeId?if_exists}</td>
<td>${contentData.statusId?if_exists}</td>
<#if contentData.caFromDate?has_content>
<#assign alt_row = false/>
<#assign listcount=0>
<#list contentAssoc as contentData>
<#if tabButtonItem=="ListContentTree">
<#--Form ListContentTree-->
<tr <#if alt_row> class="alternate-row"</#if>>
<td><a class="plain" href="javascript:set_value('${contentData.contentId?if_exists}')">${contentData.contentId?if_exists}</a></td>
<td>${contentData.contentName?if_exists}</td>
<td>${contentData.mimeTypeId?if_exists}</td>
</tr>
<#elseif tabButtonItem=="ListDocument">
<#--Form ListDocument-->
<tr <#if alt_row> class="alternate-row"</#if>>
<td><a class="plain" href="/content/control/editContent?contentId=${contentData.contentId?if_exists}">${contentData.contentId?if_exists}</a></td>
<td>${contentData.contentTypeId?if_exists}</td>
<td>${contentData.mimeTypeId?if_exists}</td>
<td>${contentData.statusId?if_exists}</td>
<#if contentData.caFromDate?has_content>
<#assign caFromDate = Static["org.ofbiz.base.util.UtilDateTime"].toDateString(contentData.caFromDate, "dd/MM/yyyy")/>
</#if>
<td>${caFromDate?if_exists}</td>
<td><a href="javascript:document.listDocumentForm_${listcount}.submit()" >${uiLabelMap.CommonDelete}</a></td>
</tr>
<form action="<@ofbizUrl>removeDocumentFromTree</@ofbizUrl>" name="listDocumentForm_${listcount}" method="post">
<input type="hidden" name="contentId" value="${contentData.contentIdStart?if_exists}"/>
<input type="hidden" name="contentIdTo" value="${contentData.contentId?if_exists}"/>
<input type="hidden" name="contentAssocTypeId" value="${contentData.caContentAssocTypeId?if_exists}"/>
<input type="hidden" name="fromDate" value="${contentData.fromDate?if_exists}"/>
</form>
</#if>
<#assign alt_row = !alt_row/>
<#assign listcount=listcount+1>
</#list>
<td>${caFromDate?if_exists}</td>
<td><a href="javascript:document.listDocumentForm_${listcount}.submit()" >${uiLabelMap.CommonDelete}</a></td>
</tr>
<form action="<@ofbizUrl>removeDocumentFromTree</@ofbizUrl>" name="listDocumentForm_${listcount}" method="post">
<input type="hidden" name="contentId" value="${contentData.contentIdStart?if_exists}"/>
<input type="hidden" name="contentIdTo" value="${contentData.contentId?if_exists}"/>
<input type="hidden" name="contentAssocTypeId" value="${contentData.caContentAssocTypeId?if_exists}"/>
<input type="hidden" name="fromDate" value="${contentData.fromDate?if_exists}"/>
</form>
</#if>
<#assign alt_row = !alt_row/>
<#assign listcount=listcount+1>
</#list>
</#if>
</table>
</div>