Commit Graph
1088 Commits
Author SHA1 Message Date
Michael Brohl 69c62f5f00 Merge changes for PR #267 due to conflicting changes in trunk (OFBIZ-12169) 2021-02-15 17:15:18 +01:00
Jacques Le Roux a2dac5482c Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
[...] having more important apps in 1st places would be better [...]
the feature should be easily changed by custom projects [...]
documentation for that would be enough.

This 1st step sorts the applications and webtools. I believe webtools should not
be secondary but that needs to be discussed with other options.
2021-02-14 21:11:58 +01:00
Wiebke Pätzold 2fe5e15a83 Improved: Adds newline at the end of file (OFBIZ-12169) 2021-02-08 16:31:13 +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
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
holivier 4a41f0fde5 Documented: migration to help system using asciidoc files (OFBIZ-11587)
commit correction for <Remove all related help docbook files>
* reAdd a contentDocData for main contentId and portletCategory
* remove from ofbiz-component of each application line about helpData which are removed
2020-10-27 11:20:09 +01:00
holivier 9eaf180a4b Documented: migration to help system using asciidoc files
(OFBIZ-11587)

Add <set field=helpAnchor... in CommonScreens for application where it's
not present. With this commit all OFBiz application help go to the html
generated from asciidoc files
2020-09-28 15:15:04 +02:00
Jacques Le Roux f1b88bd84b Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
Better use Debug.logVerbose in place where I replaced missing expression with
another varation of Debug.log. We mainly don't need these information, it's only
for Checkstyle.

I thought did not replace cases where using another variation makes sense
2020-09-21 10:45:03 +02:00
Jacques Le Roux 346c63bfdf Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
We have a lot of "do nothing" in Java code. In case of catch we should at least
have Debug.logError(e, MODULE); and maybe an explanation in the comment.
2020-09-15 15:24:45 +02:00
Suraj Khurana 0af165fb08 Improved: Added missing Javadocs for remaining methods in applications component, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
Thanks Jacques for review.
2020-09-13 11:29:10 +05:30
Suraj Khurana b3fcbeedba Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in applications component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements. Thanks Jacques for review.
2020-09-12 12:09:03 +05:30
Suraj Khurana 5f021ce06b Improved: Corrected line is longer than 150 characters checkstyle issues in applications component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:24:14 +05:30
Suraj Khurana ca9fa4fba4 Improved: Corrected line is longer than 150 characters checkstyle issues in framework and applications component.
(OFBIZ-11921)
Also fixed some extra spaces and naming conventions related checkstyle issues.
Thanks Jacques for review.
2020-08-31 19:54:54 +05:30
Suraj Khurana 371aab1e5b Improved: Corrected class names, method names, data members of class and variables names in application components.
(OFBIZ-11926)
Also corrected some formatting and line length related checkstyle issues.
2020-08-26 21:37:41 +05:30
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 d74742d730 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in applications component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:00:17 +05:30
Suraj Khurana 413e0ec3ec 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 applications component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:25:56 +05:30
Suraj Khurana dd1af9f358 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-08-06 18:47:12 +05:30
Suraj Khurana 6ca9bf3102 Improved: Corrected all redundant modifiers occurences from applications component. Also, fixed some other checkstyle line formatting and spacing issues.
(OFBIZ-11925)
2020-08-06 16:52:22 +05:30
Akash Jain ea37e0fed3 Improved: Status ID checkbox for FindWorkEffort, FindProductionRun and FindShipment forms (OFBIZ-11939) 2020-08-03 16:22:26 +05:30
Suraj Khurana c6399ef668 Improved: Corrected some line is longer than 150 characters checkstyle issues in applications component. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:14:20 +05:30
Suraj Khurana 3929ff1bd7 Improved: Corrected all incorrect indentation level issues in application component, also fixed some case indentation checkstyle issues.
(OFBIZ-11922)
2020-07-26 20:25:35 +05:30
Jacques Le Roux 077625c5a6 Fixed: Unable to create event in SFA component (OFBIZ-9901)
The tests failed because CAL_OWNER instead of CONTACT was necessary
2020-07-25 19:18:45 +02:00
Aditya Sharma 6804a9dac3 Fixed: Unable to create event in SFA component (OFBIZ-9901)
When creating event for the party other than the loggedin user, the party should be in CAL_OWNER role to be added to event. Added appropriate check in service along with the error message.
Thanks Rubia Elza Joshep for reporting the issue and Aditi Patidar for providing the patch
2020-07-25 18:48:39 +05:30
Suraj Khurana df21972eed Improved: Updated case indentation to 0 for all switch statements in applications component. Also done formatting changes as per checkstyle best practices.
(OFBIZ-11904)
2020-07-25 13:53:10 +05:30
Suraj Khurana c20b03eca1 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-07-21 12:22:39 +05:30
Suraj Khurana 038d46e51d Improved: Corrected some single line statements to fix checkstyle issues, also removed some remaining extra spaces from code to avoid checkstyle erros in applications component.
(OFBIZ-11886)
2020-07-21 12:22:02 +05:30
Jacques Le Roux 2d7c533e34 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes all error*.jsp reference, no longer used
2020-07-20 19:27:00 +02:00
Suraj Khurana 0524945bda Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in applications component.
(OFBIZ-11887)
2020-07-18 12:15:16 +05:30
Jacques Le Roux 2585cadd33 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes ashes in web.xml files
2020-07-17 08:08:19 +02:00
holivier 28e82c217b Documented: Workeffort migration to asciidoc
(OFBIZ-11587)

deleted related docbook file
2020-07-14 16:25:04 +02:00
holivier f4d01e8610 Documented: Workeffort migration to asciidoc
(OFBIZ-11587)

only one file about portlet-calendar, currently not include in a
document
2020-07-14 16:22:36 +02:00
Suraj Khurana 2d01d722e6 Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in applications component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:15:34 +05:30
Suraj Khurana bdc8c73fd8 Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for applications component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.
'{' is not followed by whitespace.
'}' is not followed by whitespace.
'}' is not preceded with whitespace.
'typecast' is not followed by whitespace.
'try' is not followed by whitespace.
';' is preceded with whitespace.
2020-07-11 14:29:35 +05:30
Suraj Khurana 82ce4304ae Improved: Corrected all checkstyle issues related to succeeding space for comma in applications directory.
(OFBIZ-11805)
Thanks Jacques and Ritesh Kumar for review.
2020-07-09 11:59:51 +05:30
Suraj Khurana 749d4d6d94 Improved: Corrected remaining ', is not followed by whitespace' checkstyle errors in framework component.
(OFBIZ-11805)
2020-07-07 15:25:15 +05:30
Pawan Verma f0af2894e5 Improved: Merge identical catch blocks in single catch block(OFBIZ-11827)
In Java SE 7 and later, a single catch block can handle more than one type of exception. This feature can reduce code duplication and lessen the temptation to catch an overly broad exception.

Thanks: Jacques for the review.
2020-06-27 11:23:12 +05:30
Suraj Khurana 5e7193f5a8 Improved: Changed resources with proper naming convention in all application components.
(OFBIZ-11739)
Also, made MODULE as private data member of class instead of public. This will reduce checkstlye issues. Thanks Jacques for review.
2020-05-29 13:19:05 +05:30
Suraj Khurana 8bdb6c9985 Improved: Make shipment services loosely coupled with work-effort generation. (#132)
* Improved: Make shipment services loosely coupled with work-effort generation.
(OFBIZ-11678)
Removed workeffort generation related code in separate service, in createShipment and updateShipment service. In this effort, createShipment has been successfully changed to entity-auto as well.
Thanks: Pierre Smits and Arun Patidar for discussion and review.
2020-05-23 15:26:26 +05:30
Suraj Khurana 9913e566cc Improved: Called service directly instead of simple methoda call as service has been changed to entity-auto. (#142)
(OFBIZ-11616)
Also, updated time sheet related test data as timesheet status should be appropriate before updating or deleting.
2020-05-16 14:52:12 +05:30
Suraj Khurana c7ae78d551 Improved: Converted all Timesheet related CRUD services from simple to entity-auto (#88)
* Improved: Converted all Timesheet related CRUD entities from simple to entity-auto
(OFBIZ-11616)
2020-05-16 13:46:12 +05:30
Suraj Khurana 1a45f2ff71 Improved: Converted WorkEffort related services from simple to entity-auto. (#135)
(OFBIZ-11690)
2020-05-16 10:17:32 +05:30
Suraj Khurana 0393ebe994 Fixed: testIntegrations caused due to invalid cust request status 'CRQ_SUBMITTED', so loaded QuoteTestData.xml with proper status before executing CustRequestTests. Also fixed default dateValue for nowTimestamp as in case of overrided fromDate, entity-auto doesn't take care of it.
Thanks: Jacques Le Roux for reporting.
2020-05-06 12:16:12 +05:30
Suraj Khurana cb4ca226f0 Improved: Converted all TimeEntry related CRUD services from simple to entity-auto (#99)
(OFBIZ-11624)
Also, removed unused services named unlinkInvoiceFromTimeEntry, whcih simply clears TimeEntry field, so used updateTimeEntry instead.
2020-05-04 10:42:26 +05:30
Suraj Khurana 0f56568bc1 Improved: Converted all TimesheetRole related CRUD services from simple to entity-auto (#90)
* Improved: Converted all TimesheetRole related CRUD services from simple to entity-auto
(OFBIZ-11617)
2020-05-02 12:58:35 +05:30
Jacques Le Roux ddb8f4273a Improved: replaces module by MODULE everywhere 2020-04-05 19:46:34 +02:00
Jacques Le Roux 369d5f6c95 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

As reported by OWASP ZAP:
A cookie has been set without the SameSite attribute, which means that the
cookie can be sent as a result of a 'cross-site' request. The SameSite attribute
is an effective counter measure to cross-site request forgery, cross-site script
inclusion, and timing attacks.

The solution was not obvious in OFBiz for 2 reasons:

1. There is no HttpServletResponse::setHeader. So we need to use a filter
  (SameSiteFilter) and even that is not enough because of 2:
2. To prevent session fixation we force Tomcat to generates a new jsessionId,
ultimately put in cookie, in LoginWorker::login. So we need to add a call to
SameSiteFilter::addSameSiteCookieAttribute in
UtilHttp::setResponseBrowserDefaultSecurityHeaders.
2020-03-20 17:50:17 +01:00
Michael Brohl 0ddef5dad7 Improved: Remove unnecessary header-row classes in Upcoming.ftl
(OFBIZ-11305)

Thanks Dennis Balkir for reporting an providing the patch.
2020-01-30 21:19:03 +01:00
James Yong 05ffbd2817 Improved: Add 'controlPath' attribute to 'ofbizUrl' freemarker macro
(OFBIZ-11317)

Adding the controlPath attribute to allow the controls by ofbizUrl to support uri to other OFBiz web application.

Thanks: Jacques for the review
2020-01-12 22:25:50 +08:00