Bug 5481

Summary: Replace YUI JS libraries with Jquery UI
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: dev_patches, katrin.fischer, paul.poulain
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 5778, 7747, 8143, 8181, 8278    
Bug Blocks: 7119, 7179    

Description Owen Leonard 2010-12-09 20:40:19 UTC
As the Jquery UI (jUI) library matures it become more and more appealing as a replacement for the YUI JS libraries*. We're already using an older version of the jUI tabs widget. 

Currently we use YUI for:

- staff client toolbar buttons.
  -- Some of these are buttons only cosmetically. Others are 
     buttons which trigger menus, including one example of a
     "split button," (in the MARC editor).
- autocomplete (patron search, a couple other examples I think)
- menus (staff client nav "More" menu, OPAC lists menu, etc.)

jUI now includes an autocomplete feature, so work on this could proceed right away.

The latest version of jUI (1.8.6 as of 2010-12-09) includes a button widget, but this works only with the latest version of jQuery, which means we must wait for Bug 5184 to be resolved before we can replace the YUI toolbars.

The same should probably be said for replacing menus. jUI doesn't include a menu widget, but the latest version includes a position utility which would make rolling our own a little easier. Alternatively, jUI version 1.9 promises to have a built-in menu widget but I'm not sure of its features.

* Note that this bug specifically aims to replace only the JS libraries, not the YUI CSS framework.
Comment 1 Owen Leonard 2010-12-10 18:01:21 UTC
I have a git branch available with my progress:

ip-bug-5481-jquery-ui-2010-12-09 at http://gitorious.org/koha-dev/koha-dev
Comment 2 Owen Leonard 2010-12-22 13:59:52 UTC
Demo of patron search autocomplete:


This implementation changes two aspects of the search:

1. The search form is populated with the patron's card number instead of first and last name. Searching by first and last name could potentially return more than one result. Card number is unambiguous.

2. The search form is submitted automatically when the user selects an entry.

I would appreciate comments about these two changes if anyone disagrees with them.
Comment 3 Owen Leonard 2010-12-22 14:32:04 UTC
Another change: the jQueryUI autocomplete widget lets you specify a minimum number of characters the user must type before the search is initiated. In my example the number is set to 3. Does that sound reasonable?
Comment 4 Owen Leonard 2010-12-23 15:02:00 UTC
Updates to autocomplete are now committed to my development branch. Patron search autocomplete seems to be working across browsers. Patron attribute autocomplete on overdue.pl is working across browsers with the exception of IE8 (the only IE I've tested in). In IE8 the autocomplete is broken on cloned input fields.
Comment 5 dev_patches 2010-12-23 15:40:24 UTC
sounds sensible to me
Comment 6 Owen Leonard 2011-11-06 12:26:41 UTC
*** Bug 7179 has been marked as a duplicate of this bug. ***
Comment 7 Paul Poulain 2011-11-06 14:31:18 UTC
*** Bug 7182 has been marked as a duplicate of this bug. ***
Comment 9 Katrin Fischer 2013-04-14 08:41:00 UTC
Owen, all linked bugs are closed by now - are you finished here? :)
Comment 10 Katrin Fischer 2014-05-17 11:30:06 UTC
All linked bugs are closed - I am being brave and close this. Feel free to reopen :)