Comment 7 for bug 1424815

Revision history for this message
Kathy Lussier (klussier) wrote :

I know I'm long past any deadline to add a pullrequest for inclusion in 3.0, but if it can't make it in for 3.0, let's consider this an early entry for the 3.1 release.

I was unhappy with my earlier implementation of this project. One I tested outside of a Concerto database with records that had many and long contents notes, I noticed that the anchor approach led to a lot of jumpiness when clicking the Read More link. See https://drive.google.com/file/d/0B74gDMUDwDXqWXM1Tzd2NVR4N3c/view

Also, if using the back button after clicking a link or two, you would have to click a couple of times before getting back to the search results page. Overall, it felt very clunky. Also, my earlier approach would have required entries in our css sheet for the ids of every single type of MARC note.

My current branch uses jQuery for the links, and it works much more smoothly. I did not use the jQuery plugin mentioned above because I want to limit our use of new plugins unless we absolutely need them, but also because I know Jake's code to create truncated strings does what we need it to.

I have added two config.tt2 settings: one to enable read more for contents notes and another to set the number of characters that should display before truncating the field. If Evergreen sites want to adjust those numbers on a field-by-field basis, I also coded it in such a way that they could use different truncation numbers for specific fields by editing the record/contents.tt2 file.

I would also like to leverage this code to provide a "Read More" link for titles on the search results page (we have some long ones in our catalogs), but that will have to come at a later time.

We also have a fallback for browsers that have disabled javascript.

Adding a pullrequest, but setting the target to 3.next.