You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2017/07/08 13:30:04 UTC
svn commit: r1801286 - in /ofbiz/ofbiz-plugins/trunk: ebay/template/find/
ebaystore/template/feedback/ ebaystore/template/store/
Author: arunpatidar
Date: Sat Jul 8 13:30:04 2017
New Revision: 1801286
URL: http://svn.apache.org/viewvc?rev=1801286&view=rev
Log:
Improved: Inconsistent String Comparisons in Ftl of ebay plugin. (OFBIZ-9254).
Thanks Devanshu Vyas for your contribution
Modified:
ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayAdvancedSearch.ftl
ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayKeywordSearch.ftl
ofbiz/ofbiz-plugins/trunk/ebay/template/find/ProductsExportToEbay.ftl
ofbiz/ofbiz-plugins/trunk/ebaystore/template/feedback/LeaveFeedback.ftl
ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/EbayApiKeywordSearch.ftl
ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/OrderImported.ftl
ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/ProductSearchExport.ftl
ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/StoreSetting.ftl
Modified: ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayAdvancedSearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayAdvancedSearch.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayAdvancedSearch.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayAdvancedSearch.ftl Sat Jul 8 13:30:04 2017
@@ -226,12 +226,12 @@ under the License.
<label>
${uiLabelMap.CommonAny}
<input type="radio" name="SEARCH_OPERATOR"
- value="OR" <#if searchOperator == "OR">checked="checked"</#if>/>
+ value="OR" <#if "OR" == searchOperator>checked="checked"</#if>/>
</label>
<label>
${uiLabelMap.CommonAll}
<input type="radio" name="SEARCH_OPERATOR"
- value="AND" <#if searchOperator == "AND">checked="checked"</#if>/>
+ value="AND" <#if "AND" == searchOperator>checked="checked"</#if>/>
</label>
</div>
</td>
Modified: ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayKeywordSearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayKeywordSearch.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayKeywordSearch.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/template/find/EbayKeywordSearch.ftl Sat Jul 8 13:30:04 2017
@@ -58,7 +58,7 @@ under the License.
| <a href="<@o...@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonNext}</a>
</#if>
- <#if paging == "Y">
+ <#if "Y" == paging>
<a href="<@o...@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOff}</a>
<#else>
Modified: ofbiz/ofbiz-plugins/trunk/ebay/template/find/ProductsExportToEbay.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/template/find/ProductsExportToEbay.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/template/find/ProductsExportToEbay.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/template/find/ProductsExportToEbay.ftl Sat Jul 8 13:30:04 2017
@@ -64,7 +64,7 @@ under the License.
</select>
</td>
</tr>
- <#if hideExportOptions?has_content && hideExportOptions == "N">
+ <#if hideExportOptions?has_content && "N" == hideExportOptions>
<tr>
<td align="right" class="label">${uiLabelMap.CommonCountry}</td>
<td> </td>
Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/template/feedback/LeaveFeedback.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/template/feedback/LeaveFeedback.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebaystore/template/feedback/LeaveFeedback.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebaystore/template/feedback/LeaveFeedback.ftl Sat Jul 8 13:30:04 2017
@@ -28,7 +28,7 @@ under the License.
obj.src = "/images/rate/starHover.gif";
}
function outStar(obj){
- if(active != "" || obj.src == "/images/rate/starActive.gif"){
+ if(active != "" || "/images/rate/starActive.gif" == obj.src){
obj.src = "/images/rate/starActive.gif";
}else{
obj.src = "/images/rate/starDefault.gif";
@@ -70,9 +70,9 @@ under the License.
<#if parameters.role?has_content && parameters.transactionId?has_content
&& parameters.targetUser?has_content && parameters.commentingUser?has_content>
<#if parameters.transactionId == leaveFeedback.transactionID && parameters.itemId == leaveFeedback.itemID>
- <#if role == "buyer">
+ <#if "buyer" == role>
<#assign feedbackCounter = feedbackCounter + 1>
- <#if row == "">
+ <#if "" == row>
<#assign row = "alternate-row">
<#else>
<#assign row = "">
@@ -116,7 +116,7 @@ under the License.
</tr>
<#else>
<#assign feedbackCounter = feedbackCounter + 1>
- <#if row == "">
+ <#if "" == row>
<#assign row = "alternate-row">
<#else>
<#assign row = "">
@@ -350,9 +350,9 @@ under the License.
</#if>
</#if>
<#elseif role=="buyer">
- <#if leaveFeedback.role == "buyer">
+ <#if "buyer" == leaveFeedback.role>
<#assign feedbackCounter = feedbackCounter + 1>
- <#if row == "">
+ <#if "" == row>
<#assign row = "alternate-row">
<#else>
<#assign row = "">
@@ -393,10 +393,10 @@ under the License.
</td>
</tr>
</#if>
- <#elseif role == "seller">
- <#if leaveFeedback.role == "seller">
+ <#elseif "seller" == role>
+ <#if "seller" == leaveFeedback.role>
<#assign feedbackCounter = feedbackCounter + 1>
- <#if row == "">
+ <#if "" == row>
<#assign row = "alternate-row">
<#else>
<#assign row = "">
@@ -623,7 +623,7 @@ under the License.
</#if>
<#else>
<#assign feedbackCounter = feedbackCounter + 1>
- <#if row == "">
+ <#if "" == row>
<#assign row = "alternate-row">
<#else>
<#assign row = "">
@@ -641,7 +641,7 @@ under the License.
order details</a>
</td>
<td>
- <#if leaveFeedback.role == "seller">
+ <#if "seller" == leaveFeedback.role>
<label>
<input type="radio" name="commentType${feedbackCounter}" value="positive"
onclick="document.getElementById('rate${feedbackCounter}').style.display='block';"/>
@@ -674,7 +674,7 @@ under the License.
<span>I'll leave Feedback later</span>
</label>
</#if>
- <#if leaveFeedback.role == "seller">
+ <#if "seller" == leaveFeedback.role>
<div id="rate${feedbackCounter}" style="display:none">
<input type="text" value="" maxlength="80" size="80" name="commentText${feedbackCounter}"
label="Tell us more"/>
@@ -862,7 +862,7 @@ under the License.
</#if>
</td>
<td>
- <#if leaveFeedback.role == "buyer">
+ <#if "buyer" == leaveFeedback.role>
Buyer:<a target="_blank"
href="http://myworld.sandbox.ebay.com/${leaveFeedback.userID}">${leaveFeedback.userID}</a>
<#else>
Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/EbayApiKeywordSearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/EbayApiKeywordSearch.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/EbayApiKeywordSearch.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/EbayApiKeywordSearch.ftl Sat Jul 8 13:30:04 2017
@@ -143,12 +143,12 @@ under the License.
<label>
${uiLabelMap.CommonAny}
<input type="radio" name="SEARCH_OPERATOR"
- value="OR" <#if searchOperator == "OR">checked="checked"</#if>/>
+ value="OR" <#if "OR" == searchOperator>checked="checked"</#if>/>
</label>
<label>
${uiLabelMap.CommonAll}
<input type="radio" name="SEARCH_OPERATOR"
- value="AND" <#if searchOperator == "AND">checked="checked"</#if>/>
+ value="AND" <#if "AND" == searchOperator>checked="checked"</#if>/>
</label>
</div>
</td>
Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/OrderImported.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/OrderImported.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/OrderImported.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/OrderImported.ftl Sat Jul 8 13:30:04 2017
@@ -51,10 +51,10 @@ function uploadTrackingCode(orderId, pro
<td width="10%" align="right">${uiLabelMap.OrderRemainingSubTotal}</td>
<td width="10%" align="right">${uiLabelMap.OrderOrderTotal}</td>
<td width="5%"> </td>
- <#if (requestParameters.filterInventoryProblems?default("N") == "Y") ||
- (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") ||
- (requestParameters.filterPOsWithRejectedItems?default("N") == "Y") ||
- (requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
+ <#if ("Y" == requestParameters.filterInventoryProblems?default("N")) ||
+ ("Y" == requestParameters.filterPOsOpenPastTheirETA?default("N")) ||
+ ("Y" == requestParameters.filterPOsWithRejectedItems?default("N")) ||
+ ("Y" == requestParameters.filterPartiallyReceivedPOs?default("N"))>
<td width="15%">${uiLabelMap.CommonStatus}</td>
<td width="5%">${uiLabelMap.CommonFilter}</td>
<#else>
@@ -68,7 +68,7 @@ function uploadTrackingCode(orderId, pro
<#assign orh = Static["org.apache.ofbiz.order.order.OrderReadHelper"].getHelper(orderHeader)>
<#assign statusItem = orderHeader.getRelatedOne("StatusItem", true)>
<#assign orderType = orderHeader.getRelatedOne("OrderType", true)>
- <#if orderType.orderTypeId == "PURCHASE_ORDER">
+ <#if "PURCHASE_ORDER" == orderType.orderTypeId>
<#assign displayParty = orh.getSupplierAgent()!>
<#else>
<#assign displayParty = orh.getPlacingParty()!>
@@ -104,10 +104,10 @@ function uploadTrackingCode(orderId, pro
<td> </td>
<td>${statusItem.get("description",locale)?default(statusItem.statusId?default("N/A"))}</td>
</td>
- <#if (requestParameters.filterInventoryProblems?default("N") == "Y") ||
- (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") ||
- (requestParameters.filterPOsWithRejectedItems?default("N") == "Y") ||
- (requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
+ <#if ("Y" == requestParameters.filterInventoryProblems?default("N")) ||
+ ("Y" == requestParameters.filterPOsOpenPastTheirETA?default("N")) ||
+ ("Y" == requestParameters.filterPOsWithRejectedItems?default("N")) ||
+ ("Y" == requestParameters.filterPartiallyReceivedPOs?default("N"))>
<td>
<#if filterInventoryProblems.contains(orderHeader.orderId)>
Inv
Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/ProductSearchExport.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/ProductSearchExport.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/ProductSearchExport.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/ProductSearchExport.ftl Sat Jul 8 13:30:04 2017
@@ -201,7 +201,7 @@ under the License.
<li>
<a href="<@o...@ofbizUrl>?productStoreId=${productStoreId!}">Clear Listing</a>
</li>
- <#if isExportValid?? && isExportValid == "true">
+ <#if isExportValid?? && "true" == isExportValid>
<li>
<a href="<@o...@ofbizUrl>?productStoreId=${productStoreId!}">
Export Products Listing</a>
@@ -488,7 +488,7 @@ under the License.
<td class="label">
<label><b>Enable auto-relist item</b>
<input type="checkbox" name="isAutoRelist"
- value="Y" <#if isAutoRelist == "Y">checked="checked"</#if>/>
+ value="Y" <#if "Y" == isAutoRelist>checked="checked"</#if>/>
</label>
</td>
</tr>
@@ -497,7 +497,7 @@ under the License.
<td class="label">
<label><b>Require eBay Inventory</b>
<input type="checkbox" name="requireEbayInventory"
- value="Y" <#if requireEbayInventory == "Y">checked="checked"</#if>/>
+ value="Y" <#if "Y" == requireEbayInventory>checked="checked"</#if>/>
</label>
</td>
<td></td>
@@ -528,7 +528,7 @@ under the License.
</div>
<!-- item specifices section -->
<#if primaryCate?has_content && primaryCate.getCategoryID()?? && listingTypes?has_content>
- <#if checkSpecific == "true">
+ <#if "true" == checkSpecific>
<div class="screenlet">
<div class="screenlet-title-bar">
<ul>
@@ -695,7 +695,7 @@ under the License.
<#assign tabName = "">
<#list listingTypes as listingType>
<#-- default with aution and fixed price -->
- <#if listingType.type.equals("Chinese") || listingType.type == "FixedPriceItem">
+ <#if listingType.type.equals("Chinese") || "FixedPriceItem" == listingType.type>
<#if listingType.type.equals("Chinese")><#assign tabName = "Auction"></#if>
<#if listingType.type.equals("FixedPriceItem")><#assign tabName = "Fixed Price"></#if>
<li <#if id==1 > style="margin-left: 1px" id="tabHeaderActive_"<#else>
@@ -712,7 +712,7 @@ under the License.
<div id="tabscontent">
<#assign id = 1>
<#list listingTypes as listingType>
- <#if listingType.type.equals("Chinese") || listingType.type! == "FixedPriceItem">
+ <#if listingType.type.equals("Chinese") || "FixedPriceItem" == listingType.type!>
<#if listingType.type.equals("Chinese")><#assign tabName = "Auction"></#if>
<#if listingType.type.equals("FixedPriceItem") ><#assign tabName = "Fixed Price"></#if>
<div id="tabContent${id}" class="tabContent" <#if id != 1>style="display:none;"</#if>>
@@ -728,7 +728,7 @@ under the License.
</label>
<#--<input type="checkbox" value="Y" name="enabledAuction_${id}"/>
<b>${tabName!}</b></checkbox-->
- <#elseif listingType.type == "FixedPriceItem">
+ <#elseif "FixedPriceItem" == listingType.type>
<label>
<input type="radio" name="listype" value="fixedprice"/>
<b>${tabName!}</b>
@@ -745,7 +745,7 @@ under the License.
<#list durations as duration>
<#if duration.indexOf("_")!= -1>
<#assign dura = duration.substring(duration.indexOf("_")+1)>
- <#elseif duration == "GTC">
+ <#elseif "GTC" == duration>
<#assign dura = "Good 'Til Cancelled">
</#if>
<option value="${duration!}">${dura!} ${uiLabelMap.CommonDays}</option>
@@ -771,9 +771,9 @@ under the License.
<#if productPrices?has_content>
<#list productPrices as productPrice>
<#assign currencyUomId = productPrice.currencyUomId!>
- <#if productPrice.productPriceTypeId == "MINIMUM_PRICE">
+ <#if "MINIMUM_PRICE" == productPrice.productPriceTypeId>
<#assign min = productPrice.price!>
- <#elseif productPrice.productPriceTypeId == "MAXIMUM_PRICE">
+ <#elseif "MAXIMUM_PRICE" == productPrice.productPriceTypeId>
<#assign max = productPrice.price!>
</#if>
</#list>
Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/StoreSetting.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/StoreSetting.ftl?rev=1801286&r1=1801285&r2=1801286&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/StoreSetting.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ebaystore/template/store/StoreSetting.ftl Sat Jul 8 13:30:04 2017
@@ -189,12 +189,12 @@ under the License.
<td valign="middle">
<div onclick="javascript:switchTheme();">
<label>
- <input type="radio" name="storeThemeType" <#if themeType! == "Basic">checked="checked"</#if>
+ <input type="radio" name="storeThemeType" <#if "Basic" == themeType!>checked="checked"</#if>
value="Basic" default="default"/>
Basic Theme
</label>
<label>
- <input type="radio" name="storeThemeType" <#if themeType! == "Advanced">checked="checked"</#if>
+ <input type="radio" name="storeThemeType" <#if "Advanced" == themeType!>checked="checked"</#if>
value="Advanced"/>
Advanced Theme
</label>
@@ -559,10 +559,10 @@ under the License.
</form>
</#if>
<script language="Javascript" type="text/javascript">
- <#if themeType! == "Basic">
+ <#if "Basic" == themeType!>
document.StoreSettingForm.storeAdvancedTheme.disabled = true;
document.StoreSettingForm.storeAdvancedThemeColor.disabled = true;
- <#elseif themeType! == "Advanced">
+ <#elseif "Advanced" == themeType!>
document.StoreSettingForm.storeBasicTheme.disabled = true;
document.StoreSettingForm.storePrimaryColor.disabled = true;
document.StoreSettingForm.storeSecondaryColor.disabled = true;