Bug 8283

Summary: Replace usage of YUI Cookie utility with jQuery Cookie plugin
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: chris, jonathan.druart, paul.poulain
Version: 3.10   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 8283 - Replace usage of YUI Cookie utility with jQuery Cookie plugin
Bug 8283 - Replace usage of YUI Cookie utility with jQuery Cookie plugin

Description Owen Leonard 2012-06-21 13:52:10 UTC
Since we're eliminating usage of YUI, we should convert JavaScript which uses the YUI Cookie utility for reading and setting cookies. We already use a jQuery Cookie plugin elsewhere in Koha (although it is independent of jQueryUI), so it seems logical to unify cookie management under it.

The only affected script is js/pages/batchMod.js
Comment 1 Owen Leonard 2012-06-22 18:19:09 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2012-07-01 01:48:06 UTC
Created attachment 10583 [details] [review]
Bug 8283 - Replace usage of YUI Cookie utility with jQuery Cookie plugin

Switching from YUI Cookie utility to jQuery Cookie plugin. The
jQuery Cookie plugin is already used elsewhere in Koha, so no new
dependencies are added. The YUI Cookie files are removed.

To test, go to batch item deletion and/or batch item modification
and submit a set of barcodes. On the confirmation screen select
or deselect columns to show. Start over and submit your barcodes
again. The confirmation screen should remember which columns you
previously selected.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 3 Chris Cormack 2012-07-01 01:49:22 UTC
Works fine
Comment 4 Jonathan Druart 2012-07-05 11:50:49 UTC
Qa comments:

I love this kind of patch : 12 insertions(+), 998 deletions(-) for the same job ! :)

Marking as Passed QA
Comment 5 Paul Poulain 2012-07-06 10:20:11 UTC
QA comment: 
There are still references to cookie-min.js in:
koha-tmpl/intranet-tmpl/prog/en/lib/yui/utilities/utilities.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader-debug.js

I think it's normal, as it's related to yui, but before pushing, owen could you confirm please ?
Comment 6 Owen Leonard 2012-07-12 11:23:17 UTC
(In reply to comment #5)
> QA comment: 
> There are still references to cookie-min.js

I saw that too. The yuiloader files are unused by Koha, so those references are irrelevant. utilities.js is used by Koha, but the reference to cookie-min.js comes in a sequence which references many YUI files which Koha doesn't use, so it looks safe to me.
Comment 7 Paul Poulain 2012-07-13 09:28:07 UTC
Patch pushed now. Please report any problem. I'll add this topic to my monthly Newsletter