Backport r18762 from trunk:
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 17 Nov 2010 22:41:33 +0000 (22:41 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 17 Nov 2010 22:41:33 +0000 (22:41 +0000)
commitd54fe7cff681b723e76b14cd5a8ca569c06956bc
tree91cf8f9717c7172ec863af1180f33fa51d58e145
parent24fa5357d870c64373cf8e66bb4bb2a2e02dabb2
Backport r18762 from trunk:

Wonder of wonders, a Dojo data store supporting lazy loading objects via pcrud!

So openils.PermaCrud.Store was dreamt up and directed by Mike Rylander, and
implemented by me.  Right now it gives us a new way to provide widgets for
selecting objects in Dojo-based interfaces.

Where previously we had some dropdowns here and there that really shouldn't
be dropdowns (such as one for selection lists in Acq, and several for resources
and resource types in Booking -- these examples I've replaced, but there are
surely more) because loading a dropdown with potentially zillions of items
to choose from can take forever and break the interface, now we can have
autocompleting textboxes that only load items matching what you type (and
even then with a low-ish default limit so that if you're vague in your input
you still don't get huge unwieldy result sets).

Easiest way to see an example is if you already have any acq selection lists.
Just go to any catalog record, choose Actions for this Record, choose View/Place
orders, then click "Add to Selection List." In the resulting dialog, that
second field used to be a dropdown, but now it's an autocompleting textbox.

Alternatively, you can see these in the affected booking interfaces (see files
modified in this commit) under Admin -> Server Administration -> Booking.

The future promises even better things for this store. When it implements the
Dojo Write API, interfaces using grids can potentially be vastly simplified
by relying on the store to save its own dirty objects. The Notification API
would facilitate easy use of single stores with multiple widgets. All good
things for faster-to-write interfaces.

------------------------------------------------------------------------

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18774 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/web/js/dojo/openils/PermaCrud/Store.js [new file with mode: 0644]
Open-ILS/web/js/dojo/openils/widget/PCrudAutocompleteBox.js [new file with mode: 0644]
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/js/ui/default/acq/lineitem/related.js
Open-ILS/web/templates/default/acq/common/li_table.tt2
Open-ILS/web/templates/default/conify/global/booking/resource.tt2
Open-ILS/web/templates/default/conify/global/booking/resource_attr.tt2
Open-ILS/web/templates/default/conify/global/booking/resource_attr_map.tt2