Commit Graph
69 Commits
Author SHA1 Message Date
James Yong d32814e5c8 Fixed: Incorrect date format in tooltip (OFBIZ-12123)
Tooltip should show the date format used by the picker.
2021-01-12 12:32:53 +08:00
James Yong 25adbd2088 Fixed: Date picker not initialised in ajax-called form (OFBIZ-12097)
Fixed regression. Manual entry is cleared after moving to next field.

Thanks: Olivier for reporting
2021-01-12 11:11:01 +08:00
James Yong cc90994a4f Add notes to js funcs 2020-12-20 15:01:09 +08:00
James Yong 483e77ea83 Fixed: Date picker not initialised in ajax-called form (OFBIZ-12097)
Use inline script when request is ajax
2020-12-20 08:46:52 +08:00
James Yong 71a0d6b4db Improved: Change inline style to class for wait-spinner (OFBIZ-12095)
Add code missed in earlier commit
2020-12-19 13:10:47 +08:00
James Yong 798822c94f Fixed: wait spinner doesn't show when running ajaxUpdateArea (OFBIZ-12094)
Use setTimeout() after running waitSpinnerShow() to ensure wait spinner icon is displayed properly.
2020-12-19 09:19:34 +08: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 0987c11ca7 Improved: Remove date.format-1.2.3-min.js (OFBIZ-12040)
This Javascript library is not use in the project.
2020-10-10 19:36:24 +08:00
James Yong 6fa16710bc Fixed: Open FTL File from browser (OFBIZ-12018)
Fix named border not properly clean up.
2020-10-03 17:51:15 +08:00
James Yong 10fbedbce0 Fixed: Open FTL File from browser (OFBIZ-12018)
Not able to open source file when clicking on named border in ecomseo landing page

Thanks Jacques for reporting
2020-10-02 20:33:44 +08:00
James Yong c911019856 Improved: Open FTL File from browser (OFBIZ-12018)
Better usability when clicking on named border
2020-09-28 21:50:01 +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 814d95afc8 Fixed: Show border and file name for content rendered from ftl (OFBIZ-12002)
Fixed some other named borders not removed +
Only increase z-index for the border labels
2020-09-21 14:45:00 +08:00
James Yong 26fcfd180b Fixed: Show border and file name for content rendered from ftl (OFBIZ-12002)
Unable to add internal organization in HR tree

Thanks Olivier for reporting
2020-09-21 14:23:36 +08:00
James Yong b18dd6a9ce Improved: Show border and file name for content rendered from ftl (OFBIZ-12002)
To reduce the need to view the page source from the browser.
Activated when print.verbose=true and widget.verbose=true.

Thanks: Jacques for review
2020-09-12 20:10:08 +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
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 90e43c9713 Improved: Replace Mask Js (OFBIZ-11964)
Replace library from
https://github.com/igorescobar/jQuery-Mask-Plugin
to
https://github.com/RobinHerbots/Inputmask

Tested at
https://localhost:8443/example/control/FormWidgetExamples
2020-08-19 08:37:39 +08:00
James Yong 7322abbcbe Improved: Move page-specific script links to html template (OFBIZ-11799)
refactoring
2020-08-17 20:45:47 +08:00
James Yong 0c2c3d4cb9 Improved: Move page-specific script links to html template (OFBIZ-11799)
importLibrary function to check for local environment before setting crossDomain.
2020-08-17 13:02:41 +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 39c1e280f9 Improved: Move page-specific script links to html template (OFBIZ-11799)
refactoring +
importLibrary function to use crossDomain = true to allow js file to be shown under browser's sources folder
2020-08-16 18:05:32 +08:00
James Yong 55df1c7db0 Improved: Move page-specific script links to html template (OFBIZ-11799)
Use importLibrary js function to load elrte js and css
Tested on
https://localhost:8443/content/control/findForumMessages?forumGroupId=WebStoreFORUM&forumId=10000
https://localhost:8443/content/control/WebSiteCms?webSiteId=CmsSite
2020-08-16 14:35:35 +08:00
James Yong c4b5407eb2 Improved: Move page-specific script links to html template (OFBIZ-11799)
Created new importLibrary js function to load OpenLayer js and css
Tested on
https://localhost:8443/example/control/ExampleGeoLocationPointSet4
https://localhost:8443/example/control/ExampleOsmGeoLocationPointSet4
2020-08-15 11:57:58 +08:00
Jacques Le Roux 4c82aba030 Improved: Add missing map for minified OpenLayers js and css (OFBIZ-11883)
Finally removes ol.js.map and references to it because it does not help due to
concatenations of multiple files in the multi mb source distribution.

Thanks: Alex Bodnaru for inquiry
2020-07-21 20:24:24 +02:00
Jacques Le Roux 8dc3609cbd Improved: Add missing map for minified OpenLayers js and css (OFBIZ-11883)
Downloaded from
https://github.com/openlayers/openlayers/releases/download/v5.3.0/v5.3.0-dist.zip

Thanks: Alex Bodnaru
2020-07-17 07:52:31 +02:00
Jacques Le Roux 782798a993 Improved: Adds missing jGrowl map file (OFBIZ-11892)
Picked from
https://cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.4.6/jquery.jgrowl.map

Thanks to Alex Bodnaru
2020-07-16 14:55:07 +02: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
Jacques Le Roux 062fc40579 Fixed: CommonTheme has a dependency on Flatgrey application.js
(OFBIZ-11466)

In theme.xml of common-theme there is a reference to application.js residing in
the Flatgrey theme. This should not be. The file should be in common-theme.

Thanks: Pierre Smits for report and fix. I have just also removed
rainbowstone/js/application.js since it's now in common-theme
2020-03-21 11:31:55 +01:00
Jacques Le Roux c34491892a Improved:
Implemented:
Documented:
Completed:
Reverted:
Fixed:
Improved: no functional change
(OFBIZ-)
Explanation
Thanks:
2020-02-27 14:36:26 +01:00
Jacques Le Roux 350c71f4df Fixed: setUserTimeZone should ran only once based on error
(OFBIZ-11329)

This will be notably useful when committing CSRF solution as explained in
OFBIZ-11306:

SetTimeZoneFromBrowser when starting gives a  RequestHandlerException:
Invalid or missing CSRF token for AJAX call to path '/SetTimeZoneFromBrowser'.
Also not only when starting.

Thanks: James Yong for review
2020-02-05 09:30:55 +01:00
Jacques Le Roux 28b658e260 Improved: Equivalent of svn:auto-props properties on the server
(OFBIZ-OFBIZ-11279)

As explained at https://s.apache.org/i86ht

This is needed after b424d2683e
2019-12-19 13:19:59 +01:00
Jacques Le Roux 835e8880d1 Saving files before refreshing line endings 2019-12-19 13:18:30 +01:00
Jacques Le Roux 232862965e Fixed: Fix multi modal opening
(OFBIZ-11211)

Simplifies a little bit the current code.

Thanks: Leila for patch and Carl for confirmation

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868615 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 08:12:07 +00:00
Jacques Le Roux 400450e238 Fixed: Fix multi modal opening
(OFBIZ-11211)

The issue is that when closing the modal the div inside html dom is not removed. 
Then opening a second time create another identical div. Since a lookup is based 
on an unique id, this id is no more unique...

Thanks: Carl Demus

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867577 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 14:41:50 +00:00
Nicolas Malin e0d640a375 Fixed: Send upload form with even-update-area doesn't work
(OFBIZ-11207)
When you create a xml form with upload as type, you can't use on-event-update-area element to submit it by ajax.
Otherwise, OFBiz return an error message on 'uploadFile is empty.
To solve it, we analyze the enctype's form before submit it to move on FormData instead a direct serialize [1]

example form where the problem has been present
****
    <form name='AddNicelyFile' type='upload' target='CreateNicelyFile'>
        <field name='uploadedFile' title='File'><file/></field>
        <field name='addButton'><submit/></field>
        <on-event-update-area event-type='submit' area-id='window' area-target='FileDisplaying'/>
    </form>
****

Thanks to Samuel Tregouet for this fix

[1] https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867435 13f79535-47bb-0310-9956-ffa450edef68
2019-09-24 08:51:27 +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
Jacques Le Roux 2185b37331 Fixed: Unknown request [images]; this request does not exist or cannot be
called directly.
(OFBIZ-10895)

Today Olivier reported directly to me that there was an issue in HR:
<<If you go to humanres, at the level of the tree that appears the icons to expand 
the tree no longer appear (but you can click...)
This is due to the path of the d.png image which is wrong in the css file 
(there is too much image in the path)>>

I should have seen it because the d.png file is, with other related image files,
in the same directory than style.css. And there was an inconsistency in the
style.css files regarding the d.png file path.

We should note that we have still this error in log:
2019-07-22 16:25:26,275 |jsse-nio-8443-exec-7 |ControlServlet                
|E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request [d.png]; 
this request does not exist or cannot be called directly.
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest
(RequestHandler.java:277) ~[ofbiz.jar:?]

As I wrote in my last commit for OFBIZ-10895:
The only safe way to go is to not only check the error log for 
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log.

Some error appears before the user is logged in, as I wrote in the Jira:
<<I noticed that this error message often appears before login. A 404 can be 
seen in the access log and then once logged the issue no longer exists 
(ie we get a 200). I have no yet investigated why...>>

Nevertheless, I want to remove this misleading error message. I hope I'll do 
that before forgetting.

Thanks: Olivier Heintz 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863560 13f79535-47bb-0310-9956-ffa450edef68
2019-07-22 15:21:14 +00:00
Jacques Le Roux c80528518b Fixed: Unknown request [images]; this request does not exist or cannot be
called directly.
(OFBIZ-10895)

I was wrong doing massive changes w/o close control. 
I decided to revert the r1859576 and r1859807 commits and to backport the revert

The only safe way to go is to not only check the error log for 
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860526 13f79535-47bb-0310-9956-ffa450edef68
2019-06-02 13:10:36 +00:00
Jacques Le Roux 323f5ffdec Fixed: Unknown request [images]; this request does not exist or cannot be called
directly.
(OFBIZ-10895)

This should be the last commit, but I can't be sure. So I'll continue to 
monitor the demos logs...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859807 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:41:59 +00:00
Jacques Le Roux 282270d9ad Fixed: Unknown request [images]; this request does not exist or cannot be
called directly.
(OFBIZ-10895)

This error happens in many occasions:
Inside another request (eg LookupProduct)
Of after a request (eg login)

It shows only in log and have no effect on UI. Notably the new feature normally 
showing an error message in trunk (OFBIZ-10753) does not shows

It happens in all supported releases. IIRW it always happened, only URLs like 
https://demo-trunk.ofbiz.apache.org/images/defaultImage.jpg work. 
But here it's different because we don't need to call 
https://demo-trunk.ofbiz.apache.org/images by hand to get the issue in log.

So it's not very bad since it's has no side effects, just weird and annoying. 
Because it might hide something undetected yet...

This issue does not appear in R15, a good place to test is for instance 
ordermgr/control/request. 
There cal.gif is called by /images/cal.gif and it works (the images appears) 
but in more recent versions the call is also done to 
/ordermgr/control/images/cal.gif where it fails. 
This 1st appears in ControlFilter in the stack trace.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a 1st commit for the errors I already reported and I'm sure about

Thanks: Deepak 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858444 13f79535-47bb-0310-9956-ffa450edef68
2019-04-30 16:23:56 +00:00
Aditya Sharma b112049a5d Improved: Replace Inline js with External js in renderDropDownField macro.
(OFBIZ-9849)
Silghtly modified patch as Specify-other Dropdown field were not working. Refactored code in combobox.js file
Thanks Dhaval Wagela for the initial patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856610 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 07:12:36 +00:00
Jacques Le Roux ee75d89772 Improved: Browser Unresponsive when Loading Entity with Large Results
(OFBIZ-10716)

I came across a situation where an entity was taking too much of a time 
(browser asked me to either wait or kill) while loading/searching results in the 
Webtools application. The entity had close to 5M records, and I checked the 
server responded timely but the rendering of the screen was taking time.

When I explored the issue I came across a macro which renders the pagination on the screen, and it had a code block which was causing the screen rendering delay.

<#assign x=(listSize/viewSize)?ceiling>
  <#list 1..x as i>
    <#if i == (viewIndex+1)><option selected="selected" value="<#else><option value="</#if>${i-1}">${i}</option>
  </#list>

This code seems logical enough to me, and what I gather from this is that the 
list will render a select box with 250,000 options.

I like propose a change in this UI/UX from select box to an input text box so an 
user can navigate to any page, similar to a navigation input box in a PDF 
document reader application.

Thanks: Devanshu Vyas for the patch, Nicolas for discussion and Kumar Rahul for
testing

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856145 13f79535-47bb-0310-9956-ffa450edef68
2019-03-24 13:12:12 +00:00
Michael Brohl 1a196b977f Fixed: Error parsing JWT
(OFBIZ-10814)

Fixes incorrect retrieval of the Authorization header JWT token. 
Fixes wrong API usage for the key parameter which assumed the key is
provided in BAS64 format.
Refactored the code to use helper methods for key and auth header 
retrieval.
Javadoc corrections and enhancements.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852882 13f79535-47bb-0310-9956-ffa450edef68
2019-02-04 09:22:19 +00:00
Jacques Le Roux be5a4fd807 Fixed: Implemented: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

Non functional change

Removes now useless "webappName" var after I put in the SecuredUserLoginId 
cookies.

Thanks: Michael for spotting it in OFBIZ-10814

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851885 13f79535-47bb-0310-9956-ffa450edef68
2019-01-23 07:14:21 +00:00
Aditya Sharma 5c3e72c517 Improved: Replace Inline js with External js in renderTextField macro
(OFBIZ-9844)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851500 13f79535-47bb-0310-9956-ffa450edef68
2019-01-17 08:32:56 +00:00
Aditya Sharma 3cbf90302c Improved: Replace Inline js with External js in renderFieldGroupOpen macro
(OFBIZ-9853)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851433 13f79535-47bb-0310-9956-ffa450edef68
2019-01-16 11:49:11 +00:00