Fix bug in copy summary display
authorJeff Godin <jgodin@tadl.org>
Mon, 16 Apr 2012 16:52:31 +0000 (12:52 -0400)
committerJeff Godin <jgodin@tadl.org>
Mon, 16 Apr 2012 16:52:31 +0000 (12:52 -0400)
Copy summaries with multiple libraries were having their
list of libraries overwritten by the last library in the
list.

Thanks to wjr for noting the issue. This fixes it by moving
a mis-placed curly brace.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/opac/skin/tadlv3/xml/result/result_table.xml

index a4caa8d..d804435 100644 (file)
                                                 copycount = copycount + copySummaryObj[libname][loc][cn]['count'];
                                             }
                                         }
+                                        var libdiv = dojo.create('div');
+                                        var libcontent = dojo.create('span', { "style": "font-weight: bold;" });
+                                        var libtext = dojo.doc.createTextNode(copycount + ' available at ' + libname);
+                                        libcontent.appendChild(libtext);
+                                        libdiv.appendChild(libcontent);
+                                        output.appendChild(libdiv);
                                     }
-                                    var libdiv = dojo.create('div');
-                                    var libcontent = dojo.create('span', { "style": "font-weight: bold;" });
-                                    var libtext = dojo.doc.createTextNode(copycount + ' available at ' + libname);
-                                    libcontent.appendChild(libtext);
-                                    libdiv.appendChild(libcontent);
-                                    output.appendChild(libdiv);
                                 }
                                 // display the count of unavailable items, if any
                                 if (count_copies_unavail > 0) {