code using it, that wraps most of the OFBiz integration with FreeMarker.
This is the list of the main modifications:
* simplified and cleaned up the public methods of FreeMarkerWorker, used to
retrieve and render Freemarker templates and changed client code accordingly to
use them
* removed unused methods in FreeMarkerWorker and made some others private
* improved the integration code in FreeMarkerWorker to better use the Freemarker
API and specifically to leverage the various TemplateLoaders and the Freemarker
caching mechanism; it is now possible to switch the OFBiz legacy template
caching mechanism to use the Freemarker one instead
* improved the implementation of Freemarker template rendering from strings
(used by DataResourceWorker): it now leverages the Freemarker's
StringTemplateLoader that provides the ability to cache the strings, retrieved
from DataResources records, based on the timestamp of the last modification
* moved freemarkerImports.properties from "widget" to "base" component, and
changed its content (and the content of the associated templates
AutoImportTemplate.ftl and HtmlTemplate.ftl) to remove the dependency from base
to widget&common; some resources of "widget" and "common" are still referenced
from AutoImportTemplate.ftl (that is in "base") but even if they are soft
dependencies: if they are missing the system will load properly without any
error or warning; before this change it was impossible to use, or unit test,
FreeMarkerWorker before the "widget" and "common" components were loaded by the
system, now it is possible
* created a new class for unit tests for FreeMarkerWorker, named
FreeMarkerWorkerTests: at the moment it contains just one simple unit test but
more should be implemented
* refactored WebToolsServices.entityImport(...) to leverage the
FreeMarkerWorker.renderTemplate(...) method to run the Freemarker template,
rather than dealing with the Freemarker API directly; this is now possible
thanks to the cleanups and improvements done in the FreeMarkerWorker class; this
same approach should be implemented for a few other similar integration points
(mostly in the "content" component); this is a TODO item
* moved the encodeDoubleQuotes(...) method from FreeMarkerWorker to
MacroFormRenderer and made it private since this is the only calss using it and
its logic is not related to FreeMarker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762227 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7758)
I am running on trunk rev 1751489 on tomahawk theme.
In the browser, right-click and view the page source.
There is duplicate linking of jquery.jgrowl.min.css i.e.
<link rel="stylesheet" href="/images/jquery/plugins/jquery-jgrowl/1.4.1/jquery.jgrowl.min.css" type="text/css"/>
The solution is to remove a hack for JPublish in fex Java classes
and related changes (mostly "page." in ftl and xml files)
Thanks: Rohit Koushal for the path and James Yong the report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761235 13f79535-47bb-0310-9956-ffa450edef68
1) Removed 'maincss.css' entry from 'allowedPaths' param of from web.xml
Reason: Since, there is no file like 'maincss.css' exist under any includes directory.
2) Removed the unused references of maincss.css from FTLs, code
<link rel="stylesheet" href="${StringUtil.wrapString(baseUrl!)}/images/maincss.css" type="text/css"/>
has been removed.
Reason: This is an interesting thing, these FTLs were using the maincss.css located under the images directory.
When I look the history of these files, following were my findings,
The 'maincss.css' file under the 'images' directory exist in release4.0
http://svn.apache.org/repos/asf/ofbiz/branches/release4.0/framework/images/webapp/images/
after this release, this files no longer exist there.
3) Also, I have updated one file 'InventoryNoticeEmail.ftl' and used the basic HTML code to style, instead of using style defined in 'maincss.css' which were exist in release-4.0
4) Updated some references from 'maincss.css' to style.css in comments.
5) Also removed the entry of including '/images/maincss.css' and '/images/mainrtl.css' in SimpleDecorator
Since, these files no longer exist after release-4.0.
Thanks Wai for reviewing the work and thanks Swapnil M Mane for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758389 13f79535-47bb-0310-9956-ffa450edef68
The TransactionTotalsPdf.pdf currently doesn't show the name of the company it has been generated for.
jleroux: I asked Pierre to check that "Aree we sure that the changes in Simple.fo.ftl are general enough? I mean did you check that they will not appear in inopportune places?"
Pierre's answer: Checked against most occurrences where the SimpleDecorator is used. A few weren't possible to check due to missing demo data.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758091 13f79535-47bb-0310-9956-ffa450edef68
jleroux: I updated the patch. I fixed things by hand: tabs in the groovy files, removed the ftl file because of a tree conflicts due to the recent ftl files move and updated org.ofbiz to org.apache.ofbiz in CertKeystore.groovy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1753024 13f79535-47bb-0310-9956-ffa450edef68
This issue was due to the declaration of map with list syntax. It was introduced when we moved from Javolution collections to java collections.
One more issue found after fixing map syntax, that is missing block elements error. Added checks to handle that error as well.
Thanks Amardeep Singh Jhajj for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747202 13f79535-47bb-0310-9956-ffa450edef68
This error occurs due to the code used for dependent drop down for country and state. At party email address update page, no dependent drop down used, so js code triggering the request with empty countryGeoId and generating console error. Added check in code that if drop down field is not present on page then no need to observe it for the change.
Thanks Amardeep Singh Jhajj for reporting the issue and providing patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746130 13f79535-47bb-0310-9956-ffa450edef68
In addition, add an export example button on FindExample screen and add complete macro ftl renderer unit test. Issue OFBIZ-6931 proposed by Leila Mekika. Thanks to her, jacques and pierre for theirs remarks.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746045 13f79535-47bb-0310-9956-ffa450edef68
Related to OFBIZ-5781 Convert Javolution collections into Java collections
Thanks to Deepak Dixit and Adrian Crum for their help.
By defautl converted :
* FastMap by HashMap
* FastList by LinkedList
* FastSet by HashSet
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672752 13f79535-47bb-0310-9956-ffa450edef68
jquery-1.8.2 to jquery-1.10.2 which implies using jquery-migrate-1.2.1 for plugins compatiblities
jquery-ui-timepicker-addon-1.0.5 to jquery-ui-timepicker-addon-1.4.3 (using min now, better i18n)
jquery-ui-1.9.0 to jquery-ui-1.10.3
removes jquery.ui.datepicker.js now integrated in jquery.ui
jquery.hotkeys-0.7.9 to jquery.hotkeys-0.8
jquery.maskedinput-1.2.2 to jquery.maskedinput-1.3.1
jquery.validate 1.10.0 to 1.11.1
I never realised how much efforts have been put in this plugin!
I fixed an issue in JsLanguageFilesMapping generation
I removed the messages_ptbr.js and messages_ptpt.js files and the related conundrum in JsLanguageFileMappingCreator.java
untested, found not use cases OOTB
jquery.jcarousel ?(2006) to 0.3.0 (2013)
untested, found not use cases OOTB
jquery.flot 0.7 to 0.8.2 (lot of changes, still works)
removes useless flotpie.ftl
removes empty flotr folder
jquery.mobile-1.1.0-rc.1 to jquery.mobile-1.4.0
untested, found not use cases OOTB
jquery.cookie to jquery.cookie-1.4.0
Removes all useless/redundant js files (not only jQuery unused old versions)
notably removes all under images/jquery/ui/development-bundle/ui
removes now useless GooglemapMarkers.js and GooglemapSimple.js
Flat Grey application.js
moves jQuery(document).ready(function() at bottom (spotted in Chrome console)
css
I did not find much issues, I spotted the title bar of the lookups, but got it fixed after some efforts.
Issues:
Imagemanagement: I got issues while testing, actually I'm not quite qure how it works, even in stable demo. It should be validated again. I commit nevertheless my changes:
moves js part from product to images component
removes useless calls to js files (mostly in imagemanagement, but not only)
renames jquery.min.js to sizzle.min.js.
Inside sizzle.min.js, updates the Dojo part to v1.10.17-pre and removes the jQuery part
changes to use ofbizContentUrl macro for generating js calls
jquery.rotate.js NOT! It's jQueryRotateCompressed.js http://markmail.org/message/dit3dlh3ph4jnenp
Got ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'D:\projectsASF\ofbizClean\framework\images\webapp\images\pro&' to length 100. I opened OFBIZ-5501 for that
I tried to update jstree to jstree 3 but gave up. I let the jquery.jstree-3.0.0-beta3 files in place in case someone would give it a chance...
Not related but while a it:
removes <!--flot example requests--> from birt controller (moved recently to example component)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559769 13f79535-47bb-0310-9956-ffa450edef68
In r1178199, I missed to use the default DateTime file (jquery.ui.datepicker-en.js) being still with the idea that it was handled internally.
I have also refactored/simplified JsLanguageFileMappingCreator class and put comments to better explain how all that works
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1182731 13f79535-47bb-0310-9956-ffa450edef68
Fixes the problem by:
* Updating datetimepicker from 0.9.3 to 0.9.6 (where a localization folder exists)
* Use the fantastic createJsLanguageFileMapping service Sascha introduced (I just removed the confusing wrong comment about JsLanguageFilesMapping.ftl being generated and added a block for datetimepicker, also in JsLanguageFileMappingCreator.java). A very good dynamic+static tool, kudos Sascha!
Should work also in eCommerce though I did not found any uses
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178199 13f79535-47bb-0310-9956-ffa450edef68