GNOME Bugzilla – Bug 766232
Upgrade to a recent jQuery
Last modified: 2016-05-13 15:14:14 UTC
Here's Tom report about compatibility issues: I've tested JQuery 2.x and some things are broken: 1. Sort functionality for tables Original plugin[1] doesn't work, so i'll use this fork [2]. It also has a "saveSort" function, which might be handy to use. [1] https://github.com/christianbach/tablesorter [2] https://github.com/Mottie/tablesorter 2. Modal windows for reduced_po and vertimus_workflow pages We can replace them with Bootstrap's modal dialogs and remove overlayhelpers.js and jquery-tools.js plugins. Apparently the following are also broken with 1.9.1 version, 3. Growfield2 plugin doesn't work I can't find a new version of growfield plugin. A good alternative is https://github.com/jackmoore/autosize 4. JS code on vertimus_detail page that un/check radio button doesn't work Some methods are deprecated so i'll update them. > Do you think jQuery migrate is really useful? Yes it is, If we stick with 1.9.1 version, as it provides some deprecated features/methods for our JQuery plugins (overlayhelpers.js, jquery-tools.js).
Growfield2 replacement done in https://git.gnome.org/browse/damned-lies/commit/?id=bacf76c07076e8113a48b3da3c929e734b3939fc
Created attachment 327679 [details] [review] JQuery update to 2.2.3
Created attachment 327682 [details] [review] Tablesorter fix I didn't updated the tablesorter plugin as it works with the above patch. Current plugin uses a deprecated mathod ($.browser.msie [1]) but this affects only IE browser. [1] http://jquery.com/upgrade-guide/1.9/#jquery-browser-removed
Doesn't this prepOverlay thing allows for the modal window to function properly?
Created attachment 327684 [details] [review] Fix vertumus detail JS code Check/uncheck is working for radio button. About the toggle method, if we want to just display/hide [1] the selected divs we're ok, as the other toggle method is deprecated [2]. [1] http://api.jquery.com/toggle/ [2] http://jquery.com/upgrade-guide/1.9/#toggle-function-function-removed
(In reply to Claude Paroz from comment #4) > Doesn't this prepOverlay thing allows for the modal window to function > properly? Yes indeed. But overlay windows for reduced_po and workflow are broken with the latest JQuery upgrade and the old versions of jquery-tools (and maybe overlayhelpers.js). What if we use Bootstrap's modals for these pages? https://getbootstrap.com/javascript/#modals
If you want to include bootstrap anyway for the responsive design, then I'm fine with using it for overlays. Could you cook a patch that does just that?
Created attachment 327687 [details] [review] Update event method for user box jQuery.event.handle() removed in > 1.9 JQuery versions
Created attachment 327718 [details] [review] Repalce overlay windows with modals Bootstrap modals with remote content.
Tom, I reworked and committed the modal replacement patch (using jQuery 1.12 for now, we can migrate to 2 when all is working well). Could you please check the result? I'll deploy if it works. Then we are almost ready for this part, I think.
Great Claude! Everything seems to work fine with the modals. There's only a minor bug with the popup user menu in the global bar, which can be fixed with the patch from comment #8. Besides that i can't find any other bugs. Also, do we really need the second title in the reduced_po modal? https://git.gnome.org/browse/damned-lies/tree/templates/help/reduced_po.html#n9
Thanks for the feedback, I deployed the current code with the fixes. Do you think it is OK to just upgrade to jQuery 2.2 now?
Sure why not! I use JQuery 2.2.3 on my local instance and i didn't find any other bugs.
Done.