[OPEN-ILS-GENERAL] subscription summary screen

Tara Robertson information.detective at gmail.com
Fri May 27 16:47:43 EDT 2011


Awesome! This is what I needed, I think.

Thanks Dan!

On Fri, May 27, 2011 at 11:06 AM, Dan Scott <dan at coffeecode.net> wrote:
> On Fri, May 27, 2011 at 12:36 PM, David Fiander <david at fiander.info> wrote:
>> That's what I suspected. In this situation, the serials stuff isn't doing
>> anything more than dumping the existing text strings that describe your
>> holdings. That code has changed a lot since I last poked at it, but I
>> suspect that changing the way text holdings records are displayed so that
>> they're nicer will require patching the code in the serials module.
>
> It should be pretty simple, actually. The data comes back as an array,
> and we're just concatenating the array elements with commas, so you
> could concatenate with line breaks instead as follows:
>
>
> In /openils/var/web/opac/skin/SKIN/js/rdetail.js, find the function:
>
> function _holdingsDrawMFHDEntry(entryNum, entryName, entry) {
>        var flatEntry = entry.toString().replace(/,/g, ', ');
>        dojo.place("<tr><td> </td><td nowrap='nowrap' class='rdetail_desc'>"
> + entryName + "</td><td class='rdetail_item'>" + flatEntry +
> "</td></tr>", "rdetail_holdings_tbody_" + entryNum, "last");
> }
>
> and change the replace() call to:
>        var flatEntry = entry.toString().replace(/,/g, '<br />');
>
> so that the final product looks like:
>
> function _holdingsDrawMFHDEntry(entryNum, entryName, entry) {
>        var flatEntry = entry.toString().replace(/,/g, '<br />');
>        dojo.place("<tr><td> </td><td nowrap='nowrap' class='rdetail_desc'>"
> + entryName + "</td><td class='rdetail_item'>" + flatEntry +
> "</td></tr>", "rdetail_holdings_tbody_" + entryNum, "last");
> }
>


More information about the Open-ils-general mailing list