Author: jleroux
Date: Sat Jun 2 17:10:52 2012
New Revision: 1345532
URL: http://svn.apache.org/viewvc?rev=1345532&view=rev
Log:
A patch from Ankit Jain "Replaces != nullpattern in ftl file by ?? (which
replaces deprecated ?if_exist)" https://issues.apache.org/jira/browse/OFBIZ-4866
jleroux: I simply removed some useless ?? when ?has_content was enough. I also
found 3 other cases in returnPolicy.ftl that I fixed the same way than Ankit
(using ??)
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl
ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl
ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl
ofbiz/trunk/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/period/EditCustomTimePeriod.ftl
Sat Jun 2 17:10:52 2012
@@ -77,7 +77,7 @@ under the License.
</#if>
<option
value='${allCustomTimePeriod.customTimePeriodId}'<#if isDefault>
selected="selected"</#if>>
${allCustomTimePeriod.organizationPartyId}
- <#if allPeriodType !=
null>${allPeriodType.description}:</#if>
+ <#if allPeriodType??>${allPeriodType.description}:</#if>
${allCustomTimePeriod.periodNum}
[${allCustomTimePeriod.customTimePeriodId}]
</option>
@@ -177,7 +177,7 @@ under the License.
</#if>
<option
value='${allCustomTimePeriod.customTimePeriodId}'<#if isDefault>
selected="selected"</#if>>
${allCustomTimePeriod.organizationPartyId}
- <#if allPeriodType != null> ${allPeriodType.description}:
</#if>
+ <#if allPeriodType??> ${allPeriodType.description}: </#if>
${allCustomTimePeriod.periodNum}
[${allCustomTimePeriod.customTimePeriodId}]
</option>
@@ -258,7 +258,7 @@ under the License.
<option value="${allCustomTimePeriod.customTimePeriodId}"<#if
isDefault> selected="selected"</#if>>
${allCustomTimePeriod.organizationPartyId}
<#if
(allCustomTimePeriod.parentPeriodId)?exists>Par:${allCustomTimePeriod.parentPeriodId}</#if>
- <#if allPeriodType != null> ${allPeriodType.description}:</#if>
+ <#if allPeriodType??> ${allPeriodType.description}:</#if>
${allCustomTimePeriod.periodNum}
[${allCustomTimePeriod.customTimePeriodId}]
</option>
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/reports/DepositSlip.fo.ftl
Sat Jun 2 17:10:52 2012
@@ -84,7 +84,7 @@ under the License.
</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border="1pt solid"
border-width=".1mm">
- <fo:block
text-align="right">${paymentMethodType.description?if_exists} <#if
creditCard?has_content && creditCard!=
null>(${creditCard.cardType?if_exists})</#if></fo:block>
+ <fo:block
text-align="right">${paymentMethodType.description?if_exists} <#if
creditCard?has_content &&
creditCard??>(${creditCard.cardType?if_exists})</#if></fo:block>
<#assign creditCard = null/>
</fo:table-cell>
<fo:table-cell padding="2pt" border="1pt solid"
border-width=".1mm">
Modified:
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl
(original)
+++
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl
Sat Jun 2 17:10:52 2012
@@ -161,7 +161,7 @@ document.lookupinventory.productId.focus
<#if qohEvents?has_content>
<#assign initialQohEvent =
Static["org.ofbiz.entity.util.EntityUtil"].getFirst(qohEvents)>
</#if>
- <#if initialQohEvent != null>
+ <#if initialQohEvent??>
<#if initialQohEvent.quantity?has_content>
<#assign quantityAvailableAtDate =
initialQohEvent.quantity>
</#if>
@@ -176,7 +176,7 @@ document.lookupinventory.productId.focus
<b>[${inven.productId}]</b> ${product.internalName?if_exists}
</th>
<td>
- <#if productFacility != null &&
productFacility?has_content>
+ <#if productFacility?has_content>
<div>
<b>${uiLabelMap.ProductFacility}:</b> ${productFacility.facilityId?if_exists}
</div>
Modified:
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl
(original)
+++
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl
Sat Jun 2 17:10:52 2012
@@ -41,7 +41,7 @@ jQuery(document).ready(function(){
<#assign userLoginApprovers =
delegator.findByAnd("UserLogin",Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId",
partyRole.partyId))/>
<#assign userLoginApprover = userLoginApprovers[0]>
<#assign userLoginAndPartyDetails =
delegator.findOne("UserLoginAndPartyDetails",
Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId",
userLoginApprover.partyId, "userLoginId", userLoginApprover.userLoginId),
false)?if_exists>
- <#if userLoginAndPartyDetails != null &&
userLoginAndPartyDetails?has_content>
+ <#if userLoginAndPartyDetails?has_content>
<#assign partyContentDetail =
delegator.findByAnd("ContentApproval",Static["org.ofbiz.base.util.UtilMisc"].toMap("roleTypeId",
"IMAGEAPPROVER", "approvalStatusId", "IM_PENDING", "partyId",
userLoginAndPartyDetails.partyId))/>
<#assign imageApproveSize = partyContentDetail.size()>
<#if userLoginAndPartyDetails.userLoginId ==
userLogin.userLoginId>
Modified:
ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl
(original)
+++
ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl
Sat Jun 2 17:10:52 2012
@@ -24,7 +24,7 @@ under the License.
for (var x = 0; x <= rowCount; x++) {
var quantityAcceptedInput =
document.getElementById('quantityAccepted_o_' + x);
var quantityInput = document.getElementById('quantity_o_' + x);
- if (quantityAcceptedInput != null && quantityInput != null) {
+ if (quantityAcceptedInput?? && quantityInput??) {
quantityInput.value = quantityAcceptedInput.value;
}
}
Modified:
ofbiz/trunk/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl
(original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl
Sat Jun 2 17:10:52 2012
@@ -33,7 +33,7 @@ under the License.
<select name="DEFINITION_NAME">
<option value=""></option>
<#list definitionNames as oneDefinitionName>
- boolean isSelected = definitionName != null &&
definitionName.equals(oneDefinitionName);
+ boolean isSelected = definitionName?? &&
definitionName.equals(oneDefinitionName);
<option value="${oneDefinitionName}" <#if
parameters.DEFINITION_NAME?exists && parameters.DEFINITION_NAME ==
oneDefinitionName> selected="selected" </#if>>${oneDefinitionName}</option>
</#list>
</select>
@@ -82,7 +82,7 @@ under the License.
<#assign modelRecord = record.getModelRecord()>
<#-- if record is different than the last displayed, make a new
table and header row -->
<#if !modelRecord.name.equals(lastRecordName)>
- <#if lastRecordName != null>
+ <#if lastRecordName??>
</table><br />
</#if>
<table class="basic-table hover-bar" cellspacing="0">
@@ -113,7 +113,7 @@ under the License.
</#if>
</#list>
</tr>
- <#if record.getChildRecords() != null &&
(record.getChildRecords().size() > 0)>
+ <#if (record.getChildRecords())?has_content>
<@displayrecords records = record.getChildRecords()/>
</#if>
</#list>
Modified:
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl
(original)
+++
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl
Sat Jun 2 17:10:52 2012
@@ -715,7 +715,7 @@ under the License.
<table>
<#assign j
= 0>
<#list
paymentMethods as paymentMethod>
- <#if
paymentMethod.value() != null>
+ <#if
paymentMethod.value()??>
<#if j == 0><tr></#if>
<#if
paymentMethod.compareTo(buyerPayMethCode_PAY_PAL?if_exists) == 0 >
<#assign is_payPal = true>
Modified:
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl
(original)
+++
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl
Sat Jun 2 17:10:52 2012
@@ -47,7 +47,7 @@ under the License.
<#list retAccpTypeArray as retAccpType>
<#assign returnAccepted = "">
<option
value="${retAccpType.getReturnsAcceptedOption()?if_exists}"
- <#if returnAccepted != null &&
returnAccepted.equalsIgnoreCase(retAccpType.getReturnsAcceptedOption()?if_exists)>selected="select"</#if>>
+ <#if returnAccepted?? &&
returnAccepted.equalsIgnoreCase(retAccpType.getReturnsAcceptedOption()?if_exists)>selected="select"</#if>>
${retAccpType.getDescription()?if_exists}</option>
</#list>
</#if>
@@ -68,7 +68,7 @@ under the License.
<#list retWithinArray as retWithin>
<#assign returnWithin = "">
<option
value="${retWithin.getReturnsWithinOption()?if_exists}"
- <#if returnWithin!=null &&
returnWithin.equalsIgnoreCase(retWithin.getReturnsWithinOption()?if_exists)>selected="select"</#if>>
+ <#if returnWithin?? &&
returnWithin.equalsIgnoreCase(retWithin.getReturnsWithinOption()?if_exists)>selected="select"</#if>>
${retWithin.getDescription()?if_exists}</option>
</#list>
</#if>
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl?rev=1345532&r1=1345531&r2=1345532&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
(original)
+++
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
Sat Jun 2 17:10:52 2012
@@ -355,7 +355,7 @@ $(function(){
<hr />
<div id="productImageBox">
- <#if productImageList != null && productImageList?has_content>
+ <#if productImageList?has_content>
<#-- Product image/name/price -->
<div id="detailImageBox">
<#assign productLargeImageUrl =
productContentWrapper.get("LARGE_IMAGE_URL")?if_exists />