]> git.evergreen-ils.org Git - Evergreen.git/commit
Wonder of wonders, a Dojo data store supporting lazy loading objects via pcrud!
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 16 Nov 2010 23:02:25 +0000 (23:02 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 16 Nov 2010 23:02:25 +0000 (23:02 +0000)
commit787c786a7be1b1e89d852b22a72690023a59bd14
tree4b32b77bd585a64d9d906eee003f71ac8a0d00d0
parentb9553988c847196b72ddaac0271f330a7b6b765e
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/trunk@18762 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