You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/09/25 18:27:13 UTC
svn commit: r1705329 [2/2] - in /ofbiz/trunk:
applications/accounting/webapp/accounting/reports/
applications/content/src/org/ofbiz/content/content/
applications/order/src/org/ofbiz/order/order/
applications/order/src/org/ofbiz/order/shoppingcart/ appl...
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy Fri Sep 25 16:27:12 2015
@@ -59,6 +59,6 @@ if ("RELATED_URL".equals(prodCatContentT
context.dataResourceTypeId = "VIDEO_OBJECT";
}
context.contentFormName = "EditCategoryContentDownload";
- context.contentFormTitle = "${uiLabelMap.ProductUpdateDownloadContentCategory}";
-
+ context.contentFormTitle = "${uiLabelMap.ProductUpdateDownloadContentCategory}";
+
}
Modified: ofbiz/trunk/applications/product/webapp/catalog/product/AddAdditionalImages.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/AddAdditionalImages.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/AddAdditionalImages.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/AddAdditionalImages.ftl Fri Sep 25 16:27:12 2015
@@ -17,10 +17,10 @@ specific language governing permissions
under the License.
-->
<#if product?has_content>
- <#assign productAdditionalImage1 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_1", locale, dispatcher))! />
- <#assign productAdditionalImage2 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_2", locale, dispatcher))! />
- <#assign productAdditionalImage3 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_3", locale, dispatcher))! />
- <#assign productAdditionalImage4 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_4", locale, dispatcher))! />
+ <#assign productAdditionalImage1 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_1", locale, dispatcher, "url"))! />
+ <#assign productAdditionalImage2 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_2", locale, dispatcher, "url"))! />
+ <#assign productAdditionalImage3 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_3", locale, dispatcher, "url"))! />
+ <#assign productAdditionalImage4 = (Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "ADDITIONAL_IMAGE_4", locale, dispatcher, "url"))! />
</#if>
<form id="addAdditionalImagesForm" method="post" action="<@o...@ofbizUrl>" enctype="multipart/form-data">
<input id="additionalImageProductId" type="hidden" name="productId" value="${productId!}" />
Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Fri Sep 25 16:27:12 2015
@@ -1235,7 +1235,7 @@ under the License.
<form name="ListCostComponents" type="list" title="" list-name="listIt"
odd-row-style="alternate-row" default-table-style="basic-table" paginate-target="EditProductCosts">
<actions>
- <set field="InParam.productId" from-field="requestParameters.productId"/>
+ <set field="InParam.productId" from-field="requestParameters.productId"/>
<service service-name="performFind" result-map="result" result-map-list="listIt">
<field-map field-name="inputFields" from-field="InParam"/>
<field-map field-name="entityName" value="CostComponent"/>
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java Fri Sep 25 16:27:12 2015
@@ -18,28 +18,33 @@
*******************************************************************************/
package org.ofbiz.workeffort.content;
-import java.util.*;
-import java.io.Writer;
import java.io.IOException;
import java.io.StringWriter;
+import java.io.Writer;
import java.sql.Timestamp;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
-import org.ofbiz.content.content.ContentWrapper;
-import org.ofbiz.content.content.ContentWorker;
-import org.ofbiz.entity.GenericValue;
-import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.util.EntityQuery;
-import org.ofbiz.entity.model.ModelUtil;
-import org.ofbiz.entity.model.ModelEntity;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.GeneralRuntimeException;
import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilCodec;
import org.ofbiz.base.util.UtilHttp;
-import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.base.util.GeneralRuntimeException;
-import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.cache.UtilCache;
+import org.ofbiz.content.content.ContentWorker;
+import org.ofbiz.content.content.ContentWrapper;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.model.ModelEntity;
+import org.ofbiz.entity.model.ModelUtil;
+import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.service.LocalDispatcher;
/**
@@ -71,8 +76,8 @@ public class WorkEffortContentWrapper im
}
// interface implementation(s)
- public String get(String workEffortContentId, boolean useCache) {
- return getWorkEffortContentAsText(workEffort, workEffortContentId, locale, mimeTypeId, workEffort.getDelegator(), dispatcher, useCache);
+ public String get(String workEffortContentId, boolean useCache, String encoderType) {
+ return getWorkEffortContentAsText(workEffort, workEffortContentId, locale, mimeTypeId, workEffort.getDelegator(), dispatcher, useCache, encoderType);
}
/**
@@ -80,8 +85,8 @@ public class WorkEffortContentWrapper im
* @param contentTypeId Type of content to return
* @return String containing the content data
*/
- public StringUtil.StringWrapper get(String contentTypeId) {
- return StringUtil.makeStringWrapper(get(contentTypeId, true));
+ public StringUtil.StringWrapper get(String contentTypeId, String encoderType) {
+ return StringUtil.makeStringWrapper(get(contentTypeId, true, encoderType));
}
/**
@@ -194,35 +199,36 @@ public class WorkEffortContentWrapper im
return null;
}
- public String getContent(String contentId, boolean useCache) {
- return getWorkEffortContentAsText(workEffort, contentId, null, locale, mimeTypeId, workEffort.getDelegator(), dispatcher, useCache);
+ public String getContent(String contentId, boolean useCache, String encoderType) {
+ return getWorkEffortContentAsText(workEffort, contentId, null, locale, mimeTypeId, workEffort.getDelegator(), dispatcher, useCache, encoderType);
}
- public String getContent(String contentId) {
- return getContent(contentId, true);
+ public String getContent(String contentId, String encoderType) {
+ return getContent(contentId, true, encoderType);
}
// static method helpers
- public static String getWorkEffortContentAsText(GenericValue workEffort, String workEffortContentTypeId, HttpServletRequest request) {
+ public static String getWorkEffortContentAsText(GenericValue workEffort, String workEffortContentTypeId, HttpServletRequest request, String encoderType) {
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
- return getWorkEffortContentAsText(workEffort, workEffortContentTypeId, UtilHttp.getLocale(request), "text/html", workEffort.getDelegator(), dispatcher, true);
+ return getWorkEffortContentAsText(workEffort, workEffortContentTypeId, UtilHttp.getLocale(request), "text/html", workEffort.getDelegator(), dispatcher, true, encoderType);
}
- public static String getWorkEffortContentAsText(GenericValue workEffort, String workEffortContentTypeId, Locale locale, LocalDispatcher dispatcher) {
- return getWorkEffortContentAsText(workEffort, workEffortContentTypeId, locale, null, null, dispatcher, true);
+ public static String getWorkEffortContentAsText(GenericValue workEffort, String workEffortContentTypeId, Locale locale, LocalDispatcher dispatcher, String encoderType) {
+ return getWorkEffortContentAsText(workEffort, workEffortContentTypeId, locale, null, null, dispatcher, true, encoderType);
}
public static String getWorkEffortContentAsText(GenericValue workEffort, String workEffortContentTypeId,
- Locale locale, String mimeTypeId, Delegator delegator, LocalDispatcher dispatcher, boolean useCache) {
- return getWorkEffortContentAsText(workEffort, null, workEffortContentTypeId, locale, mimeTypeId, delegator, dispatcher, useCache);
+ Locale locale, String mimeTypeId, Delegator delegator, LocalDispatcher dispatcher, boolean useCache, String encoderType) {
+ return getWorkEffortContentAsText(workEffort, null, workEffortContentTypeId, locale, mimeTypeId, delegator, dispatcher, useCache, encoderType);
}
public static String getWorkEffortContentAsText(GenericValue workEffort, String contentId, String workEffortContentTypeId,
- Locale locale, String mimeTypeId, Delegator delegator, LocalDispatcher dispatcher, boolean useCache) {
+ Locale locale, String mimeTypeId, Delegator delegator, LocalDispatcher dispatcher, boolean useCache, String encoderType) {
if (workEffort == null) {
return null;
}
+ UtilCodec.SimpleEncoder encoder = UtilCodec.getEncoder(encoderType);
String candidateFieldName = ModelUtil.dbNameToVarName(workEffortContentTypeId);
String cacheKey;
if (contentId != null) {
@@ -245,19 +251,19 @@ public class WorkEffortContentWrapper im
getWorkEffortContentAsText(contentId, null, workEffort, workEffortContentTypeId, locale, mimeTypeId, delegator, dispatcher, outWriter);
String outString = outWriter.toString();
if (outString.length() > 0) {
- return workEffortContentCache.putIfAbsentAndGet(cacheKey, outString);
+ return workEffortContentCache.putIfAbsentAndGet(cacheKey, encoder.encode(outString));
} else {
String candidateOut = workEffort.getModelEntity().isField(candidateFieldName) ? workEffort.getString(candidateFieldName): "";
- return candidateOut == null? "" : candidateOut;
+ return candidateOut == null? "" : encoder.encode(candidateOut);
}
} catch (GeneralException e) {
Debug.logError(e, "Error rendering WorkEffortContent, inserting empty String", module);
String candidateOut = workEffort.getModelEntity().isField(candidateFieldName) ? workEffort.getString(candidateFieldName): "";
- return candidateOut == null? "" : candidateOut;
+ return candidateOut == null? "" : encoder.encode(candidateOut);
} catch (IOException e) {
Debug.logError(e, "Error rendering WorkEffortContent, inserting empty String", module);
String candidateOut = workEffort.getModelEntity().isField(candidateFieldName) ? workEffort.getString(candidateFieldName): "";
- return candidateOut == null? "" : candidateOut;
+ return candidateOut == null? "" : encoder.encode(candidateOut);
}
}
Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Fri Sep 25 16:27:12 2015
@@ -46,10 +46,10 @@ import org.ofbiz.entity.condition.Entity
import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.entity.util.EntityUtilProperties;
+import org.ofbiz.product.product.ProductContentWrapper;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.ModelService;
import org.ofbiz.service.ServiceUtil;
-import org.ofbiz.product.product.ProductContentWrapper;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -265,7 +265,7 @@ public class ProductsExportToEbay {
}
ProductContentWrapper pcw = new ProductContentWrapper(dctx.getDispatcher(), prod, locale, "text/html");
- StringUtil.StringWrapper ebayDescription = pcw.get("EBAY_DESCRIPTION");
+ StringUtil.StringWrapper ebayDescription = pcw.get("EBAY_DESCRIPTION", "html");
if (UtilValidate.isNotEmpty(ebayDescription.toString())) {
UtilXml.addChildElementCDATAValue(itemElem, "Description", ebayDescription.toString(), itemDocument);
} else {
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=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl Fri Sep 25 16:27:12 2015
@@ -239,7 +239,7 @@ under the License.
<#assign smallImageUrl = "">
<#if contentList?has_content>
<#list contentList as content>
- <#if content.product.productId! == item.getSKU()!><#assign smallImageUrl = content.productContentWrapper.get("SMALL_IMAGE_URL")!></#if>
+ <#if content.product.productId! == item.getSKU()!><#assign smallImageUrl = content.productContentWrapper.get("SMALL_IMAGE_URL", "url")!></#if>
</#list>
</#if>
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"></#if>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/UpdateCart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/UpdateCart.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/UpdateCart.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/UpdateCart.ftl Fri Sep 25 16:27:12 2015
@@ -66,7 +66,7 @@ under the License.
<#else>
<#assign parentProductId = cartLine.getProductId() />
</#if>
- <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)! />
+ <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher, "url")! />
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "" /></#if>
</#if>
<tr id="cartItemDisplayRow_${cartLine_index}">
@@ -136,7 +136,7 @@ under the License.
<#else>
<#assign parentProductId = cartLine.getProductId() />
</#if>
- <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)! />
+ <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher, "url")! />
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "" /></#if>
<#if smallImageUrl?string?has_content>
<img src="<@o...@ofbizContentUrl>" alt="Product Image" />
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl Fri Sep 25 16:27:12 2015
@@ -237,7 +237,7 @@ function setAlternateGwp(field) {
<#else>
<#assign parentProductId = cartLine.getProductId() />
</#if>
- <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)! />
+ <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher, "url")! />
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg" /></#if>
<#if smallImageUrl?string?has_content>
<a href="<@ofbizCatalogAltUrl productId=parentProductId/>">
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/LayeredCategoryDetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/LayeredCategoryDetail.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/LayeredCategoryDetail.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/LayeredCategoryDetail.ftl Fri Sep 25 16:27:12 2015
@@ -53,7 +53,7 @@ under the License.
<h1>${categoryDescription}</h1>
</#if>
<#assign longDescription = categoryContentWrapper.get("LONG_DESCRIPTION")!/>
- <#assign categoryImageUrl = categoryContentWrapper.get("CATEGORY_IMAGE_URL")!/>
+ <#assign categoryImageUrl = categoryContentWrapper.get("CATEGORY_IMAGE_URL", "url")!/>
<#if categoryImageUrl?string?has_content || longDescription?has_content>
<div>
<#if categoryImageUrl?string?has_content>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl Fri Sep 25 16:27:12 2015
@@ -35,7 +35,7 @@ under the License.
<#assign linkProductCategory = delegator.findOne("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", productCategoryLink.linkInfo), true)/>
<#assign linkCategoryContentWrapper = Static["org.ofbiz.product.category.CategoryContentWrapper"].makeCategoryContentWrapper(linkProductCategory, request)/>
<#assign titleText = productCategoryLink.titleText?default(linkCategoryContentWrapper.get("CATEGORY_NAME"))!/>
- <#assign imageUrl = productCategoryLink.imageUrl?default(linkCategoryContentWrapper.get("CATEGORY_IMAGE_URL"))!/>
+ <#assign imageUrl = productCategoryLink.imageUrl?default(linkCategoryContentWrapper.get("CATEGORY_IMAGE_URL", "url"))!/>
<#assign detailText = productCategoryLink.detailText?default(linkCategoryContentWrapper.get("DESCRIPTION"))!/>
</#if>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl Fri Sep 25 16:27:12 2015
@@ -184,7 +184,7 @@ function getConfigDetails(event) {
<#-- Product image/name/price -->
<tr>
<td valign="top" width="0">
- <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")!>
+ <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL", "url")!>
<#-- remove the next two lines to always display the virtual image first (virtual images must exist) -->
<#if firstLargeImage?has_content>
<#assign productLargeImageUrl = firstLargeImage>
@@ -194,8 +194,8 @@ function getConfigDetails(event) {
</#if>
</td>
<td align="right" valign="top">
- <h2>${productContentWrapper.get("PRODUCT_NAME")!}</h2>
- <div>${productContentWrapper.get("DESCRIPTION")!}</div>
+ <h2>${productContentWrapper.get("PRODUCT_NAME", "html")!}</h2>
+ <div>${productContentWrapper.get("DESCRIPTION", "html")!}</div>
<div><b>${product.productId!}</b></div>
<#-- example of showing a certain type of feature with the product -->
<#if sizeProductFeatureAndAppls?has_content>
@@ -394,9 +394,9 @@ function getConfigDetails(event) {
<#list imageKeys as key>
<#assign swatchProduct = imageMap.get(key)>
<#if swatchProduct?has_content && indexer < maxIndex>
- <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)!>
+ <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request, "url")!>
<#if !imageUrl?string?has_content>
- <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL")!>
+ <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL", "url")!>
</#if>
<#if !imageUrl?string?has_content>
<#assign imageUrl = "/images/defaultImage.jpg">
@@ -423,7 +423,7 @@ function getConfigDetails(event) {
<#-- Long description of product -->
<tr>
<td colspan="2">
- <div>${productContentWrapper.get("LONG_DESCRIPTION")!}</div>
+ <div>${productContentWrapper.get("LONG_DESCRIPTION", "html")!}</div>
</td>
</tr>
@@ -461,7 +461,7 @@ function getConfigDetails(event) {
<#if instructions?has_content>
<a href="javascript:showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${instructions}");" class="buttontext">Instructions</a>
</#if>
- <#assign image = question.content.get("IMAGE_URL")!>
+ <#assign image = question.content.get("IMAGE_URL", "url")!>
<#if image?string?has_content>
<img src='<@o...@ofbizContentUrl>' vspace='5' hspace='5' class='cssImgXLarge' align='left' alt="" />
</#if>
@@ -668,7 +668,7 @@ function getConfigDetails(event) {
</#if>
<#if assocProducts?has_content>
<tr><td> </td></tr>
- <tr><td colspan="2"><h2>${beforeName!}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME")!}</#if>${afterName!}</h2></td></tr>
+ <tr><td colspan="2"><h2>${beforeName!}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME", "html")!}</#if>${afterName!}</h2></td></tr>
<#list assocProducts as productAssoc>
<tr><td>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/miniproductsummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/miniproductsummary.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/miniproductsummary.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/miniproductsummary.ftl Fri Sep 25 16:27:12 2015
@@ -17,7 +17,7 @@ specific language governing permissions
under the License.
-->
<#if miniProduct??>
- <a href="<@ofbizCatalogAltUrl productId=miniProduct.productId/>" class="linktext">${miniProductContentWrapper.get("PRODUCT_NAME")?default("No Name Available")}</a>
+ <a href="<@ofbizCatalogAltUrl productId=miniProduct.productId/>" class="linktext">${miniproductContentWrapper.get("PRODUCT_NAME", "html")?default("No Name Available")}</a>
<ul>
<li>${miniProduct.productId}
<#if (priceResult.price?default(0) > 0 && miniProduct.requireAmount?default("N") == "N")>
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=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl Fri Sep 25 16:27:12 2015
@@ -335,10 +335,10 @@ $(function(){
</#macro>
<div id="productdetail">
- <#assign productAdditionalImage1 = productContentWrapper.get("ADDITIONAL_IMAGE_1")! />
- <#assign productAdditionalImage2 = productContentWrapper.get("ADDITIONAL_IMAGE_2")! />
- <#assign productAdditionalImage3 = productContentWrapper.get("ADDITIONAL_IMAGE_3")! />
- <#assign productAdditionalImage4 = productContentWrapper.get("ADDITIONAL_IMAGE_4")! />
+ <#assign productAdditionalImage1 = productContentWrapper.get("ADDITIONAL_IMAGE_1", "url")! />
+ <#assign productAdditionalImage2 = productContentWrapper.get("ADDITIONAL_IMAGE_2", "url")! />
+ <#assign productAdditionalImage3 = productContentWrapper.get("ADDITIONAL_IMAGE_3", "url")! />
+ <#assign productAdditionalImage4 = productContentWrapper.get("ADDITIONAL_IMAGE_4", "url")! />
<#-- Category next/previous -->
<#if category??>
@@ -358,7 +358,7 @@ $(function(){
<#if productImageList?has_content>
<#-- Product image/name/price -->
<div id="detailImageBox">
- <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")! />
+ <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL", "url")! />
<#-- remove the next two lines to always display the virtual image first (virtual images must exist) -->
<#if firstLargeImage?has_content>
<#assign productLargeImageUrl = firstLargeImage />
@@ -384,7 +384,7 @@ $(function(){
<#else>
<#-- Product image/name/price -->
<div id="detailImageBox">
- <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")! />
+ <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL", "url")! />
<#-- remove the next two lines to always display the virtual image first (virtual images must exist) -->
<#if firstLargeImage?has_content>
<#assign productLargeImageUrl = firstLargeImage />
@@ -422,8 +422,8 @@ $(function(){
</#if>
<div id="productDetailBox">
- <h2>${productContentWrapper.get("PRODUCT_NAME")!}</h2>
- <div>${productContentWrapper.get("DESCRIPTION")!}</div>
+ <h2>${productContentWrapper.get("PRODUCT_NAME", "html")!}</h2>
+ <div>${productContentWrapper.get("DESCRIPTION", "html")!}</div>
<div>${product.productId!}</div>
<#-- example of showing a certain type of feature with the product -->
<#if sizeProductFeatureAndAppls?has_content>
@@ -681,7 +681,7 @@ $(function(){
</#if>
</#list>
<#elseif minimumQuantity?? && minimumQuantity?has_content && minimumQuantity > 0>
- <div>minimum order quantity for ${productContentWrapper.get("PRODUCT_NAME")!} is ${minimumQuantity!}</div>
+ <div>minimum order quantity for ${productContentWrapper.get("PRODUCT_NAME", "html")!} is ${minimumQuantity!}</div>
</#if>
</fieldset>
</form>
@@ -738,9 +738,9 @@ $(function(){
<#list imageKeys as key>
<#assign swatchProduct = imageMap.get(key) />
<#if swatchProduct?has_content && indexer < maxIndex>
- <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)! />
+ <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request, "url")! />
<#if !imageUrl?string?has_content>
- <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL")! />
+ <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL", "url")! />
</#if>
<#if !imageUrl?string?has_content>
<#assign imageUrl = "/images/defaultImage.jpg" />
@@ -768,8 +768,8 @@ $(function(){
<#-- Long description of product -->
<div id="long-description">
- <div>${productContentWrapper.get("LONG_DESCRIPTION")!}</div>
- <div>${productContentWrapper.get("WARNINGS")!}</div>
+ <div>${productContentWrapper.get("LONG_DESCRIPTION", "html")!}</div>
+ <div>${productContentWrapper.get("WARNINGS", "html")!}</div>
</div>
<#-- Any attributes/etc may go here -->
@@ -810,7 +810,7 @@ $(function(){
<#assign targetRequest = targetRequestName />
</#if>
<#if assocProducts?has_content>
- <h2>${beforeName!}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME")!}</#if>${afterName!}</h2>
+ <h2>${beforeName!}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME", "html")!}</#if>${afterName!}</h2>
<div class="productsummary-container">
<#list assocProducts as productAssoc>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl Fri Sep 25 16:27:12 2015
@@ -44,7 +44,7 @@ under the License.
<#assign product = Static['org.ofbiz.product.product.ProductWorker'].getParentProduct(product.productId, delegator)!>
</#if>
<#if product?has_content>
- <#assign productName = Static['org.ofbiz.product.product.ProductContentWrapper'].getProductContentAsText(product, 'PRODUCT_NAME', request)!>
+ <#assign productName = Static['org.ofbiz.product.product.ProductContentWrapper'].getProductContentAsText(product, 'PRODUCT_NAME', request, "html")!>
<a href="<@o...@ofbizUrl>" class="linktext">${productName?default(product.productId)}</a>
</#if>
</#if>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl Fri Sep 25 16:27:12 2015
@@ -46,7 +46,7 @@ under the License.
<td>
<#assign product = subscription.getRelatedOne('Product', false)!>
<#if product?has_content>
- <#assign productName = Static['org.ofbiz.product.product.ProductContentWrapper'].getProductContentAsText(product, 'PRODUCT_NAME', request)!>
+ <#assign productName = Static['org.ofbiz.product.product.ProductContentWrapper'].getProductContentAsText(product, 'PRODUCT_NAME', request, "html")!>
<a href="<@o...@ofbizUrl>" class="linktext">${productName?default(product.productId)}</a>
</#if>
</td>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl Fri Sep 25 16:27:12 2015
@@ -176,7 +176,7 @@ function submitForm(form, mode, value) {
<#if cartLine.getProductId()??>
<#-- product item -->
<#-- start code to display a small image of the product -->
- <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)!>
+ <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher, "url")!>
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"></#if>
<#if smallImageUrl?string?has_content>
<a href="<@o...@ofbizUrl>">
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl Fri Sep 25 16:27:12 2015
@@ -447,7 +447,7 @@ under the License.
<td>
<div>
<a href="<@o...@ofbizUrl>" class="buttontext">${shoppingListItem.productId} -
- ${productContentWrapper.get("PRODUCT_NAME")?default("No Name")}</a> : ${productContentWrapper.get("DESCRIPTION")!}
+ ${productContentWrapper.get("PRODUCT_NAME", "html")?default("No Name")}</a> : ${productContentWrapper.get("DESCRIPTION", "html")!}
</div>
</td>
<td nowrap="nowrap" align="center">
@@ -514,7 +514,7 @@ under the License.
<#assign variantProduct = productVariantAssoc.getRelatedOne("AssocProduct", true)>
<#if variantProduct??>
<#assign variantProductContentWrapper = Static["org.ofbiz.product.product.ProductContentWrapper"].makeProductContentWrapper(variantProduct, request)>
- <option value="${variantProduct.productId}">${variantProductContentWrapper.get("PRODUCT_NAME")?default("No Name")} [${variantProduct.productId}]</option>
+ <option value="${variantProduct.productId}">${variantproductContentWrapper.get("PRODUCT_NAME", "html")?default("No Name")} [${variantProduct.productId}]</option>
</#if>
</#list>
</select>
Modified: ofbiz/trunk/specialpurpose/solr/src/org/ofbiz/solr/ProductUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/solr/src/org/ofbiz/solr/ProductUtil.java?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/solr/src/org/ofbiz/solr/ProductUtil.java (original)
+++ ofbiz/trunk/specialpurpose/solr/src/org/ofbiz/solr/ProductUtil.java Fri Sep 25 16:27:12 2015
@@ -155,17 +155,17 @@ public abstract class ProductUtil {
dispatchContext.put("isPhysical", isPhysical);
FastMap<String, String> title = new FastMap<String, String>();
- String detitle = productContentDe.get("PRODUCT_NAME").toString();
+ String detitle = productContentDe.get("PRODUCT_NAME", "html").toString();
if (detitle != null)
title.put("de", detitle);
else if (product.get("productName") != null)
title.put("de", (String) product.get("productName"));
- String entitle = productContentEn.get("PRODUCT_NAME").toString();
+ String entitle = productContentEn.get("PRODUCT_NAME", "html").toString();
if (entitle != null)
title.put("en", entitle);
else if (product.get("productName") != null)
title.put("en", (String) product.get("productName"));
- String frtitle = productContentFr.get("PRODUCT_NAME").toString();
+ String frtitle = productContentFr.get("PRODUCT_NAME", "html").toString();
if (frtitle != null)
title.put("fr", frtitle);
else if (product.get("productName") != null)
@@ -173,25 +173,25 @@ public abstract class ProductUtil {
dispatchContext.put("title", title);
Map<String, String> description = new FastMap<String, String>();
- String dedescription = productContentDe.get("DESCRIPTION").toString();
+ String dedescription = productContentDe.get("DESCRIPTION", "html").toString();
if (dedescription != null)
description.put("de", dedescription);
- String endescription = productContentEn.get("DESCRIPTION").toString();
+ String endescription = productContentEn.get("DESCRIPTION", "html").toString();
if (endescription != null)
description.put("en", endescription);
- String frdescription = productContentFr.get("DESCRIPTION").toString();
+ String frdescription = productContentFr.get("DESCRIPTION", "html").toString();
if (frdescription != null)
description.put("fr", frdescription);
dispatchContext.put("description", description);
FastMap<String, String> longDescription = new FastMap<String, String>();
- String delongDescription = productContentDe.get("LONG_DESCRIPTION").toString();
+ String delongDescription = productContentDe.get("LONG_DESCRIPTION", "html").toString();
if (delongDescription != null)
longDescription.put("de", delongDescription);
- String enlongDescription = productContentEn.get("LONG_DESCRIPTION").toString();
+ String enlongDescription = productContentEn.get("LONG_DESCRIPTION", "html").toString();
if (enlongDescription != null)
longDescription.put("en", enlongDescription);
- String frlongDescription = productContentFr.get("LONG_DESCRIPTION").toString();
+ String frlongDescription = productContentFr.get("LONG_DESCRIPTION", "html").toString();
if (frlongDescription != null)
longDescription.put("fr", frlongDescription);
dispatchContext.put("longDescription", longDescription);
@@ -229,4 +229,4 @@ public abstract class ProductUtil {
}
return dispatchContext;
}
-}
\ No newline at end of file
+}
Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl Fri Sep 25 16:27:12 2015
@@ -104,7 +104,7 @@ under the License.
<#else>
<#assign parentProductId = cartLine.getProductId()/>
</#if>
- <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)!>
+ <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher, "url")!>
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"></#if>
<#if smallImageUrl?string?has_content>
<img src="<@o...@ofbizContentUrl>" align="left" class="cssImgSmall" />
Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCartItemSelected.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCartItemSelected.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCartItemSelected.ftl (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCartItemSelected.ftl Fri Sep 25 16:27:12 2015
@@ -25,7 +25,7 @@ under the License.
<#assign cartLine = shoppingCart.findCartItem(idx)!>
<#if cartLine?? && cartLine?has_content>
<#if cartLine.getProductId()??>
- <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)!>
+ <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher, "url")!>
<#if !smallImageUrl?string?has_content>
<#assign smallImageUrl = "/images/defaultImage.jpg">
</#if>
@@ -72,4 +72,4 @@ under the License.
</script>
</#if>
</#if>
-</#if>
\ No newline at end of file
+</#if>
Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/catalog/CategoryDetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/catalog/CategoryDetail.ftl?rev=1705329&r1=1705328&r2=1705329&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/catalog/CategoryDetail.ftl (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/catalog/CategoryDetail.ftl Fri Sep 25 16:27:12 2015
@@ -24,13 +24,13 @@ under the License.
<#list productCategoryMembers as productCategoryMember>
<#assign product = productCategoryMember.getRelatedOne("Product", false)!>
<#if product?? && product?has_content>
- <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "SMALL_IMAGE_URL", locale, dispatcher)! />
+ <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "SMALL_IMAGE_URL", locale, dispatcher, "url")! />
<#if !smallImageUrl?string?has_content>
<#assign smallImageUrl = "/images/defaultImage.jpg">
</#if>
- <#assign productName = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "PRODUCT_NAME", locale, dispatcher)! />
+ <#assign productName = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "PRODUCT_NAME", locale, dispatcher, "html")! />
<#if !productName?string?has_content>
- <#assign productName = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "DESCRIPTION", locale, dispatcher)! />
+ <#assign productName = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(product, "DESCRIPTION", locale, dispatcher, "html")! />
</#if>
<#assign addItemLink = "javascript:addItem('" + product.productId + "', '1', 'Y');">
<td>