From d4fb92743623ec6951734e09e3b17e6bb573c59c Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Thu, 18 Jun 2020 09:28:48 +0300 Subject: [PATCH 01/10] a plugin to log csp errors reported by the browsers. it complements the report-only csp header, and a patch will be submited to the framework to point to this url. this code should rather be implemented in the framework, since the csp header is set there, and the browser complaints about missing report-url. --- csp/build.gradle | 37 +++++++ csp/documents/Csp.xml | 35 +++++++ csp/ofbiz-component.xml | 39 ++++++++ .../java/org/apache/ofbiz/csp/CSPEvents.java | 81 +++++++++++++++ csp/testdef/CspTests.xml | 26 +++++ csp/webapp/csp/WEB-INF/controller.xml | 62 ++++++++++++ csp/webapp/csp/WEB-INF/web.xml | 98 +++++++++++++++++++ csp/webapp/csp/index.jsp | 20 ++++ csp/widget/CommonScreens.xml | 67 +++++++++++++ csp/widget/CspForms.xml | 25 +++++ csp/widget/CspMenus.xml | 25 +++++ csp/widget/CspScreens.xml | 39 ++++++++ 12 files changed, 554 insertions(+) create mode 100644 csp/build.gradle create mode 100644 csp/documents/Csp.xml create mode 100644 csp/ofbiz-component.xml create mode 100644 csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java create mode 100644 csp/testdef/CspTests.xml create mode 100644 csp/webapp/csp/WEB-INF/controller.xml create mode 100644 csp/webapp/csp/WEB-INF/web.xml create mode 100644 csp/webapp/csp/index.jsp create mode 100644 csp/widget/CommonScreens.xml create mode 100644 csp/widget/CspForms.xml create mode 100644 csp/widget/CspMenus.xml create mode 100644 csp/widget/CspScreens.xml diff --git a/csp/build.gradle b/csp/build.gradle new file mode 100644 index 000000000..0056e3fb9 --- /dev/null +++ b/csp/build.gradle @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +dependencies { + //Examples of compile-time and runtime dependencies + + //pluginLibsCompile 'junit:junit-dep:4.10' + //pluginLibsRuntime 'junit:junit-dep:4.10' +} + +task install { + doLast { + // Install logic for this plugin + } +} + +task uninstall { + doLast { + // uninstall logic for this plugin + } +} diff --git a/csp/documents/Csp.xml b/csp/documents/Csp.xml new file mode 100644 index 000000000..8fe859e9d --- /dev/null +++ b/csp/documents/Csp.xml @@ -0,0 +1,35 @@ + + + + + + <anchor xml:id="Csp"/>The Csp Component +
+ Introduction + + +
+ + +
diff --git a/csp/ofbiz-component.xml b/csp/ofbiz-component.xml new file mode 100644 index 000000000..49d824e6f --- /dev/null +++ b/csp/ofbiz-component.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + diff --git a/csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java b/csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java new file mode 100644 index 000000000..e381964e1 --- /dev/null +++ b/csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.apache.ofbiz.csp; + +import java.io.IOException; + +import org.apache.ofbiz.base.lang.JSON; + +import java.util.Map; +import java.util.Set; +import java.util.HashSet; +import java.util.Arrays; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.ofbiz.base.util.Debug; + +public class CSPEvents { + + public static final String module = CSPEvents.class.getName(); + + private static final String[] onlyAttrs = new String[] { + "violated-directive", + "blocked-uri", + "referrer", + "script-sample", + "source-file", + "disposition", + "original-policy", + "line-number", + "effective-directive", + "document-uri", + "status-code" + }; + private static final Set onlyKeys = new HashSet(Arrays.asList((onlyAttrs))); + + public static String CSPReport(HttpServletRequest request, HttpServletResponse response) { + // log csp related errors, reported by the browser + + try { + Map attrMap = JSON.from(request.getInputStream()).toObject(Map.class); + if (attrMap.containsKey("csp-report")) { + Map repMap = JSON.from(attrMap.get("csp-report")).toObject(Map.class); + Set keys = new HashSet(repMap.keySet()); + for (String attr : keys) { + if (!onlyKeys.contains(attr)) { + repMap.remove(attr); + } + } + if (repMap.size() > 0) { + JSON json = JSON.from(repMap); + Debug.logError(json.toString(), module); + response.setStatus(204); + return "success"; + } + } + } catch (IOException e) { + Debug.logError(e, module); + } + response.setStatus(403); + return "error"; + } + +} diff --git a/csp/testdef/CspTests.xml b/csp/testdef/CspTests.xml new file mode 100644 index 000000000..9558b6da6 --- /dev/null +++ b/csp/testdef/CspTests.xml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file diff --git a/csp/webapp/csp/WEB-INF/controller.xml b/csp/webapp/csp/WEB-INF/controller.xml new file mode 100644 index 000000000..23311a07b --- /dev/null +++ b/csp/webapp/csp/WEB-INF/controller.xml @@ -0,0 +1,62 @@ + + + + + + + + Csp Component Site Configuration File + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/csp/webapp/csp/WEB-INF/web.xml b/csp/webapp/csp/WEB-INF/web.xml new file mode 100644 index 000000000..603467d68 --- /dev/null +++ b/csp/webapp/csp/WEB-INF/web.xml @@ -0,0 +1,98 @@ + + + + + Apache OFBiz - Csp Component + Csp Component of the Apache OFBiz Project + + + + A unique name used to identify/recognize the local dispatcher for the Service Engine + localDispatcherNamecsp + + + The Name of the Entity Delegator to use, defined in entityengine.xml + entityDelegatorNamedefault + + + The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. + mainDecoratorLocation + component://csp/widget/CommonScreens.xml + + + Remove unnecessary whitespace from HTML output. + compressHTML + false + + + + ControlFilter + ControlFilter + org.apache.ofbiz.webapp.control.ControlFilter + + allowedPaths + /error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images + + redirectPath/control/main + + + ContextFilter + ContextFilter + org.apache.ofbiz.webapp.control.ContextFilter + + + SameSiteFilter + SameSiteFilter + org.apache.ofbiz.webapp.control.SameSiteFilter + + ControlFilter/* + ContextFilter/* + SameSiteFilter/* + + org.apache.ofbiz.webapp.control.ControlEventListener + org.apache.ofbiz.webapp.control.LoginEventListener + + + + + Main Control Servlet + ControlServlet + ControlServlet + org.apache.ofbiz.webapp.control.ControlServlet + 1 + + ControlServlet/control/* + + + 60 + + + + index.jsp + index.html + index.htm + + diff --git a/csp/webapp/csp/index.jsp b/csp/webapp/csp/index.jsp new file mode 100644 index 000000000..b8ade9162 --- /dev/null +++ b/csp/webapp/csp/index.jsp @@ -0,0 +1,20 @@ +<%-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--%> + +<%pageContext.forward("control/main");%> diff --git a/csp/widget/CommonScreens.xml b/csp/widget/CommonScreens.xml new file mode 100644 index 000000000..b369ea548 --- /dev/null +++ b/csp/widget/CommonScreens.xml @@ -0,0 +1,67 @@ + + + + + + +
+ + + + + + + + + + + + + + + +
+
+ + +
+ + + + + +
+ + + + + + + + + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/csp/widget/CspForms.xml b/csp/widget/CspForms.xml new file mode 100644 index 000000000..4717f309f --- /dev/null +++ b/csp/widget/CspForms.xml @@ -0,0 +1,25 @@ + + + + + + + \ No newline at end of file diff --git a/csp/widget/CspMenus.xml b/csp/widget/CspMenus.xml new file mode 100644 index 000000000..f72b1c350 --- /dev/null +++ b/csp/widget/CspMenus.xml @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/csp/widget/CspScreens.xml b/csp/widget/CspScreens.xml new file mode 100644 index 000000000..06ab0eb4c --- /dev/null +++ b/csp/widget/CspScreens.xml @@ -0,0 +1,39 @@ + + + + + + +
+ + + + + + + + + +
+
+ +
\ No newline at end of file From 2abd05287aeba5b9638744340d50c9f941e72ab0 Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Fri, 19 Jun 2020 08:23:47 +0300 Subject: [PATCH 02/10] small style related fixes. renaming the map files for minified js and css files. --- ecommerce/template/catalog/ProductSummary.ftl | 2 +- ecommerce/webapp/ecommerce/css/custom.css | 2 +- .../css/{bootstrap-4.3.1.css.map => bootstrap.css.map} | 0 .../css/{bootstrap-4.3.1.min.css.map => bootstrap.min.css.map} | 0 .../{bootstrap.bundle-4.3.1.js.map => bootstrap.bundle.js.map} | 0 ...trap.bundle-4.3.1.min.js.map => bootstrap.bundle.min.js.map} | 0 .../bootstrap/js/{bootstrap-4.3.1.js.map => bootstrap.js.map} | 0 .../js/{bootstrap-4.3.1.min.js.map => bootstrap.min.js.map} | 0 multiflex/widget/Theme.xml | 2 +- 9 files changed, 3 insertions(+), 3 deletions(-) rename ecommerce/webapp/ecommerce/js/bootstrap/css/{bootstrap-4.3.1.css.map => bootstrap.css.map} (100%) rename ecommerce/webapp/ecommerce/js/bootstrap/css/{bootstrap-4.3.1.min.css.map => bootstrap.min.css.map} (100%) rename ecommerce/webapp/ecommerce/js/bootstrap/js/{bootstrap.bundle-4.3.1.js.map => bootstrap.bundle.js.map} (100%) rename ecommerce/webapp/ecommerce/js/bootstrap/js/{bootstrap.bundle-4.3.1.min.js.map => bootstrap.bundle.min.js.map} (100%) rename ecommerce/webapp/ecommerce/js/bootstrap/js/{bootstrap-4.3.1.js.map => bootstrap.js.map} (100%) rename ecommerce/webapp/ecommerce/js/bootstrap/js/{bootstrap-4.3.1.min.js.map => bootstrap.min.js.map} (100%) diff --git a/ecommerce/template/catalog/ProductSummary.ftl b/ecommerce/template/catalog/ProductSummary.ftl index cc12505d5..9ff3d9727 100644 --- a/ecommerce/template/catalog/ProductSummary.ftl +++ b/ecommerce/template/catalog/ProductSummary.ftl @@ -77,7 +77,7 @@

${productContentWrapper.get("PRODUCT_NAME", "html")!}

-
+
${productContentWrapper.get("DESCRIPTION", "html")!}<#if daysToShip??> - ${uiLabelMap.ProductUsuallyShipsIn} ${daysToShip} ${uiLabelMap.CommonDays}! <#-- Display category-specific product comments --> diff --git a/ecommerce/webapp/ecommerce/css/custom.css b/ecommerce/webapp/ecommerce/css/custom.css index a9b8bdf2a..8f1a2de09 100644 --- a/ecommerce/webapp/ecommerce/css/custom.css +++ b/ecommerce/webapp/ecommerce/css/custom.css @@ -41,7 +41,7 @@ a.btn-primary { .card .card-img-top { height: 140px; - width: auto; +/* width: auto;*/ } .card-body ul { padding : 0px; diff --git a/ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap-4.3.1.css.map b/ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap.css.map similarity index 100% rename from ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap-4.3.1.css.map rename to ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap.css.map diff --git a/ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap-4.3.1.min.css.map b/ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap.min.css.map similarity index 100% rename from ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap-4.3.1.min.css.map rename to ecommerce/webapp/ecommerce/js/bootstrap/css/bootstrap.min.css.map diff --git a/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle-4.3.1.js.map b/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle.js.map similarity index 100% rename from ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle-4.3.1.js.map rename to ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle.js.map diff --git a/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle-4.3.1.min.js.map b/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle.min.js.map similarity index 100% rename from ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle-4.3.1.min.js.map rename to ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.bundle.min.js.map diff --git a/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap-4.3.1.js.map b/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.js.map similarity index 100% rename from ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap-4.3.1.js.map rename to ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.js.map diff --git a/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap-4.3.1.min.js.map b/ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.min.js.map similarity index 100% rename from ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap-4.3.1.min.js.map rename to ecommerce/webapp/ecommerce/js/bootstrap/js/bootstrap.min.js.map diff --git a/multiflex/widget/Theme.xml b/multiflex/widget/Theme.xml index 638cde543..8002b3914 100644 --- a/multiflex/widget/Theme.xml +++ b/multiflex/widget/Theme.xml @@ -35,7 +35,7 @@ under the License. - + From 014fee71307e046665a09b3737ccd77248c2ddc8 Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Sun, 2 Aug 2020 23:24:41 +0300 Subject: [PATCH 03/10] remove csp plugin --- csp/build.gradle | 37 ------- csp/documents/Csp.xml | 35 ------- csp/ofbiz-component.xml | 39 -------- .../java/org/apache/ofbiz/csp/CSPEvents.java | 81 --------------- csp/testdef/CspTests.xml | 26 ----- csp/webapp/csp/WEB-INF/controller.xml | 62 ------------ csp/webapp/csp/WEB-INF/web.xml | 98 ------------------- csp/webapp/csp/index.jsp | 20 ---- csp/widget/CommonScreens.xml | 67 ------------- csp/widget/CspForms.xml | 25 ----- csp/widget/CspMenus.xml | 25 ----- csp/widget/CspScreens.xml | 39 -------- 12 files changed, 554 deletions(-) delete mode 100644 csp/build.gradle delete mode 100644 csp/documents/Csp.xml delete mode 100644 csp/ofbiz-component.xml delete mode 100644 csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java delete mode 100644 csp/testdef/CspTests.xml delete mode 100644 csp/webapp/csp/WEB-INF/controller.xml delete mode 100644 csp/webapp/csp/WEB-INF/web.xml delete mode 100644 csp/webapp/csp/index.jsp delete mode 100644 csp/widget/CommonScreens.xml delete mode 100644 csp/widget/CspForms.xml delete mode 100644 csp/widget/CspMenus.xml delete mode 100644 csp/widget/CspScreens.xml diff --git a/csp/build.gradle b/csp/build.gradle deleted file mode 100644 index 0056e3fb9..000000000 --- a/csp/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dependencies { - //Examples of compile-time and runtime dependencies - - //pluginLibsCompile 'junit:junit-dep:4.10' - //pluginLibsRuntime 'junit:junit-dep:4.10' -} - -task install { - doLast { - // Install logic for this plugin - } -} - -task uninstall { - doLast { - // uninstall logic for this plugin - } -} diff --git a/csp/documents/Csp.xml b/csp/documents/Csp.xml deleted file mode 100644 index 8fe859e9d..000000000 --- a/csp/documents/Csp.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - <anchor xml:id="Csp"/>The Csp Component -
- Introduction - - -
- - -
diff --git a/csp/ofbiz-component.xml b/csp/ofbiz-component.xml deleted file mode 100644 index 49d824e6f..000000000 --- a/csp/ofbiz-component.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java b/csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java deleted file mode 100644 index e381964e1..000000000 --- a/csp/src/main/java/org/apache/ofbiz/csp/CSPEvents.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - *******************************************************************************/ -package org.apache.ofbiz.csp; - -import java.io.IOException; - -import org.apache.ofbiz.base.lang.JSON; - -import java.util.Map; -import java.util.Set; -import java.util.HashSet; -import java.util.Arrays; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.ofbiz.base.util.Debug; - -public class CSPEvents { - - public static final String module = CSPEvents.class.getName(); - - private static final String[] onlyAttrs = new String[] { - "violated-directive", - "blocked-uri", - "referrer", - "script-sample", - "source-file", - "disposition", - "original-policy", - "line-number", - "effective-directive", - "document-uri", - "status-code" - }; - private static final Set onlyKeys = new HashSet(Arrays.asList((onlyAttrs))); - - public static String CSPReport(HttpServletRequest request, HttpServletResponse response) { - // log csp related errors, reported by the browser - - try { - Map attrMap = JSON.from(request.getInputStream()).toObject(Map.class); - if (attrMap.containsKey("csp-report")) { - Map repMap = JSON.from(attrMap.get("csp-report")).toObject(Map.class); - Set keys = new HashSet(repMap.keySet()); - for (String attr : keys) { - if (!onlyKeys.contains(attr)) { - repMap.remove(attr); - } - } - if (repMap.size() > 0) { - JSON json = JSON.from(repMap); - Debug.logError(json.toString(), module); - response.setStatus(204); - return "success"; - } - } - } catch (IOException e) { - Debug.logError(e, module); - } - response.setStatus(403); - return "error"; - } - -} diff --git a/csp/testdef/CspTests.xml b/csp/testdef/CspTests.xml deleted file mode 100644 index 9558b6da6..000000000 --- a/csp/testdef/CspTests.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/csp/webapp/csp/WEB-INF/controller.xml b/csp/webapp/csp/WEB-INF/controller.xml deleted file mode 100644 index 23311a07b..000000000 --- a/csp/webapp/csp/WEB-INF/controller.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - Csp Component Site Configuration File - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/csp/webapp/csp/WEB-INF/web.xml b/csp/webapp/csp/WEB-INF/web.xml deleted file mode 100644 index 603467d68..000000000 --- a/csp/webapp/csp/WEB-INF/web.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - Apache OFBiz - Csp Component - Csp Component of the Apache OFBiz Project - - - - A unique name used to identify/recognize the local dispatcher for the Service Engine - localDispatcherNamecsp - - - The Name of the Entity Delegator to use, defined in entityengine.xml - entityDelegatorNamedefault - - - The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. - mainDecoratorLocation - component://csp/widget/CommonScreens.xml - - - Remove unnecessary whitespace from HTML output. - compressHTML - false - - - - ControlFilter - ControlFilter - org.apache.ofbiz.webapp.control.ControlFilter - - allowedPaths - /error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images - - redirectPath/control/main - - - ContextFilter - ContextFilter - org.apache.ofbiz.webapp.control.ContextFilter - - - SameSiteFilter - SameSiteFilter - org.apache.ofbiz.webapp.control.SameSiteFilter - - ControlFilter/* - ContextFilter/* - SameSiteFilter/* - - org.apache.ofbiz.webapp.control.ControlEventListener - org.apache.ofbiz.webapp.control.LoginEventListener - - - - - Main Control Servlet - ControlServlet - ControlServlet - org.apache.ofbiz.webapp.control.ControlServlet - 1 - - ControlServlet/control/* - - - 60 - - - - index.jsp - index.html - index.htm - - diff --git a/csp/webapp/csp/index.jsp b/csp/webapp/csp/index.jsp deleted file mode 100644 index b8ade9162..000000000 --- a/csp/webapp/csp/index.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---%> - -<%pageContext.forward("control/main");%> diff --git a/csp/widget/CommonScreens.xml b/csp/widget/CommonScreens.xml deleted file mode 100644 index b369ea548..000000000 --- a/csp/widget/CommonScreens.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - -
- - - - - - - - - - - - - - - -
-
- - -
- - - - - -
- - - - - - - - - -
-
-
-
-
-
-
\ No newline at end of file diff --git a/csp/widget/CspForms.xml b/csp/widget/CspForms.xml deleted file mode 100644 index 4717f309f..000000000 --- a/csp/widget/CspForms.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/csp/widget/CspMenus.xml b/csp/widget/CspMenus.xml deleted file mode 100644 index f72b1c350..000000000 --- a/csp/widget/CspMenus.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/csp/widget/CspScreens.xml b/csp/widget/CspScreens.xml deleted file mode 100644 index 06ab0eb4c..000000000 --- a/csp/widget/CspScreens.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -
- - - - - - - - - -
-
- -
\ No newline at end of file From ac77fe3d8a3c5f2c94c42d2b9e6083a836c67e7c Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Fri, 21 Aug 2020 08:49:08 +0300 Subject: [PATCH 04/10] keeping up --- ebay/src/docs/asciidoc/images/OFBiz-Logo.svg | 41 +++++++++++++++++++ ldap/src/docs/asciidoc/images/OFBiz-Logo.svg | 41 +++++++++++++++++++ .../src/docs/asciidoc/images/OFBiz-Logo.svg | 41 +++++++++++++++++++ .../src/docs/asciidoc/images/OFBiz-Logo.svg | 41 +++++++++++++++++++ 4 files changed, 164 insertions(+) create mode 100755 ebay/src/docs/asciidoc/images/OFBiz-Logo.svg create mode 100755 ldap/src/docs/asciidoc/images/OFBiz-Logo.svg create mode 100755 myportal/src/docs/asciidoc/images/OFBiz-Logo.svg create mode 100755 projectmgr/src/docs/asciidoc/images/OFBiz-Logo.svg diff --git a/ebay/src/docs/asciidoc/images/OFBiz-Logo.svg b/ebay/src/docs/asciidoc/images/OFBiz-Logo.svg new file mode 100755 index 000000000..6c9a6afb6 --- /dev/null +++ b/ebay/src/docs/asciidoc/images/OFBiz-Logo.svg @@ -0,0 +1,41 @@ + + + + + OFBiz-Logo + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/ldap/src/docs/asciidoc/images/OFBiz-Logo.svg b/ldap/src/docs/asciidoc/images/OFBiz-Logo.svg new file mode 100755 index 000000000..6c9a6afb6 --- /dev/null +++ b/ldap/src/docs/asciidoc/images/OFBiz-Logo.svg @@ -0,0 +1,41 @@ + + + + + OFBiz-Logo + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/myportal/src/docs/asciidoc/images/OFBiz-Logo.svg b/myportal/src/docs/asciidoc/images/OFBiz-Logo.svg new file mode 100755 index 000000000..6c9a6afb6 --- /dev/null +++ b/myportal/src/docs/asciidoc/images/OFBiz-Logo.svg @@ -0,0 +1,41 @@ + + + + + OFBiz-Logo + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/projectmgr/src/docs/asciidoc/images/OFBiz-Logo.svg b/projectmgr/src/docs/asciidoc/images/OFBiz-Logo.svg new file mode 100755 index 000000000..6c9a6afb6 --- /dev/null +++ b/projectmgr/src/docs/asciidoc/images/OFBiz-Logo.svg @@ -0,0 +1,41 @@ + + + + + OFBiz-Logo + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file From 3bd96f28b3167c9e101bda459e9761e0db601623 Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Sat, 22 Aug 2020 16:17:41 +0300 Subject: [PATCH 05/10] bootstrap-bundle and typo --- ecommerce/template/catalog/ProductDetail.ftl | 2 +- ecommerce/widget/Theme.xml | 1 - multiflex/widget/Theme.xml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ecommerce/template/catalog/ProductDetail.ftl b/ecommerce/template/catalog/ProductDetail.ftl index f69636bdd..b30edb427 100644 --- a/ecommerce/template/catalog/ProductDetail.ftl +++ b/ecommerce/template/catalog/ProductDetail.ftl @@ -704,7 +704,7 @@ $(function(){
${uiLabelMap.CommonQuantity}:  - ${uiLabelMap.OrderAddToCart}  
diff --git a/ecommerce/widget/Theme.xml b/ecommerce/widget/Theme.xml index 5a3ec63e8..c2cc50e50 100644 --- a/ecommerce/widget/Theme.xml +++ b/ecommerce/widget/Theme.xml @@ -35,7 +35,6 @@ under the License. - diff --git a/multiflex/widget/Theme.xml b/multiflex/widget/Theme.xml index 8002b3914..a2fc61ddc 100644 --- a/multiflex/widget/Theme.xml +++ b/multiflex/widget/Theme.xml @@ -30,7 +30,7 @@ under the License. - + From d77541dcd6b9194b6949ffab2b09f707f68c6ea9 Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Sat, 22 Aug 2020 21:05:34 +0300 Subject: [PATCH 06/10] OFBIZ-11977, multiflex css is linking to wrong location --- multiflex/widget/Theme.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiflex/widget/Theme.xml b/multiflex/widget/Theme.xml index 5e560b43e..238c39686 100644 --- a/multiflex/widget/Theme.xml +++ b/multiflex/widget/Theme.xml @@ -30,7 +30,7 @@ under the License. - + From b8732ea91e5fc16b531f68538f444e2bb5c8193b Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Sat, 22 Aug 2020 22:44:46 +0300 Subject: [PATCH 07/10] enclose productsummary list in div.row to better use the screen/plugins --- ecommerce/template/catalog/ProductDetail.ftl | 16 +++++++--------- ecommerce/template/catalog/ProductSummary.ftl | 3 +++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ecommerce/template/catalog/ProductDetail.ftl b/ecommerce/template/catalog/ProductDetail.ftl index b30edb427..0fa8fb127 100644 --- a/ecommerce/template/catalog/ProductDetail.ftl +++ b/ecommerce/template/catalog/ProductDetail.ftl @@ -1005,21 +1005,16 @@ $(function(){
+
<#list assocProducts as productAssoc> <#if productAssoc.productId == product.productId> <#local assocProductId = productAssoc.productIdTo /> <#else> <#local assocProductId = productAssoc.productId /> -
- - ${assocProductId} - - <#if productAssoc.reason?has_content> - - ${productAssoc.reason} - -
+ <#if productAssoc.reason?has_content> + ${setRequestAttribute("highlightLabel", productAssoc.reason)} + ${setRequestAttribute("optProductId", assocProductId)} ${setRequestAttribute("listIndex", listIndex)} ${setRequestAttribute("formNamePrefix", formNamePrefix)} @@ -1030,6 +1025,7 @@ $(function(){ <#local product = pageProduct /> <#local listIndex = listIndex + 1 /> +
${setRequestAttribute("optProductId", "")} @@ -1064,6 +1060,7 @@ $(function(){

${uiLabelMap.ProductSimilarProducts}

+
<#list commonFeatureResultIds as commonFeatureResultId> ${setRequestAttribute("optProductId", commonFeatureResultId)} ${setRequestAttribute("listIndex", commonFeatureResultId_index)} @@ -1071,6 +1068,7 @@ $(function(){ <#-- ${setRequestAttribute("targetRequestName", targetRequestName)} --> ${screens.render(productsummaryScreen)} +

diff --git a/ecommerce/template/catalog/ProductSummary.ftl b/ecommerce/template/catalog/ProductSummary.ftl index 9ff3d9727..a07d7f6fc 100644 --- a/ecommerce/template/catalog/ProductSummary.ftl +++ b/ecommerce/template/catalog/ProductSummary.ftl @@ -84,6 +84,9 @@ <#if prodCatMem?? && prodCatMem.comments?has_content>

${prodCatMem.comments}

+ <#if request.getAttribute("highlightLabel")??> +

${request.getAttribute("highlightLabel")}

+ <#-- example of showing a certain type of feature with the product --> <#if sizeProductFeatureAndAppls?has_content> From 1a7e224b54ee6ae55e600ec5ffb87fdabb0d6816 Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Mon, 31 Aug 2020 06:47:48 +0300 Subject: [PATCH 08/10] uom selection patch phase2 --- ecommerce/template/catalog/ProductDetail.ftl | 26 +++++++++---------- ecommerce/template/catalog/ProductSummary.ftl | 12 +++++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ecommerce/template/catalog/ProductDetail.ftl b/ecommerce/template/catalog/ProductDetail.ftl index 0fa8fb127..1d8de1576 100644 --- a/ecommerce/template/catalog/ProductDetail.ftl +++ b/ecommerce/template/catalog/ProductDetail.ftl @@ -335,6 +335,8 @@ $(function(){ +${screens.render("component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productvariantjs")} +${variantInfoJavaScript!}
<#assign productAdditionalImage1 = productContentWrapper.get("ADDITIONAL_IMAGE_1", "url")! /> <#assign productAdditionalImage2 = productContentWrapper.get("ADDITIONAL_IMAGE_2", "url")! /> @@ -718,15 +720,13 @@ $(function(){
- +
+ -
- - -
-
-
<#else> <#assign inStock = false /> @@ -736,17 +736,15 @@ $(function(){ <#if mainProducts?has_content> - + <#list mainProducts as mainProduct>
-
- - -
-
+ <#if (availableInventory??) && (availableInventory <= 0) && "N" == product.requireAmount?default("N")> diff --git a/ecommerce/template/catalog/ProductSummary.ftl b/ecommerce/template/catalog/ProductSummary.ftl index a07d7f6fc..c377a5853 100644 --- a/ecommerce/template/catalog/ProductSummary.ftl +++ b/ecommerce/template/catalog/ProductSummary.ftl @@ -49,6 +49,8 @@ } } +${screens.render("component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productvariantjs")} +${variantInfoJavaScript!} <#if product??> <#-- variable setup --> <#if "Y" == backendPath?default("N")> @@ -197,15 +199,15 @@
<#if mainProducts?has_content> - + <#list mainProducts as mainProduct> -
- - +
From 2c9fea24b0683dcc95f368cbb8a23e8197f4b6e2 Mon Sep 17 00:00:00 2001 From: "alexbodn@gmail.com" Date: Wed, 2 Sep 2020 14:38:32 +0300 Subject: [PATCH 09/10] rc fix select uom --- ecommerce/template/catalog/ProductDetail.ftl | 114 +++++------------- ecommerce/template/catalog/ProductSummary.ftl | 3 +- 2 files changed, 33 insertions(+), 84 deletions(-) diff --git a/ecommerce/template/catalog/ProductDetail.ftl b/ecommerce/template/catalog/ProductDetail.ftl index 1d8de1576..e9ada6db8 100644 --- a/ecommerce/template/catalog/ProductDetail.ftl +++ b/ecommerce/template/catalog/ProductDetail.ftl @@ -26,50 +26,23 @@ ${virtualJavaScript!} ${virtualVariantJavaScript!} ${screens.render("component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productvariantjs")} ${variantInfoJavaScript!} <#if product??>