[Bug 11878] New: Eliminate use of deprecated jQuery .toggle() method usage
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Bug ID: 11878 Summary: Eliminate use of deprecated jQuery .toggle() method usage Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org There are a few instances in the templates of the .toggle() method usage which is now deprecated: http://jquery.com/upgrade-guide/1.9/#toggle-function-function-removed These will need to be corrected before we can upgrade jQuery. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 25824 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25824&action=edit Bug 11878 - Eliminate use of deprecated jQuery .toggle() method usage jQuery's .toggle() method can no longer be used to trigger a pair of specified functions. .toggle() can only be used to change the visibility of an element. This patch fixes a few places in Koha where the deprecated functionality was used. To test, apply the patch and clear your browser cache. - View the system preferences page in the staff client. Clicking a heading ("Appearance" under OPAC preferences, for instance) should collapse that section. Clicking again should expand it. - View the MARC detail page for a record in the OPAC. Clicking the "view plain" link should display the plain MARC view. Clicking the "view labeled" view should return to the original view. Test in both prog and bootstrap themes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 wajasu <matted-34813@mypacks.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25824|0 |1 is obsolete| | CC| |matted-34813@mypacks.net --- Comment #2 from wajasu <matted-34813@mypacks.net> --- Created attachment 25831 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25831&action=edit [SIGNED-OFF] Bug 11878 - Eliminate use of deprecated jQuery .toggle() method usage Performed test plan. Worked fine. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 --- Comment #3 from wajasu <matted-34813@mypacks.net> --- Did a qucik search to see if other .toggle usage was present, and got these results, so if they don't need to be addressed, we could change the status to signed off, otherwise things will wait for further followup patches. It may depend on the jquery update only needing to be done for OPAC. 12:45:28 {bug11878 %} ~/prj/kohaclone$ find . -name "*.js" -exec grep -Hn ".toggle()" {} \; Some places where toggle is in our source tree after the 1st patch applied: ./koha-tmpl/opac-tmpl/bootstrap/lib/bootstrap/js/bootstrap.js:1814: this.options.toggle && this.toggle() ./koha-tmpl/opac-tmpl/bootstrap/js/script.js:54: $(".menu-collapse").toggle(); ./koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js:15: $("#itemst td:nth-child("+valCookie[i]+"),#itemst th:nth-child("+valCookie[i]+")").toggle(); ./koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js:29: $("#itemst td:nth-child("+hide+"),#itemst th:nth-child("+hide+")").toggle(); ./koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js:65: $("#itemst td:nth-child("+show+"),#itemst th:nth-child("+show+")").toggle(); ./koha-tmpl/intranet-tmpl/prog/en/js/acq.js:863: $("#plan td:nth-child("+hide+"),#plan th:nth-child("+hide+")").toggle(); ./koha-tmpl/intranet-tmpl/prog/en/js/acq.js:872: $("#plan td:nth-child("+show+"),#plan th:nth-child("+show+")").toggle(); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- (In reply to wajasu from comment #3)
Did a qucik search to see if other .toggle usage was present, and got these results, so if they don't need to be addressed, we could change the status ... ./koha-tmpl/intranet-tmpl/prog/en/js/acq.js:872: $("#plan td:nth-child("+show+"),#plan th:nth-child("+show+")").toggle();
No, these do not need to be addressed: '.toggle(function, function, ... ) removed: This is the "click an element to run the specified functions" signature of .toggle(). It should not be confused with the "change the visibility of an element" of .toggle() which is not deprecated.' My patch fixes all the instances which I know to be problematic. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 --- Comment #5 from Marc Véron <veron@veron.ch> --- Created attachment 25841 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25841&action=edit [Signed-off] Bug 11878 - Eliminate use of deprecated jQuery .toggle() method usage jQuery's .toggle() method can no longer be used to trigger a pair of specified functions. .toggle() can only be used to change the visibility of an element. This patch fixes a few places in Koha where the deprecated functionality was used. To test, apply the patch and clear your browser cache. - View the system preferences page in the staff client. Clicking a heading ("Appearance" under OPAC preferences, for instance) should collapse that section. Clicking again should expand it. - View the MARC detail page for a record in the OPAC. Clicking the "view plain" link should display the plain MARC view. Clicking the "view labeled" view should return to the original view. Test in both prog and bootstrap themes. Signed-off-by: wajasu <matted-34813@mypacks.net> Followed test plan. Works fine. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25831|0 |1 is obsolete| | CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 26378 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26378&action=edit [PASSED QA] Bug 11878 - Eliminate use of deprecated jQuery .toggle() method usage jQuery's .toggle() method can no longer be used to trigger a pair of specified functions. .toggle() can only be used to change the visibility of an element. This patch fixes a few places in Koha where the deprecated functionality was used. To test, apply the patch and clear your browser cache. - View the system preferences page in the staff client. Clicking a heading ("Appearance" under OPAC preferences, for instance) should collapse that section. Clicking again should expand it. - View the MARC detail page for a record in the OPAC. Clicking the "view plain" link should display the plain MARC view. Clicking the "view labeled" view should return to the original view. Test in both prog and bootstrap themes. Signed-off-by: wajasu <matted-34813@mypacks.net> Followed test plan. Works fine. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script, works as described. No Javascript errors found. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25841|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Owen! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11878 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolyn.somers@biblibre.co | |m --- Comment #8 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Pushed to 3.14.x, will be in 3.14.08 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org