Commit Graph
54 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 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
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 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 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
Aditya Sharma b0dcf2929e Improved: Replace Inline js with External js in renderDateTimeField macro
(OFBIZ-9848)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851224 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 05:20:37 +00:00
Aditya Sharma 08fc69e679 Improved: Replace jQuery.bind() with jQuery.on()
(OFBIZ-10758)
As of jQuery 3.0, .bind() has been deprecated. It was superseded by the .on() method for attaching event handlers to a document.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850711 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 05:06:43 +00:00
Michael Brohl ae18673c40 Fixed: UI bug in scrum component
(OFBIZ-10676)

When editing product backlog items, inserted javascript code was
executed on the client side. The confirmational blinking of the newly 
added or changed value was implemented using the .html(value) function 
of jQuery. This causes the html to be interpreted and the script to be
executed. But the data is stored, converting it into html, so not 
considered to be a vulnerability.
The fix changes the call to .text. This prevents the html to be 
interpreted.

Thanks Benjamin Jugl for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848441 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 08:52:01 +00:00
Jacques Le Roux fbfa0daa5a Implemented: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

This uses a JWT Token authentication to get from one domain, where you are 
signed in, to another domain where you get signed in automatically. 
Something like ExternalLoginKey or Tomcat SSO, but not on the same domain.

In the example component, the FormWidgetExamples screen contains 2 new fields 
in the LinksExampleForm which demonstrate the use from a local instance to the
trunk demo instance.

A simple documentation is available in 
  framework\webapp\src\docs\asciidoc\_include\wa-cross-domains-SSO.adoc

Thanks: Taher for review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844880 13f79535-47bb-0310-9956-ffa450edef68
2018-10-26 09:32:46 +00:00
Deepak Dixit ef0c694a46 Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Replace text/javascript with application/javascript in all the script tag

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836886 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 10:51:52 +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
Jacques Le Roux 9d64d084d0 Improved: setLocaleFromBrowser should only called once by session
(OFBIZ-10471)

As Deepak mentioned in r1816537, currenlty setLocaleFromBrowser is called each 
time a page is refreshed.
We can use sessionStorage to have it called only once by session

Thanks: Deepak for reporting an issue which was boring me for long :)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835585 13f79535-47bb-0310-9956-ffa450edef68
2018-07-10 17:27:12 +00:00
Jacques Le Roux 5ed72f1e95 Improved: Replace Inline js with External js in renderFormClose macro
(OFBIZ-9846)

Replaced inline js from renderFormClose macro to external js in OfbizUtils.js
Done following:
Used custom data attributes: data-focus-field to define focus field for the form.
Used attribute selector to find elements and set focus on the particular field.

Added "requireValidation" class to all the forms with required fields.

Used the class selector to find such forms & attached Validator plugin to it.

Steps to verify:

At add ProdCatalog page: https://localhost:8443/catalog/control/EditProdCatalog

Dialogs:
New Example dialog on Find Example page 
    Go to Find Example page https://localhost:8443/example/control/FindExample
    Click on New Example button
    Validations should work in dialog on form submit.

Additional Changes:

Link for dialog in HtmlMenuMacroLibrary still had the inline code. 
Replaced the code with external js code.

Validations on forms rendered with renderSubmitField macro from 
HtmlFormMacroLibrary.ftl seems not working 
https://demo-trunk.ofbiz.apache.org/partymgr/control/NewEmployee, will create 
a separate ticket for it.

jleroux: 
I agree about NewEmployee issue
As mentionned Aditya themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl was
redundant, removed
I also removed commented out code in rainbowstone HtmlMenuMacroLibrary.ftl 
(left by Aditya while working on the issue I guess)

Thanks: Aditya 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832307 13f79535-47bb-0310-9956-ffa450edef68
2018-05-26 12:42:20 +00:00
Jacques Le Roux 94a5a2de98 Fixed: The getJSONuiLabel javascript function is no longer working
(OFBIZ-10277)

The data were well retrieve, but the syntax used to extract them was not working
 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826797 13f79535-47bb-0310-9956-ffa450edef68
2018-03-15 11:29:59 +00:00
Jacques Le Roux 329e86e312 Reverted: The getJSONuiLabel javascript function is no longer working
(OFBIZ-10277)

Damned I committed from another instance :/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826796 13f79535-47bb-0310-9956-ffa450edef68
2018-03-15 11:28:45 +00:00
Jacques Le Roux 9644cffa7c Fixed: The getJSONuiLabel javascript function is no longer working
(OFBIZ-10277)

The data were well retrieve, but the syntax used to extract them was not working
 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826793 13f79535-47bb-0310-9956-ffa450edef68
2018-03-15 10:57:45 +00:00