This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new acc974dc88 Fixed: jGrowl notifications never display due to dead
jQuery-plugin paths (OFBIZ-13506)
acc974dc88 is described below
commit acc974dc88bdb1b086086b50662ace739f8976d8
Author: Mridul Pathak <[email protected]>
AuthorDate: Sat Aug 29 22:38:38 2026 +0530
Fixed: jGrowl notifications never display due to dead jQuery-plugin paths
(OFBIZ-13506)
showjGrowlMessage() dynamically loaded jGrowl and Readmore.js from vendor
paths that no longer exist after those plugins were migrated to npm-managed
packages; the resulting 404s silently swallowed the toast display. Statically
include jgrowl's and readmore-js's JS in Theme.xml alongside the other
npm-migrated plugins (matching how their CSS and Trumbowyg's JS are already
wired in), and drop the now-dead importLibrary call from showjGrowlMessage.
Verified live: the from/thru-date vali [...]
---
.../webapp/common-theme/js/util/OfbizUtil.js | 36 ++++++++++------------
themes/common-theme/widget/Theme.xml | 2 ++
2 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js
b/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js
index 30b424226f..75ab44cb88 100644
--- a/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js
+++ b/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js
@@ -1319,27 +1319,23 @@ function showjGrowlMessage(errMessage, classEvent,
stickyValue, showAllLabel, co
if (!hideAllLabel) hideAllLabel = jGrowlLabelObject[0];
}
- var libraryFiles =
["/common/js/jquery/plugins/Readmore.js-master/readmore.js",
- "/common/js/jquery/plugins/jquery-jgrowl/jquery.jgrowl-1.4.6.min.js"];
- importLibrary(libraryFiles, function () {
- $.jGrowl.defaults.closerTemplate = '<div class="closeAllJGrowl">' +
hideAllLabel + '</div>';
- if (jGrowlPosition !== null && jGrowlPosition !== undefined)
$.jGrowl.defaults.position = jGrowlPosition;
- $.jGrowl(errMessage, {
- theme: classEvent, sticky: stickyValue,
- beforeOpen: function (e, m, o) {
- if (jGrowlWidth !== null && jGrowlWidth !== undefined)
$(e).width(jGrowlWidth + 'px');
- if (jGrowlHeight !== null && jGrowlHeight !== undefined)
$(e).height(jGrowlHeight + 'px');
- },
- afterOpen: function (e, m) {
- jQuery(".jGrowl-message").readmore({
- moreLink: '<a href="#" style="display: block; width: auto;
padding: 0px;text-align: right; margin-top: 10px; color: #ffffff; font-size:
0.8em">' + showAllLabel + '</a>',
- lessLink: '<a href="#" style="display: block; width: auto;
padding: 0px;text-align: right; margin-top: 10px; color: #ffffff; font-size:
0.8em">' + collapseLabel + '</a>',
+ $.jGrowl.defaults.closerTemplate = '<div class="closeAllJGrowl">' +
hideAllLabel + '</div>';
+ if (jGrowlPosition !== null && jGrowlPosition !== undefined)
$.jGrowl.defaults.position = jGrowlPosition;
+ $.jGrowl(errMessage, {
+ theme: classEvent, sticky: stickyValue,
+ beforeOpen: function (e, m, o) {
+ if (jGrowlWidth !== null && jGrowlWidth !== undefined)
$(e).width(jGrowlWidth + 'px');
+ if (jGrowlHeight !== null && jGrowlHeight !== undefined)
$(e).height(jGrowlHeight + 'px');
+ },
+ afterOpen: function (e, m) {
+ jQuery(".jGrowl-message").readmore({
+ moreLink: '<a href="#" style="display: block; width: auto;
padding: 0px;text-align: right; margin-top: 10px; color: #ffffff; font-size:
0.8em">' + showAllLabel + '</a>',
+ lessLink: '<a href="#" style="display: block; width: auto;
padding: 0px;text-align: right; margin-top: 10px; color: #ffffff; font-size:
0.8em">' + collapseLabel + '</a>',
- maxHeight: 75
- });
- },
- speed: jGrowlSpeed
- });
+ maxHeight: 75
+ });
+ },
+ speed: jGrowlSpeed
});
}
diff --git a/themes/common-theme/widget/Theme.xml
b/themes/common-theme/widget/Theme.xml
index 6999bd0b4e..10fad851cd 100644
--- a/themes/common-theme/widget/Theme.xml
+++ b/themes/common-theme/widget/Theme.xml
@@ -68,6 +68,8 @@ under the License.
<property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/node_modules/daterangepicker/daterangepicker.js"/>
<property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/node_modules/trumbowyg/dist/trumbowyg.min.js"/>
<property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/node_modules/trumbowyg/dist/plugins/indent/trumbowyg.indent.min.js"/>
+ <property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/node_modules/jgrowl/jquery.jgrowl.min.js"/>
+ <property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/node_modules/readmore-js/readmore.min.js"/>
<property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/util/OfbizUtil.js"/>
<property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/util/fieldlookup.js"/>
<property name="VT_HDR_JAVASCRIPT['add']"
value="/common/js/plugins/date/date.timezone-min.js"/>