[ 
https://issues.apache.org/jira/browse/OFBIZ-9978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16257215#comment-16257215
 ] 

Aditya Sharma edited comment on OFBIZ-9978 at 11/19/17 6:21 AM:
----------------------------------------------------------------

I propose migration with following steps:
* Upgrade JQuery 1.11.0 to 3.2.1
  * Remove JQuery 1.x & JQuery migrate 1.x
  * Add JQuery 3.2.1 & JQuery migrate 3.0.0
  * Rectify any broken code and plugin
* Upgrade all the JQuery plugins to latest
* Remove JQuery migrate 3.0.0 & rectify any broken code

Here is the first patch with Jquery upgrade from 1.11.0 to 3.2.1 with following 
changes:
* Removed JQuery 1.11.0 & JQuery migrate 1.2.1
* Added JQuery 3.2.1 & JQuery migrate 3.0.0
* Added JQuery Browse Plugin https://github.com/gabceb/jquery-browser-plugin 
The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed 
in 1.9. http://api.jquery.com/jQuery.browser/
It is recommended to use Modernizr https://modernizr.com/docs
We can remove it & refactor code later

* Upgraded JQuery Validation Plugin 1.11.0 to 1.17.0 
https://jqueryvalidation.org/ 
https://github.com/jquery-validation/jquery-validation
 * Upgraded JQuery Form Plugin version: 2.87 (20-OCT-2011) to 4.2.2 
http://malsup.com/jquery/form/  https://github.com/jquery-form/form 
 * Upgraded MockJax - jQuery Plugin to Mock Ajax requests 1.4.0 to 2.2.1 
https://github.com/jakerella/jquery-mockjax
 Messages_en.js, Messages_cn.js, Messages_se.js, Messages_tw.js and 
Messages_uq.js manually updated these files with new changes as are not present 
in JQuery Validation Plugin package
Converted file additional-methods.js and validate.js from dos to unix text 
using dos2unix https://sourceforge.net/projects/dos2unix/ 
As was getting error while adding files:
/ofbiz-framework/themes/common/webapp/common/js/jquery/plugins/validate/additional-methods.js'
 has inconsistent newlines
svn: E135000: Inconsistent line ending style
svn: E200042: Additional errors:

Verify:
https://localhost:8443/catalog/control/CreateProductFeature
https://localhost:8443/catalog/control/EditProduct

* Upgraded Fancybox 1.3.4 (11/11/2010) to v3.2.3  http://fancybox.net/ 

Verify:
https://localhost:8443/example/control/ListVisualThemes Click on image

* Verified all other plugins
# Query Timepicker 
https://localhost:8443/ordermgr/control/ListQuoteRoles?quoteId=CQ0001
# jGrowl Success and Error Messages on all the pages
# jsTree https://localhost:8443/humanres/control/main
# Readmore Steps in OFBIZ-9915 When success or error message are large. 
Readmore is used.
# jQuery UI  Used throughout OFBiz
# Elrte 
[#https://localhost:8443/content/control/findForumMessages?forumGroupId=WebStoreFORUM&forumId=ASK
 ]
Steps:
1. Go to Content component (https://localhost:8443/content/control/main ).
2. Click on Forum from submenu 
(https://localhost:8443/content/control/findForumGroups ).
3. Click on forums link under Select column 
(https://localhost:8443/content/control/findForums?forumGroupId=WebStoreFORUM )
4. Click on messages link under Select column 
(https://localhost:8443/content/control/findForumMessages?forumGroupId=WebStoreFORUM&forumId=ASK
 )
# Asm Select https://localhost:8443/example/control/FormWidgetExamples 
(Multiple drop-downs) 
# Jquery hotkeys https://localhost:8443/webpos/control/main 
# Jeditable https://localhost:8443/example/control/authview/findExampleAjax 
(Name field is click and edit)
# Jquery Mask  https://localhost:8443/example/control/FormWidgetExamples (Mask 
Field) 
# Jquery flot  https://localhost:8443/example/control/ExampleBarChart 
# jCarousal Couldn't find use.


was (Author: aditya.sharma):
I propose migration with following steps:
* Upgrade JQuery 1.11.0 to 3.2.1
  - Remove JQuery 1.x & JQuery migrate 1.x
  - Add JQuery 3.2.1 & JQuery migrate 3.0.0
  - Rectify any broken code and plugin
* Upgrade all the JQuery plugins to latest
* Remove JQuery migrate 3.0.0 & rectify any broken code

Here is the first patch with Jquery upgrade from 1.11.0 to 3.2.1 with following 
changes:
* Removed JQuery 1.11.0 & JQuery migrate 1.2.1
* Added JQuery 3.2.1 & JQuery migrate 3.0.0
* Added JQuery Browse Plugin https://github.com/gabceb/jquery-browser-plugin 
The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed 
in 1.9. http://api.jquery.com/jQuery.browser/
It is recommended to use Modernizr https://modernizr.com/docs
We can remove it & refactor code later

* Upgraded JQuery Validation Plugin 1.11.0 to 1.17.0 
https://jqueryvalidation.org/ 
https://github.com/jquery-validation/jquery-validation
 - Upgraded JQuery Form Plugin version: 2.87 (20-OCT-2011) to 4.2.2 
http://malsup.com/jquery/form/  https://github.com/jquery-form/form 
 - Upgraded MockJax - jQuery Plugin to Mock Ajax requests 1.4.0 to 2.2.1 
https://github.com/jakerella/jquery-mockjax
 Messages_en.js, Messages_cn.js, Messages_se.js, Messages_tw.js and 
Messages_uq.js manually updated these files with new changes as are not present 
in JQuery Validation Plugin package
Converted file additional-methods.js and validate.js from dos to unix text 
using dos2unix https://sourceforge.net/projects/dos2unix/ 
As was getting error while adding files:
/ofbiz-framework/themes/common/webapp/common/js/jquery/plugins/validate/additional-methods.js'
 has inconsistent newlines
svn: E135000: Inconsistent line ending style
svn: E200042: Additional errors:

Verify:
https://localhost:8443/catalog/control/CreateProductFeature
https://localhost:8443/catalog/control/EditProduct

* Upgraded Fancybox 1.3.4 (11/11/2010) to v3.2.3  http://fancybox.net/ 

Verify:
https://localhost:8443/example/control/ListVisualThemes Click on image

* Verified all other plugins
# Query Timepicker 
https://localhost:8443/ordermgr/control/ListQuoteRoles?quoteId=CQ0001
# jGrowl Success and Error Messages on all the pages
# jsTree https://localhost:8443/humanres/control/main
# Readmore Steps in OFBIZ-9915 When success or error message are large. 
Readmore is used.
# jQuery UI  Used throughout OFBiz
# Elrte 
[#https://localhost:8443/content/control/findForumMessages?forumGroupId=WebStoreFORUM&forumId=ASK
 ]
Steps:
1. Go to Content component (https://localhost:8443/content/control/main ).
2. Click on Forum from submenu 
(https://localhost:8443/content/control/findForumGroups ).
3. Click on forums link under Select column 
(https://localhost:8443/content/control/findForums?forumGroupId=WebStoreFORUM )
4. Click on messages link under Select column 
(https://localhost:8443/content/control/findForumMessages?forumGroupId=WebStoreFORUM&forumId=ASK
 )
# Asm Select https://localhost:8443/example/control/FormWidgetExamples 
(Multiple drop-downs) 
# Jquery hotkeys https://localhost:8443/webpos/control/main 
# Jeditable https://localhost:8443/example/control/authview/findExampleAjax 
(Name field is click and edit)
# Jquery Mask  https://localhost:8443/example/control/FormWidgetExamples (Mask 
Field) 
# Jquery flot  https://localhost:8443/example/control/ExampleBarChart 
# jCarousal Couldn't find use.

> Upgrade Jquery 1.11.0 to JQuery 3.2.1
> -------------------------------------
>
>                 Key: OFBIZ-9978
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9978
>             Project: OFBiz
>          Issue Type: Improvement
>            Reporter: Aditya Sharma
>            Assignee: Aditya Sharma
>         Attachments: OFBIZ-9978.patch, OFBIZ-9978_plugins.patch
>
>
> As recommended by JQuery Migrate Plugin:
> # Upgrade the version of jQuery on the page to the latest 1.12.3.
> # Add the uncompressed jQuery Migrate 1.x Plugin to the page.
> # Update any plugins in use since later versions are usually the most 
> compatible with recent versions of jQuery.
> # Test the page and resolve any warnings that appear on the console, using 
> the JQMIGRATE 1.x warning documentation as a guide.
> # Remove the jQuery Migrate 1.x plugin and ensure that the updated jQuery 
> code on the page continues to work properly with only the latest jQuery 
> 1.x/2.x in use.
> # Upgrade the version of jQuery on the page to the latest 3.0 version 
> (currently 3.0.0) and add the uncompressed jQuery Migrate 3.x plugin to the 
> page.
> # Test the page and resolve any warnings that appear on the console, using 
> the JQMIGRATE 3.x warning documentation as a guide. Report any bugs in 
> third-party plugins to the plugin author.
> # Remove the jQuery Migrate 3.x plugin and ensure that the page continues to 
> work properly with only the latest jQuery 3.x in use.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to