Commit Graph
26 Commits
Author SHA1 Message Date
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 e405d35c08 Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load locale-specific datepicker js.
Corrected locale naming in macro to use '.locale'.
Tested page at /ordermgr/control/findreturn and /ordermgr/control/orderentry.
2020-12-05 23:23:04 +08:00
James Yong a3fbb66479 Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load time-related js and css for date time picker.
Tested page at /ordermgr/control/findreturn and /ordermgr/control/orderentry
2020-11-30 10:29:08 +08:00
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
James Yong 840315781a Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load jeditable js
Tested page at example/control/authview/findExampleAjax
2020-09-01 22:10:37 +08:00
James Yong fc44f9ce3b Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load fjTimer/jquerytimer-min.js
Tested on /partymgr/control/viewprofile?partyId=DemoEmployee
2020-08-30 21:25:10 +08:00
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
James Yong b480426e10 Improved: Move page-specific script links to html template (OFBIZ-11799)
use importLibrary js function to load impersonate.css
2020-08-21 15:13:35 +08:00
James Yong 149e90e608 Improved: Move page-specific script links to html template (OFBIZ-11799)
use importLibrary js function to load moment js.
2020-08-19 10:17:51 +08:00
James Yong 06b4333c54 Improved: Move page-specific script links to html template (OFBIZ-11799)
refactoring +
use importLibrary js function to load readmore and jgrowl js.
2020-08-16 19:22:18 +08:00
James Yong aaa5d9e9a5 Improved: Move page-specific script links to html template (OFBIZ-11799)
Moved OpenLayer js and css to html template
Tested on https://localhost:8443/partymgr/control/PartyGeoLocation?partyId=DemoCustomer
2020-08-13 22:16:33 +08:00
James Yong d5140ca65d Improved: Move page-specific script links to html template (OFBIZ-11799)
Moved select2 script and link tags to html template when multi-block=true.
select2 language js will be auto added by MultiBlockHtmlTemplateUtil#addLinksToLayoutSettings

Tested on
https://localhost:8443/example/control/FormWidgetExamples

https://localhost:8443/ordermgr/control/FindRequest
2020-08-06 22:39:59 +08:00
Aditya Sharma 54307be1c2 Fixed: Check embedded Javascript libs vulnerabilities using retire.js (OFBIZ-11752)
* Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-11752)

Upgraded jQuery to 3.5.2 and jQuery migrate to 3.3.0 to vulnerabilities of medium severity
Regex in its jQuery.htmlPrefilter sometimes may introduce XSS; https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/

* Fixed: console error TypeError: document is undefined
(OFBIZ-11752)

As the document object was not passed to the IFFE call for the FORMALIZE function, it gives console error for the missing document object when accessed
2020-06-09 15:29:09 +05:30
James Yong e675f0a79f Improved: Apply multi-block attr to each application (OFBIZ-11706)
1. Fix missing Boundary Comment at beginning
2. Apply multi-block attr
2020-05-22 00:54:20 +08:00
James Yong ac541342ae Improved: Apply multi-block attr to each application (OFBIZ-11706)
Revert regression for showHelp.
2020-05-21 00:07:36 +08:00
James Yong 591b0442c7 Improved: Apply multi-block attr to each application (OFBIZ-11706)
For Webtools, Themes.
2020-05-15 21:25:12 +08:00
Michael Brohl bb698b9b96 Implemented: Remove the user login security question.
(OFBIZ-11244)

Thanks Wiebke Pätzold for providing the patch.
2020-03-13 17:31:49 +01:00
Jacques Le Roux 7d7a441715 Fixed: Any ecommerce user has the ability to reset anothers password
(including admin) via "Forget Your Password"
(OFBIZ-4361)

Currently, any user (via ecommerce "Forget Your Password") has the ability to 
reset another users password, including "admin" without permission.  
By simply entering "admin" and clicking "Email Password", the following is 
displayed:

The following occurred:
A new password has been created and sent to you. Please check your Email.

This now forces the user of the ERP to change their password.  
It is also possible to generate a dictionary attack against ofbiz because there 
is no capta code required.  This is serious security risk.

I have modified the patch following comments I made in the Jira, notably
  Removed unused Java variables
  Removed a check in LoginEvents::forgotPassword which prevented to show error
    messages
  Changed fr and en SecurityExtPasswordSentToYou 
    + SecurityExtThisEmailIsInResponseToYourRequestToHave labels 
    + template PasswordEmail.ftl
    + loginservices.token_incorrect labels
  Added fr and en SecurityExtIgnoreEmail + SecurityExtLinkOnce labels
  Removed changes in general.properties
  I did not remove the 2 GetSecurityQuestion.ftl files (webpos one was still in)

There is still room for improvement. I'll discuss them on the Jira and dev
ML. But this version is already strong enough to not wait that the patch is 
inapplicable!

Thanks: mz4wheeler (Mike Z) for the Jira, Nicolas Malin for the patch, I guess 
with some Gil's help, and all others for comments and ideas

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866478 13f79535-47bb-0310-9956-ffa450edef68
2019-09-05 15:56:46 +00:00
Aditya Sharma efc1ae1303 Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-10678)
1. For solving CVE-2019-11358, upgraded jQuery to 3.4.1
2. Replaced library Fancybox with Featherlight. Added custom css so that cursor for links becomes pointer
Thanks Jacques Le Roux for the reviews

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863838 13f79535-47bb-0310-9956-ffa450edef68
2019-07-27 06:43:12 +00:00
Aditya Sharma 13fdebf7db Improved: Replace document.write() occurrences with some legitimate code
(OFBIZ-10759)
Removed js code and added Js files in LookupDecorator.
Added Js library files as there were some errors in console logs

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855083 13f79535-47bb-0310-9956-ffa450edef68
2019-03-09 06:27:29 +00:00
Michael Brohl 0757453d77 Fixed: Update and fix openstreetmap.org integration.
(OFBIZ-10553)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847710 13f79535-47bb-0310-9956-ffa450edef68
2018-11-29 10:43:47 +00:00
Gil Portenseigne a61c98775f Implemented : Impersonation of userLogin feature
(OFBIZ-10515)

Introduce a new feature that allow the impersonation of a login by an authorized user.
Add the documentation with all the details in security-impersonation.adoc.
Big thanks to Leila, Nicolas and Jacques for your contribution to this implementation.
Big thanks to Mathieu, Jacques, Pierre and Taher for your remarks and reviews that
improved this contribution quality. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1842110 13f79535-47bb-0310-9956-ffa450edef68
2018-09-27 16:01:35 +00:00
Julien Nicolas 9a4bda3f27 Improve: Change the uggly favicon with the new one ! | Using new OFBiz logo
(OFBIZ-10522)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838074 13f79535-47bb-0310-9956-ffa450edef68
2018-08-15 09:15:13 +00:00
Jacques Le Roux b4ad57201f Improved: Rename the misnamed setUserLocale.js to setUserTimeZone.js
(OFBIZ-10472)

At the same time renames setLocaleFromBrowser to SetTimeZoneFromBrowser 
everywhere it's needed
And adds a documentation about the auth mismatch as suggested by Mathieu

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835628 13f79535-47bb-0310-9956-ffa450edef68
2018-07-11 11:16:07 +00:00
Michael Brohl e20665a2fd Fixed: Theme screens do not load properly
(OFBIZ-10276)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826680 13f79535-47bb-0310-9956-ffa450edef68
2018-03-13 20:21:55 +00:00
Taher A. Alkhateeb bf25f54b0f Implemented: renamed the common theme directory from "common" to "common-theme"
(OFBIZ-10175)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821789 13f79535-47bb-0310-9956-ffa450edef68
2018-01-21 12:40:46 +00:00