Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bef6dd715 | ||
|
|
1c355bb6d8 | ||
|
|
581c68f3c6 | ||
|
|
96e2deea3b | ||
|
|
aff4aa19ff | ||
|
|
819be88570 | ||
|
|
feef385e7e | ||
|
|
128c252942 | ||
|
|
eadffa215b | ||
|
|
39494e6a57 | ||
|
|
b52a5e85e2 | ||
|
|
1ada36d74d | ||
|
|
c903c71aa8 | ||
|
|
e6e7351309 | ||
|
|
2386d02960 | ||
|
|
486f1d8a59 | ||
|
|
d335f7890f | ||
|
|
1a8410f98b | ||
|
|
6d87d52388 | ||
|
|
76775e4a7c | ||
|
|
369088d732 |
@@ -0,0 +1,11 @@
|
||||
Improved:
|
||||
Implemented:
|
||||
Documented:
|
||||
Completed:
|
||||
Reverted:
|
||||
Fixed:
|
||||
(OFBIZ-)
|
||||
|
||||
Explanation
|
||||
|
||||
Thanks:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 196 KiB |
@@ -263,7 +263,8 @@ public final class BirtWorker {
|
||||
String reportForm = (String) resultElectronicText.get("textData");
|
||||
if (!reportForm.startsWith("<?xml")) {
|
||||
StringBuffer xmlHeaderForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
|
||||
xmlHeaderForm.append("<forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");
|
||||
xmlHeaderForm.append("<forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:targetNamespace=\"http://ofbiz"
|
||||
+ ".apache.org/dtds/widget-form.xsd\">");
|
||||
xmlHeaderForm.append(reportForm);
|
||||
xmlHeaderForm.append("</forms>");
|
||||
reportForm = xmlHeaderForm.toString();
|
||||
|
||||
@@ -311,7 +311,9 @@ public class BirtServices {
|
||||
try {
|
||||
GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", reportContentId).queryOne();
|
||||
String dataResourceId = content.getString("dataResourceId");
|
||||
StringBuffer newForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");
|
||||
StringBuffer newForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <forms xmlns:xsi=\"http://www.w3"
|
||||
+ ".org/2001/XMLSchema-instance\" xsi:targetNamespace=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");
|
||||
|
||||
newForm.append(overrideFilters);
|
||||
newForm.append("</forms>");
|
||||
Document xmlForm = UtilXml.readXmlDocument(newForm.toString());
|
||||
@@ -725,7 +727,7 @@ public class BirtServices {
|
||||
// user file is deleted straight away to prevent the use of the report as script entry (security)
|
||||
Path path = Paths.get(nameTempRpt);
|
||||
Files.deleteIfExists(path);
|
||||
} catch (Exception e) {
|
||||
} catch (DesignFileException | IOException e) {
|
||||
Debug.logError(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorInuploadRptDesignNoFile", locale));
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.apache.ofbiz.webapp.stats.VisitHandler;
|
||||
// Used to filter website on the basis of hosted pathAlias.
|
||||
public class WebSiteFilter implements Filter {
|
||||
|
||||
public static final String MODULE = WebSiteFilter.class.getName();
|
||||
public static final String module = WebSiteFilter.class.getName();
|
||||
|
||||
protected FilterConfig m_config = null;
|
||||
|
||||
@@ -87,7 +87,7 @@ public class WebSiteFilter implements Filter {
|
||||
webSite = EntityQuery.use(delegator).from("WebSite").where("isDefault", "Y").cache().queryFirst();
|
||||
}
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logError(e, MODULE);
|
||||
Debug.logError(e, module);
|
||||
}
|
||||
if (webSite != null) {
|
||||
webSiteId = webSite.getString("webSiteId");
|
||||
@@ -95,7 +95,7 @@ public class WebSiteFilter implements Filter {
|
||||
try {
|
||||
productStore = webSite.getRelatedOne("ProductStore", false);
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logError(e, MODULE);
|
||||
Debug.logError(e, module);
|
||||
}
|
||||
|
||||
String newLocale = request.getParameter("newLocale");
|
||||
@@ -122,7 +122,7 @@ public class WebSiteFilter implements Filter {
|
||||
try {
|
||||
cart.setCurrency(dispatcher, productStore.getString("defaultCurrencyUomId"));
|
||||
} catch (CartItemModifyException e) {
|
||||
Debug.logError(e, MODULE);
|
||||
Debug.logError(e, module);
|
||||
}
|
||||
}
|
||||
session.removeAttribute("webSiteId");
|
||||
@@ -151,7 +151,7 @@ public class WebSiteFilter implements Filter {
|
||||
try {
|
||||
security = SecurityFactory.getInstance(delegator);
|
||||
} catch (SecurityConfigurationException e) {
|
||||
Debug.logError(e, MODULE);
|
||||
Debug.logError(e, module);
|
||||
}
|
||||
request.setAttribute("delegator", delegator);
|
||||
request.setAttribute("dispatcher", dispatcher);
|
||||
|
||||
@@ -40,6 +40,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.TableModel;
|
||||
|
||||
@@ -2258,12 +2259,20 @@ public class EbayStore {
|
||||
|
||||
// Upload image to ofbiz path /runtime/tmp .
|
||||
ByteBuffer byteWrap = (ByteBuffer) context.get("imageData");
|
||||
File file = new File(System.getProperty("ofbiz.home"), "runtime" + File.separator + "tmp" + File.separator + imageFileName);
|
||||
String fileToCheck = System.getProperty("ofbiz.home"), "runtime" + File.separator + "tmp" + File.separator + imageFileName;
|
||||
File file = new File(fileToCheck);
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(file, false);
|
||||
FileChannel wChannel = fileOutputStream.getChannel();
|
||||
wChannel.write(byteWrap);
|
||||
wChannel.close();
|
||||
fileOutputStream.close();
|
||||
String fileToCheck = imageServerPath + "/" + newFileLocation + "." + imgExtension;
|
||||
ImageIO.write(bufNewImg, imgExtension, new File(fileToCheck));
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(fileToCheck, "Image")) {
|
||||
String errorMessage = UtilProperties.getMessage("SecurityUiLabels", "SupportedImageFormats", locale);
|
||||
return ServiceUtil.returnError(errorMessage);
|
||||
}
|
||||
|
||||
|
||||
// Set path file picture to api and set picture details.
|
||||
String [] pictureFiles = {System.getProperty("ofbiz.home") + File.separator + "runtime" + File.separator + "tmp" + File.separator + imageFileName};
|
||||
|
||||
@@ -86,7 +86,7 @@ if (featureIdByType) {
|
||||
|
||||
if (searcher) {
|
||||
Debug.logInfo("in search searchFeature3, combQuery:" + combQuery.toString(), "")
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(100) //defaulting to 100 results
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) //defaulting to 100 results
|
||||
searcher.search(combQuery.build(), collector)
|
||||
ScoreDoc[] hits = collector.topDocs().scoreDocs
|
||||
Debug.logInfo("in search, hits:" + collector.getTotalHits(), "")
|
||||
|
||||
@@ -18,7 +18,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<#if productIds?has_content>
|
||||
<div class="card">
|
||||
<div class="card promotion-products">
|
||||
<div class="card-header">
|
||||
${uiLabelMap.OrderProductsForPromotion}
|
||||
</div>
|
||||
|
||||
@@ -336,6 +336,8 @@ $(function(){
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
${screens.render("component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productvariantjs")}
|
||||
${variantInfoJavaScript!}
|
||||
<div id="product-detail" class="card">
|
||||
<#assign productAdditionalImage1 = productContentWrapper.get("ADDITIONAL_IMAGE_1", "url")! />
|
||||
<#assign productAdditionalImage2 = productContentWrapper.get("ADDITIONAL_IMAGE_2", "url")! />
|
||||
@@ -705,7 +707,7 @@ $(function(){
|
||||
<div id="addCart2" style="display:block;">
|
||||
<span style="white-space: nowrap;"><strong>${uiLabelMap.CommonQuantity}:</strong></span>
|
||||
<input type="text" class="form-control" size="5" value="1" disabled="disabled"/>
|
||||
<a href="javascript:showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonPleaseSelectAllFeaturesFirst}");"
|
||||
<a href="javascript:showErrorAlert('${uiLabelMap.CommonErrorMessage2}','${uiLabelMap.CommonPleaseSelectAllFeaturesFirst}');"
|
||||
class="btn btn-outline-secondary"><span style="white-space: nowrap;">${uiLabelMap.OrderAddToCart}</span></a>
|
||||
|
||||
</div>
|
||||
@@ -719,15 +721,13 @@ $(function(){
|
||||
</select>
|
||||
</div>
|
||||
</#list>
|
||||
<span id="product_uom"></span>
|
||||
<span id="product_uom"></span><br/>
|
||||
<div class="variant-price" style="display: none;">
|
||||
<strong><span class="product_id_display"> </span></strong>
|
||||
<strong><span class="variant_price_display"> </span></strong>
|
||||
</div>
|
||||
<input type="hidden" name="product_id" value="${product.productId}"/>
|
||||
<input type="hidden" name="add_product_id" value="NULL"/>
|
||||
<div>
|
||||
<strong><span id="product_id_display"> </span></strong>
|
||||
<strong>
|
||||
<div id="variant_price_display"></div>
|
||||
</strong>
|
||||
</div>
|
||||
<#else>
|
||||
<input type="hidden" name="add_product_id" value="NULL"/>
|
||||
<#assign inStock = false />
|
||||
@@ -737,17 +737,15 @@ $(function(){
|
||||
<input type="hidden" name="add_product_id" value="${product.productId}"/>
|
||||
<#if mainProducts?has_content>
|
||||
<input type="hidden" name="product_id" value=""/>
|
||||
<select name="productVariantId" class="form-control" onchange="javascript:displayProductVirtualVariantId(this.value);">
|
||||
<option value="">Select Unit Of Measure</option>
|
||||
<select name="productVariantId" class="form-control" onchange="javascript:variantUomSelection(this);">
|
||||
<option value="">${uiLabelMap.CommonSelect} ${uiLabelMap.ProductUnitOfMeasure}</option>
|
||||
<#list mainProducts as mainProduct>
|
||||
<option value="${mainProduct.productId}">${mainProduct.uomDesc} : ${mainProduct.piecesIncluded}</option>
|
||||
</#list>
|
||||
</select><br/>
|
||||
<div>
|
||||
<strong><span id="product_id_display"> </span></strong>
|
||||
<strong>
|
||||
<div id="variant_price_display"></div>
|
||||
</strong>
|
||||
<div class="variant-price" style="display: none;">
|
||||
<strong><span class="product_id_display"> </span></strong>
|
||||
<strong><span class="variant_price_display"> </span></strong>
|
||||
</div>
|
||||
</#if>
|
||||
<#if (availableInventory??) && (availableInventory <= 0) && "N" == product.requireAmount?default("N")>
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
${screens.render("component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productvariantjs")}
|
||||
${variantInfoJavaScript!}
|
||||
<#if product??>
|
||||
<#-- variable setup -->
|
||||
<#if "Y" == backendPath?default("N")>
|
||||
@@ -72,16 +74,15 @@
|
||||
<#assign productDetailId = "productDetailId"/>
|
||||
<#assign productDetailId = productDetailId + product.productId/>
|
||||
|
||||
<div class="col-md-3 products-card">
|
||||
<div class="col-md-4 products-card card-deck">
|
||||
<div class="card text-center">
|
||||
<a href="${productUrl}">
|
||||
<img class="card-img-top" src="<@ofbizContentUrl>${contentPathPrefix!}${smallImageUrl}</@ofbizContentUrl>" alt="Small Image">
|
||||
</a>
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><a href="${productUrl}" class="btn btn-link">${productContentWrapper.get("PRODUCT_NAME", "html")!}</a></h4>
|
||||
<div class="cart-text">
|
||||
<div class="card-text">
|
||||
<div>${productContentWrapper.get("DESCRIPTION", "html")!}<#if daysToShip??> - ${uiLabelMap.ProductUsuallyShipsIn} <b>${daysToShip}</b> ${uiLabelMap.CommonDays}!</#if></div>
|
||||
|
||||
<#-- Display category-specific product comments -->
|
||||
<#if prodCatMem?? && prodCatMem.comments?has_content>
|
||||
<p>${prodCatMem.comments}</p>
|
||||
@@ -196,15 +197,15 @@
|
||||
</div>
|
||||
<#if mainProducts?has_content>
|
||||
<input type="hidden" name="product_id" value=""/>
|
||||
<select name="productVariantId" onchange="javascript:displayProductVirtualId(this.value, '${product.productId}', this.form);">
|
||||
<option value="">Select Unit Of Measure</option>
|
||||
<select name="productVariantId" onchange="javascript:variantUomSelection(this);" style="width: 100%;">
|
||||
<option value="">${uiLabelMap.CommonSelect} ${uiLabelMap.ProductUnitOfMeasure}</option>
|
||||
<#list mainProducts as mainProduct>
|
||||
<option value="${mainProduct.productId}">${mainProduct.uomDesc} : ${mainProduct.piecesIncluded}</option>
|
||||
</#list>
|
||||
</select>
|
||||
<div style="display: inline-block;">
|
||||
<strong><span id="product_id_display"> </span></strong>
|
||||
<strong><span id="variant_price_display"> </span></strong>
|
||||
<div class="variant-price" style="display: none;">
|
||||
<strong><span class="product_id_display"> </span></strong>
|
||||
<strong><span class="variant_price_display"> </span></strong>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,6 @@ under the License.
|
||||
<#if !creditCard??>
|
||||
<h2>${uiLabelMap.AccountingAddNewCreditCard}</h2>
|
||||
<form method="post" action="<@ofbizUrl>createCreditCard?DONE_PAGE=${donePage}</@ofbizUrl>" name="editcreditcardform">
|
||||
<div>
|
||||
<#else>
|
||||
<h2>${uiLabelMap.AccountingEditCreditCard}</h2>
|
||||
<form method="post" action="<@ofbizUrl>updateCreditCard?DONE_PAGE=${donePage}</@ofbizUrl>" name="editcreditcardform">
|
||||
@@ -32,6 +31,7 @@ under the License.
|
||||
</#if>
|
||||
<a href="<@ofbizUrl>${donePage}</@ofbizUrl>" class="btn btn-outline-secondary">${uiLabelMap.CommonGoBack}</a>
|
||||
<a href="javascript:document.editcreditcardform.submit()" class="btn btn-outline-secondary">${uiLabelMap.CommonSave}</a>
|
||||
<div>
|
||||
${screens.render("component://ecommerce/widget/CustomerScreens.xml#creditCardFields")}
|
||||
<label class="mb-2">${uiLabelMap.PartyBillingAddress}</label>
|
||||
<#-- Removed because is confusing, can add but would have to come back here with all data populated as before...
|
||||
|
||||
@@ -464,10 +464,20 @@ under the License.
|
||||
<input type="hidden" name="statusId" value="CTNT_PUBLISHED"/>
|
||||
<input type="hidden" name="roleTypeId" value="OWNER"/>
|
||||
<label class="mr-2">${uiLabelMap.EcommerceUploadNewFile}</label>
|
||||
<label class="custom-file mr-2">
|
||||
<input type="file" name="uploadedFile" class="custom-file-input"/>
|
||||
<span class="custom-file-control"></span>
|
||||
</label>
|
||||
<div class="custom-file mr-2">
|
||||
<input type="file" class="custom-file-input" id="customFile" required/>
|
||||
<label class="custom-file-label" for="customFile">Choose file</label>
|
||||
<div class="invalid-feedback">Example invalid custom file feedback</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#customFile').on('change',function(){
|
||||
//get the file name
|
||||
var fileName = $(this).val();
|
||||
fileName = fileName.replace('C:\\fakepath\\', " ");
|
||||
//replace the "Choose a file" label
|
||||
$(this).next('.custom-file-label').html(fileName);
|
||||
})
|
||||
</script>
|
||||
<select name="partyContentTypeId" class="custom-select mr-2">
|
||||
<option value="">${uiLabelMap.PartySelectPurpose}</option>
|
||||
<#list partyContentTypes as partyContentType>
|
||||
|
||||
@@ -25,6 +25,12 @@ under the License.
|
||||
<hr/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
|
||||
<tr>
|
||||
<td width="26%" align="right" valign="top">
|
||||
<div class="tableheadtext">${uiLabelMap.AccountingCreditCardInformation}</div>
|
||||
</td>
|
||||
<td width="5"> </td>
|
||||
<td width="74%"> </td>
|
||||
</tr>
|
||||
${screens.render("component://ecommerce/widget/CustomerScreens.xml#creditCardFields")}
|
||||
|
||||
|
||||
@@ -21,6 +21,14 @@ under the License.
|
||||
<#-- the "urlPrefix" value will be prepended to URLs by the ofbizUrl transform if/when there is no "request" object in the context -->
|
||||
<#if baseEcommerceSecureUrl??><#assign urlPrefix = baseEcommerceSecureUrl/></#if>
|
||||
<div class="card">
|
||||
<#if "Y" == maySelectItems?default("N") && "PLACING_CUSTOMER" == roleTypeId!>
|
||||
<form method="post" id="sendMeThisEveryMonthForm" name="sendMeThisEveryMonthForm" action="<@ofbizUrl fullPath='true'>createShoppingListFromOrder</@ofbizUrl>">
|
||||
<input type="hidden" name="orderId" value="${orderHeader.orderId}"/>
|
||||
<input type="hidden" name="frequency" value="6"/>
|
||||
<input type="hidden" name="intervalNumber" value="1"/>
|
||||
<input type="hidden" name="shoppingListTypeId" value="SLT_AUTO_REODR"/>
|
||||
</form>
|
||||
</#if>
|
||||
<#if "Y" == maySelectItems?default("N")>
|
||||
<form name="addCommonToCartForm" action="<@ofbizUrl>addordertocart/orderstatus</@ofbizUrl>" method="post">
|
||||
<input type="hidden" name="add_all" value="false" />
|
||||
@@ -36,8 +44,7 @@ under the License.
|
||||
class="btn btn-sm float-right">${uiLabelMap.OrderAddAllToCart}</a>
|
||||
<a href="javascript:document.addCommonToCartForm.add_all.value='false';document.addCommonToCartForm.submit()"
|
||||
class="btn btn-sm float-right">${uiLabelMap.OrderAddCheckedToCart}</a>
|
||||
<a href="<@ofbizUrl fullPath="true">createShoppingListFromOrder?orderId=${orderHeader.orderId}&frequency=6&intervalNumber=1&shoppingListTypeId=SLT_AUTO_REODR</@ofbizUrl>"
|
||||
class="btn btn-sm float-right">${uiLabelMap.OrderSendMeThisEveryMonth}</a>
|
||||
<button form="sendMeThisEveryMonthForm" class="btn btn-sm float-right" type="submit">${uiLabelMap.OrderSendMeThisEveryMonth}</button>
|
||||
</#if>
|
||||
</strong>
|
||||
</div>
|
||||
@@ -145,7 +152,7 @@ under the License.
|
||||
<#else>
|
||||
<#assign product = orderItem.getRelatedOne("Product", true)!/> <#-- should always exist because of FK constraint, but just in case -->
|
||||
<td>
|
||||
<a href="<@ofbizCatalogAltUrl fullPath="true" secure="false" productId=orderItem.productId/>"
|
||||
<a href="<@ofbizCatalogAltUrl secure="false" productId=orderItem.productId/>"
|
||||
class="linktext">${orderItem.productId} - ${orderItem.itemDescription?default("")}</a>
|
||||
<#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/>
|
||||
<#if orderItemAttributes?has_content>
|
||||
|
||||
@@ -120,4 +120,8 @@ button.jGrowl-close {
|
||||
.hidden {
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
.promotion-products .products-card {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4
-4
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
dependencies {
|
||||
pluginLibsCompile 'org.apache.lucene:lucene-core:7.1.0'
|
||||
pluginLibsCompile 'org.apache.lucene:lucene-queryparser:7.1.0'
|
||||
pluginLibsCompile 'org.apache.lucene:lucene-analyzers-common:7.1.0'
|
||||
}
|
||||
pluginLibsCompile 'org.apache.lucene:lucene-core:8.5.2'
|
||||
pluginLibsCompile 'org.apache.lucene:lucene-queryparser:8.5.2'
|
||||
pluginLibsCompile 'org.apache.lucene:lucene-analyzers-common:8.5.2'
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ if (searchFeature1 || searchFeature2 || searchFeature3 || !featureIdByType.isEmp
|
||||
}
|
||||
}
|
||||
if (searcher) {
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(100) //defaulting to 100 results
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) //defaulting to 100 results
|
||||
searcher.search(combQuery.build(), collector)
|
||||
ScoreDoc[] hits = collector.topDocs().scoreDocs
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ if (parameters.luceneQuery) {
|
||||
}
|
||||
combQuery.add(query, BooleanClause.Occur.MUST)
|
||||
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(100) // defaulting to 100 results
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) // defaulting to 100 results
|
||||
searcher.search(combQuery, collector)
|
||||
ScoreDoc[] hits = collector.topDocs().scoreDocs
|
||||
productList = []
|
||||
|
||||
@@ -41,7 +41,7 @@ public final class SearchWorker {
|
||||
|
||||
public static final String module = SearchWorker.class.getName();
|
||||
|
||||
private static final Version LUCENE_VERSION = Version.LUCENE_7_1_0;
|
||||
private static final Version LUCENE_VERSION = Version.LUCENE_8_5_2;
|
||||
|
||||
private SearchWorker() {}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class LuceneTests extends OFBizTestCase {
|
||||
combQueryBuilder.add(query, BooleanClause.Occur.MUST);
|
||||
BooleanQuery combQuery = combQueryBuilder.build();
|
||||
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(10);
|
||||
TopScoreDocCollector collector = TopScoreDocCollector.create(10, 10);
|
||||
searcher.search(combQuery, collector);
|
||||
|
||||
assertEquals("Only 1 result expected from the testdata", 1, collector.getTotalHits());
|
||||
|
||||
@@ -35,7 +35,7 @@ under the License.
|
||||
<property name="VT_STYLESHEET['add']" value="/ecommerce/images/blog.css"/>
|
||||
<property name="VT_STYLESHEET['add']" value="/multiflex/style.css"/>
|
||||
<property name="VT_STYLESHEET['add']" value="/contentimages/css/contentForum.css"/>
|
||||
<property name="VT_STYLESHEET['add']" value="/ecommerce/js/bootstrap/js/bootstrap-4.3.1.min.css"/>
|
||||
<property name="VT_STYLESHEET['add']" value="/ecommerce/js/bootstrap/css/bootstrap-4.3.1.min.css"/>
|
||||
<!--template location-->
|
||||
<property name="VT_HDR_TMPLT_LOC" value="component://multiflex/template/Header.ftl"/>
|
||||
<property name="VT_FTR_TMPLT_LOC" value="component://multiflex/template/Footer.ftl"/>
|
||||
|
||||
@@ -31,6 +31,7 @@ inputFields.putAll(parameters)
|
||||
performFindInMap.noConditionFind = "Y"
|
||||
performFindInMap.inputFields = inputFields
|
||||
performFindInMap.orderBy = parameters.sortField
|
||||
performFindInMap.filterByDate = "Y"
|
||||
if (parameters.sortField) {
|
||||
performFindInMap.orderBy = "lastName"
|
||||
}
|
||||
|
||||
@@ -2197,31 +2197,6 @@
|
||||
</simple-method>
|
||||
|
||||
<simple-method method-name="deleteScrumResource" short-description="remove scrum resource">
|
||||
<entity-one entity-name="UserLogin" value-field="sysUserLogin">
|
||||
<field-map field-name="userLoginId" value="system"/>
|
||||
</entity-one>
|
||||
<if-compare operator="equals" value="SCRUM_PRODUCT_OWNER" field="parameters.groupId">
|
||||
<set field="parameters.roleTypeId" value="PRODUCT_OWNER"/>
|
||||
</if-compare>
|
||||
<if-compare operator="equals" value="SCRUM_MASTER" field="parameters.groupId">
|
||||
<set field="parameters.roleTypeId" value="SCRUM_MASTER"/>
|
||||
</if-compare>
|
||||
<if-compare operator="equals" value="SCRUM_TEAM" field="parameters.groupId">
|
||||
<set field="parameters.roleTypeId" value="SCRUM_TEAM"/>
|
||||
</if-compare>
|
||||
<!-- For special role -->
|
||||
<if-compare operator="equals" value="SCRUM_STAKEHOLDER" field="parameters.groupId">
|
||||
<set field="parameters.roleTypeId" value="STAKEHOLDER"/>
|
||||
</if-compare>
|
||||
<entity-and entity-name="PartyRole" list="partyRoles">
|
||||
<field-map field-name="partyId" from-field="parameters.partyId"/>
|
||||
<field-map field-name="roleTypeId" from-field="parameters.roleTypeId"/>
|
||||
</entity-and>
|
||||
<if-not-empty field="partyRoles">
|
||||
<set-service-fields service-name="deletePartyRole" map="parameters" to-map="deletePartyRoleMap"/>
|
||||
<set field="deletePartyRoleMap.userLogin" from-field="sysUserLogin"/>
|
||||
<call-service service-name="deletePartyRole" in-map-name="deletePartyRoleMap"/>
|
||||
</if-not-empty>
|
||||
<now-timestamp field="nowTimestamp" />
|
||||
<entity-and entity-name="UserLoginSecurityGroup" list="userLoginSecurityGroups">
|
||||
<field-map field-name="userLoginId" from-field="parameters.userLoginId"/>
|
||||
@@ -2229,7 +2204,8 @@
|
||||
</entity-and>
|
||||
<if-not-empty field="userLoginSecurityGroups">
|
||||
<iterate list="userLoginSecurityGroups" entry="userLoginSecurityGroup">
|
||||
<remove-value value-field="userLoginSecurityGroup"/>
|
||||
<set field="userLoginSecurityGroup.thruDate" from-field="nowTimestamp"/>
|
||||
<store-value value-field="userLoginSecurityGroup"/>
|
||||
</iterate>
|
||||
</if-not-empty>
|
||||
</simple-method>
|
||||
|
||||
@@ -645,7 +645,9 @@ under the License.
|
||||
<request-map uri="createProductAndRole">
|
||||
<security https="true" auth="true"/>
|
||||
<event type="simple" invoke="createProductAndRole" path="component://scrum/minilang/ScrumEvents.xml"/>
|
||||
<response name="success" type="request-redirect-noparam" value="ViewProduct"/>
|
||||
<response name="success" type="request-redirect" value="ViewProduct">
|
||||
<redirect-parameter name="productId"/>
|
||||
</response>
|
||||
<response name="error" type="request-redirect" value="EditProduct"/>
|
||||
</request-map>
|
||||
<request-map uri="createProductRole">
|
||||
|
||||
+6
-4
@@ -17,14 +17,16 @@
|
||||
* under the License.
|
||||
*/
|
||||
dependencies {
|
||||
pluginLibsCompile 'org.apache.solr:solr-core:7.1.0'
|
||||
pluginLibsCompile 'com.google.guava:guava:20.0'
|
||||
// Remember to change the version number in SearchWorker class when upgrading.
|
||||
// Also Solr et Lucene should use the same version, luceneMatchVersion should be updated in solrconfig.xml
|
||||
pluginLibsCompile 'org.apache.solr:solr-core:8.5.2'
|
||||
pluginLibsCompile 'com.google.guava:guava:28.0-jre'
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
dependencySubstitution {
|
||||
substitute module('com.google.guava:guava') with module('com.google.guava:guava:20.0')
|
||||
substitute module('com.google.guava:guava') with module('com.google.guava:guava:28.0-jre')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
that you fully re-index after changing this setting as it can
|
||||
affect both how text is indexed and queried.
|
||||
-->
|
||||
<luceneMatchVersion>6.6.0</luceneMatchVersion>
|
||||
<luceneMatchVersion>8.5.2</luceneMatchVersion>
|
||||
|
||||
<!-- <lib/> directives can be used to instruct Solr to load any Jars
|
||||
identified and use them to resolve any "plugins" specified in
|
||||
|
||||
Reference in New Issue
Block a user