Answering my own question:
jQuery does indeed support some functionality that makes this pretty easy. My demo is at:
http://www6b.wittenberg.edu/lib/public/picker.php
The Gist:
Onclick (item): add class 'highlight'
Onclick (show items): use the "toggle" method to hide the items that aren't highlighted (! hasClass('highlight')). Since it uses toggle(), clicking the button repeatedly will show/hide the highlighted items.
All the rest is gravy.
This doesn't have an email-marked-records function, but it does print ok. I'm satisfied for my current purposes. Feel free to re-use/improve the code to your heart's content.
Ken
From: Ken Irwin
Sent: Tuesday, November 30, 2010 3:38 PM
To: [log in to unmask]
Subject: easy/classy save-marked-records functionality?
Hi all,
Thanks for your thoughts yesterday re: dealing with vendors & impermanent URLs - I think the advice of the group re: getting vendors to change their ways makes more sense than the techno solution I had in mind.
For today's question, I am the db supplier, so I get to make my own choices about the interface!
I've got a bunch of indexes to local content, like the student newspaper, and I want to add a mark-these-records/print/email-marked-records kind of functionality. It shouldn't be too hard to come up with something, but I'm wondering what already exists. It seems likely to me that someone has already worked up a classy jQuery and/or HTML5 driven tool for doing something like this. Rather than re-invent the wheel, I thought I'd see what's already out there.
I'd like to be able to take a page like this:
http://www6b.wittenberg.edu/lib/witt_pubs/torch/search.php?fields[]=subject&database=torch&setup=torch.config&terms=football<http://www6b.wittenberg.edu/lib/witt_pubs/torch/search.php?fields%5b%5d=subject&database=torch&setup=torch.config&terms=football>
and have users mark individual records that they want to save/print/retrieve/etc.
Any ideas for how this has already been worked out?
Thanks
Ken
|