Commit Graph
2222 Commits
Author SHA1 Message Date
Jacques Le Roux e988dd4efd Improved: increases some French labels length
They fits with new enlarged second menu in Rainbow Stone
2021-02-21 12:31:13 +01:00
Michael Brohl 29bf0a040a Merge branch 'trunk' into OFBIZ-12169_Handle_remaining_checkstyle_errors 2021-02-13 11:26:01 +01:00
Deepak Dixit 782bddb729 Fixed File Resource not found console warning related to already removed data files 2021-02-12 12:55:31 +05:30
Wiebke Pätzold 82a15c70e3 Improved: Removed inner assignments (OFBIZ-12169) 2021-02-10 11:38:04 +01:00
Wiebke Pätzold b65be41fc7 Improved: if else construct must use parentheses (OFBIZ-12169) 2021-02-09 09:11:48 +01:00
James Yong ad0211ab2d Improved: Display last-visited-time popup after login (OFBIZ-12148) (#266)
Improved: Display last-visited-time popup after login (OFBIZ-12148)

To allow users to know of any unauthorised access to their accounts.

Thanks: Michael for review
2021-02-08 00:04:29 +08:00
Sebastian Berg a33ac5cff3 Improved: Convert EmailServices.xml mini lang to groovy (OFBIZ-11868) 2021-02-01 16:51:00 +01:00
Wiebke Pätzold b57f4d0845 Improved: Spelling error in the German translation of Slovakia
(OFBIZ-12161)
2021-01-28 18:08:15 +01:00
Jacques Le Roux 20e7fc5435 Fixed: Creating a new Customer create a wrong record in CommunicationEvent (OFBIZ-12142)
In https://markmail.org/message/pf3d3qyjfucicbj7 I initially answered:
In demo data 13 parties use <<infoString="ofbiztest@example.com">> as in
<ContactMech contactMechId="FRA01" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
This one is loaded last. Rather
<ContactMech contactMechId="Company" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
which is the 1st one, should be loaded last.

A better solution is to use "ofbizsupport@example.com" in EmailServices.xml

Indeed, fortunately the Company party also uses this infoString and using it in
EmailServices.xml does not affect the integration test and should not affect
other parts of the (only) demo data

Thanks: Emad Radwan for opiniated report :) and Pritam Kute for issue analysis
2021-01-18 19:41:08 +01:00
Nicolas Malin 7165768251 Implemented: Add a framework method to get main webapp menu with the webapp name
(OFBIZ-10601)

To improve theme management and provide better tools for new themes, we implement a method to obtain the main menu of a webapp.
Instead of just managing a menu, we extend the functionality by offering a method to expose a summary of the webapp, to simplify the navigation.

For this we add a new attribute on webapp definition app-shortcut-screen :

    <webapp name="mywebapp"
            ...
            app-shortcut-screen="component://mycomponent/widget/CommonScreens.xml#ShortcutApp"
            ...
    />

The idea is to define a new purpose screen *Shortcut* that contains what defines a webapp when an action or navigation has been requested. With this screen you can load a menu, a search, a complex description and use all screen powerfulness to resolve what displaying and support by theming

    <screen name="ShortcutApp">
        <section>
            <actions>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
            </actions>
            <widgets>
                <decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
                    <decorator-section name="body">
                        <include-menu name="MyShortcutAppBar" location="component://mycomponent/widget/CommonMenus.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

Each component are self-sufficient to define what shortcuts to display without framework change or knowledge about other component.
Each theme can implement and customize the display rendering at will.

To illustrate an example of implementation we set sub menu for each webapp defined on applications and exploit it on bluelight theme.

Thanks for Dennis Balkir, Jacques Leroux, Leila Mekika and Julien Nicolas for their involvement
2021-01-15 08:56:23 +01:00
James Yong 9c7dc7b877 Improved: Rename MultiBlockHtmlTemplateUtil to ScriptLinkHelper (OFBIZ-12134)
Rename + Refactor
2021-01-13 09:26:42 +08:00
Suraj Khurana cc17887980 Improved: Added support to calculate distance between two geo points.
(OFBIZ-11901)
Thanks Ravi Lodhi for review and discussion.
2021-01-09 13:37:21 +05:30
Jacques Le Roux ec2b84341e Reverted: "Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)"
This reverts commit 17eb2e4cf7.

It does not work when using <<target="javascript:........>>
I could change those cases but it's easier and safer to simply revert back to
target-type!

Thanks: James for report
2020-12-18 11:08:32 +01:00
Jacques Le Roux 17eb2e4cf7 Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)
Same for sub-hyperlink
2020-12-11 16:52:04 +01:00
Jacques Le Roux 5fa312cfb9 Fixed: Secure the uploads (OFBIZ-12080)
Improves the labels names and format comment in LayoutEvents.java

I backport to ease later works...
2020-12-06 11:16:44 +01:00
James Yong cfabbc9b74 Fixed: jquery.ui.datepicker-en.js does not exist (OFBIZ-12071)
Fixed for Jquery DatePicker
2020-12-05 19:24:09 +08:00
Jacques Le Roux e73616caf1 Fixed: Secure the uploads (OFBIZ-12080)
2020/08/10 the OFBiz security team received a security report by Harshit Shukla
<harshit.shukz@gmail.com>, roughly it was (quoting part of it to simplify):

<<I have identified a Remote Code Execution (RCE) Vulnerability. The reason
behind this RCE is lack of file extension check at
catalog/control/UploadCategoryImage?productCategoryId=CATALOG1_BEST_SELL&pload_file_type=category>>

Using this post-auth RCE in OFBiz demos, Harshit was able to get some AWS
credentials by uploading a webshell (based on [0]).
By security, it was then decided by the Infra and OFBiz security teams to shut
down the demos.

After discussing the elements reported with Mark J Cox (VP of ASF security team)
we in common decided that no CVE was necessary.
2020-12-01 10:16:04 +01:00
James Yong 283752fd26 Fixed: jquery.ui.datepicker-en.js does not exist (OFBIZ-12071)
Default language file specified for DateTime doesn't exist in the project i.e.
/common/js/jquery/ui/i18n/jquery.ui.datepicker-en.js

Changed to /common/js/jquery/plugins/datetimepicker/i18n/jquery-ui-timepicker-en.js
2020-11-28 21:26:47 +08:00
Deepak Dixit 9cf1d78555 Improved: Update IND Geo data as per 2020-11-24 notification (#240)
- Deletion of Union territory IN-DD, IN-DN;
- Addition of Union territory IN-DH;
- Correction of spelling for IN-AR, IN-BR, IN-CH, IN-CT, IN-DH, IN-GJ, IN-HP, IN-HR, IN-JH, IN-JK, IN-KA, IN-LA, IN-MH, IN-ML, IN-NL, IN-RJ, IN-TG, IN-TN, IN-UT;
2020-11-28 12:24:39 +05:30
James Yong bc5b0d595c Improved: Load language js for date.js only when required (OFBIZ-12064)
Tested on
1) date time field at /ordermgr/control/orderentry and
2) date find field at /ordermgr/control/findreturn
2020-11-27 21:51:35 +08:00
Jacques Le Roux 17de4f6e07 Improved: Added multiple "es" and "es-MX" values. Added Mexican Federal Holidays
Fixed: Mexican States Abbreviations

In GeoData_MX.xml abbreviations of the Mexican States were wrong and
"Mexico City" state was labeled as County, which is not.

In CommonUiLabels.xml and CommonEntityLabels.xml were added some missing values
to "es" and "es-MX" languages

In ServiceDemoData.xml were added the Mexican federal holidays under the
temporal expression "MX_FED_HOLIDAYS"

Thanks: Zottacko WallyMan
2020-11-18 17:05:41 +01:00
James Yong 0e40d9f091 Improved: Open Screen file from browser (OFBIZ-12038)
Allow the opening of screen definition that contributed to the web page from the browser. Command to open the file is set at widget.dev.cmd.openSourceFile.

Thanks Jacques for review.
2020-10-08 15:28:43 +08:00
James Yong 582e6c6ac9 Improved: Open FTL File from browser (OFBIZ-12018)
Comment + Rename method
2020-10-03 11:08:14 +08:00
Suraj Khurana acdddaf85c Improved: Corrected some spacing issues in code, where there are extra white spaces, this will fix some checkstyle issues in framework component.
(OFBIZ-12022)
2020-09-26 14:01:43 +05:30
James Yong 4b8dd2a06b Fixed: Open FTL File from browser (OFBIZ-12018)
Unable to open file in Windows

Thanks Jacques for reporting.
2020-09-25 22:44:46 +08:00
James Yong ad2e8de7c2 Improved: Open FTL File from browser (OFBIZ-12018)
Add function to open the corresponding FTL file with IDE
when the named border is clicked from browser.

Thanks Rishi and Jacques for review
2020-09-24 21:36:24 +08:00
James Yong 17e2ded1cc Improved: multi-block attribute for html-template tag (OFBIZ-11686)
Move getJs and js request mapping out of "AJAX events" comments block
2020-09-19 10:04:18 +08:00
Suraj Khurana 97b1688b0d Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in framework component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements. Thanks Jacques for review.
2020-09-12 12:05:16 +05:30
Suraj Khurana bc5e945ded Improved: Corrected line is longer than 150 characters checkstyle issues in framework component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:25:12 +05:30
Akash Jain 66a76ffd5a Improved: Fix Literals comparisons with variable to avoid NPE (OFBIZ-11929)
Thanks, Devanshu Vyas for your contribution.
2020-08-30 17:20:23 +05:30
Suraj Khurana f98f5ebb86 Improved: Added missing Javadocs for some methods, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
Also fixed some other checkstyle issues that requires re-factoring.
Thanks Jacques for review.
2020-08-28 16:54:15 +05:30
Jacques Le Roux 96be0c62a3 Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
All final data members of the class must match this naming pattern
'^[A-Z][A-Z0-9](_[A-Z0-9]+)$'

I added the changes in CommonScreens.xml and kept the
private static Map<String, String> localeFiles = new HashMap<>();
expression, instead of
private static Map<String, String> localeFiles = new HashMap<String, String>();
in JsLanguageFilesMapping.ftl

I note that we use JQuery instead of Java conventional Jquery but that sounds OK
with me

Thanks: Suraj for the patch
2020-08-27 19:10:08 +02:00
Jacques Le Roux 707acc7d27 Improved: makes the top comment more clear 2020-08-26 18:47:06 +02:00
Suraj Khurana f357b997c0 Improved: Corrected class names, method names, data members of class and variables names in framework component.
(OFBIZ-11926)
Also corrected some formatting and line length related checkstyle issues.
2020-08-26 21:40:40 +05:30
James Yong fd85450c4d Improved: multi-block attribute for html-template tag (OFBIZ-11686)
Not important to track server hits for getJs request
2020-08-25 21:59:46 +08:00
Pawan Verma 6cb67c1a40 Improved: Replace .size() == 0 with isEmpty() in Java files(OFBIZ-11944)
Thanks, priya for the report and patch and jacques for the review.
2020-08-22 19:17:10 +05:30
Suraj Khurana 9689201b84 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in framework component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:20:39 +05:30
Jacques Le Roux b80fc9075c Improved: Mark as deprecated ofbiz.locale.default and locale.properties.fallback properties (OFBIZ-11962)
It follows this dev thread: https://markmail.org/message/fzg7qrxgnxgbn65o

Also removes deprecation for EntityUtilProperties::getFallbackLocale
It was copied from UtilProperties::getFallbackLocale I guess
UtilProperties::getFallbackLocale is not deprecated and used in some place
2020-08-18 11:49:01 +02:00
Suraj Khurana 8c10d4ae72 Improved: Added missing Javadocs for some methods, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
This is done for framework component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:30:26 +05:30
James Yong 11e958ff8a Improved: multi-block attribute for html-template tag (OFBIZ-11686)
Return 404 response when getJs has no result.
Also remove script from cache after read by getJs.
2020-08-15 22:01:19 +08:00
Priya Sharma 3fe72d440f Improved: Remove unused imports from Java files (OFBIZ-11930) (#222)
Improved: Remove unused imports from Java files
(OFBIZ-11930)
Thanks: Priya Sharma
2020-08-06 19:51:09 +05:30
Suraj Khurana 33f05c1684 Improved: Corrected all redundant modifiers occurences in framework component. Also, fixed some other checkstyle line formatting and spacing issues.
(OFBIZ-11925)
2020-08-06 18:53:13 +05:30
Suraj Khurana 7d82b17c72 Improved: Corrected some line is longer than 150 characters checkstyle issues in framework component. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:11:40 +05:30
Jacques Le Roux be498295a5 Improved: Update build.gradle to the latest dependencies (OFBIZ-11603)
Fixes some new warnings coming from JUnit 4.13, a step ahead to JUnit 5.

I left 2 complicated ExpectedException  warnings. Change will be needed for JUnit 5.
https://www.luxoft-training.com/news/migrating-from-junit-4-to-junit-5-replacing-rules-with-the-extension-model-part-1/
2020-07-27 16:14:51 +02:00
Suraj Khurana d374019465 Improved: Corrected all incorrect indentation level issues in framework component, also fixed some case indentation checkstyle issues.
(OFBIZ-11922)
2020-07-26 21:04:41 +05:30
Suraj Khurana f4f2722d36 Improved: Updated case indentation to 0 for all switch statements in framework component. Also done formatting changes as per checkstyle best practices.
(OFBIZ-11904)
2020-07-25 13:50:37 +05:30
Suraj Khurana 7b251e43d9 Improved: Corrected some single line statements to fix checkstyle issues, also removed some remaining extra spaces from code to avoid checkstyle erros in framework component.
(OFBIZ-11886)
2020-07-21 12:25:20 +05:30
Suraj Khurana 8b1e0dbd85 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in framework component.
(OFBIZ-11887)
2020-07-18 12:26:42 +05:30
Jacques Le Roux 1d391df2f0 Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
At https://markmail.org/message/n76cchtriexxmgm7 I asked

Why having the ftl handlers only in webtools controller? BTW it makes the XSD
documentation awkward because it speaks about the ftl handlers being in
handlers-controller.xml
Why not using error.ftl in common-controller.xml instead of error.jsp?
Same question for plugins.

And answered

I believe we could change all that and definitely get rid of error.jsp
(error.ftl is already in all supported releases branches)
2020-07-15 20:58:16 +02:00
holivier 91fe7bf4cc Documented: Framework, delete all docbook files related to migration to
asciidoc
(OFBIZ-11587)

- common-sending-email: include in email
- datafile: move as a include at the end of entity-engine section
- entity-engine: list of link to OFBiz wiki about entity configuration
- service-engine: a link to OFBiz wiki Service Engine Guide
- webtools: help for main screen
- mini-lang: include a link to OFBiz wiki mini-lang-reference at the
beginning of minilang-to-groovy-manual
           move minilang-to-groovy-manual to Development environment
section
- unit-test: include as Junit test, and use README to list gradle
command available (so add a tag in REAME.adoc)
- base: add a link to OFBiz wiki Configuration Guide, in deployment
section
- SingleSignOn with LDAP: move to plugin LDAP and include in deployment
section
2020-07-14 17:04:36 +02:00