Bug 8283 - Replace usage of YUI Cookie utility with jQuery Cookie plugin
Summary: Replace usage of YUI Cookie utility with jQuery Cookie plugin
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-21 13:52 UTC by Owen Leonard
Modified: 2013-12-05 20:01 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 8283 - Replace usage of YUI Cookie utility with jQuery Cookie plugin (48.91 KB, patch)
2012-06-22 18:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8283 - Replace usage of YUI Cookie utility with jQuery Cookie plugin (48.93 KB, patch)
2012-07-01 01:48 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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