Bugzilla – Attachment 98684 Details for
Bug 24621
Phase out jquery.cookie.js: Basic MARC editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor
Bug-24621-Phase-out-jquerycookiejs-Basic-MARC-edit.patch (text/plain), 5.05 KB, created by
Owen Leonard
on 2020-02-10 19:21:14 UTC
(
hide
)
Description:
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-02-10 19:21:14 UTC
Size:
5.05 KB
patch
obsolete
>From 026099c4562e7ebaac8c98571c3b6cf3f9c298cd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 10 Feb 2020 19:04:57 +0000 >Subject: [PATCH] Bug 24621: Phase out jquery.cookie.js: Basic MARC editor > >This patch removes the use of the jquery.cookie plugin by the basic MARC >editor for setting two interface preferences: Showing MARC tag numbers >and showing MARC documentation links. > >To test, apply tThiss he patch and open the basic MARC editor. > > - From the "Settings" menu, select the "Show MARC tag documentation > links" link. This should toggle the display of the "?" link next to > MARC tag descriptions. > - Reload the page to confirm that your selection has been saved. > - Perform the same test with the "Show tags" menu item. > >You can also follow the changes to the cookie using the browser's >developer console. Look for cookies named 'marcdocs_***' and >'marctags_***' (where *** is the borrowernumber of the logged-in >user) and confirm that the value of each flips from "show" to "hide" and >back. > >https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector >https://developers.google.com/web/tools/chrome-devtools/storage/cookies >--- > .../prog/en/modules/cataloguing/addbiblio.tt | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 8904afaa5aa..fea1910e23b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -47,14 +47,14 @@ > }); > > /* check cookie to hide/show marcdocs*/ >- if($.cookie("marcdocs_[% borrowernumber | html %]") == 'hide'){ >+ if( Cookies.get("marcdocs_[% borrowernumber | html %]") == 'hide'){ > toggleMARCdocLinks(false); > } else { > toggleMARCdocLinks(true); > } > > $("#marcDocsSelect").click(function(){ >- if($.cookie("marcdocs_[% borrowernumber | html %]") == 'hide'){ >+ if( Cookies.get("marcdocs_[% borrowernumber | html %]") == 'hide'){ > toggleMARCdocLinks(true); > } else { > toggleMARCdocLinks(false); >@@ -62,7 +62,7 @@ > }); > > /* check cookie to hide/show marc tags*/ >- var marctags_cookie = $.cookie("marctags_[% borrowernumber | html %]"); >+ var marctags_cookie = Cookies.get("marctags_[% borrowernumber | html %]"); > if( marctags_cookie == 'hide'){ > toggleMARCTagLinks(false); > } else if( marctags_cookie == 'show'){ >@@ -76,7 +76,7 @@ > } > > $("#marcTagsSelect").click(function(){ >- if( $.cookie("marctags_[% borrowernumber | html %]") == 'hide'){ >+ if( Cookies.get("marctags_[% borrowernumber | html %]") == 'hide'){ > toggleMARCTagLinks(true) > } else { > toggleMARCTagLinks(false); >@@ -125,7 +125,7 @@ > > if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false; > >- $.cookie( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/' } ); >+ Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/' } ); > > var biblionumber = [% biblionumber || "null" | html %]; > >@@ -260,11 +260,11 @@ > function toggleMARCdocLinks(flag){ > if( flag === true ){ > $(".marcdocs").show(); >- $.cookie("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365 }); >+ Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365 }); > $("#marcDocsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o'); > } else { > $(".marcdocs").hide(); >- $.cookie("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365 }); >+ Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365 }); > $("#marcDocsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o'); > } > } >@@ -273,12 +273,12 @@ > if( flag === true ){ > $(".tagnum").show(); > $(".subfieldcode").show(); >- $.cookie("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365 }); >+ Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365 }); > $("#marcTagsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o'); > } else { > $(".tagnum").hide(); > $(".subfieldcode").hide(); >- $.cookie("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365 }); >+ Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365 }); > $("#marcTagsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o'); > } > } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24621
:
98684
|
98919
|
98955