[open-ils-commits] r1006 - conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 24 10:45:00 EDT 2010


Author: dbs
Date: 2010-09-24 10:44:57 -0400 (Fri, 24 Sep 2010)
New Revision: 1006

Modified:
   conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml
Log:
Add circulation library to the brief result information; necessary on a multi-library campus

Also, get consistent about the createTextNode / appendChild pattern rather
than innerHTML property for text. Both seem to work; it's just a personal
preference.


Modified: conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml
===================================================================
--- conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml	2010-09-24 05:54:25 UTC (rev 1005)
+++ conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml	2010-09-24 14:44:57 UTC (rev 1006)
@@ -171,43 +171,43 @@
                                             if (cp.getAttribute('deleted') == 't') {
                                                 return;
                                             }
+                                            var cp_entry = dojo.create('div');
                                             var loc_id;
                                             var vol_appended = false;
                                             dojo.query('location', cp).forEach(function (location) {
                                                 loc_id = parseInt(location.getAttribute('ident'));
                                                 if (loc_id != 8 && loc_id != 20 && loc_id != 185 && loc_id != 156) {
                                                     if (!vol_appended) {
-                                                        dojo.create('span',{ "style": "font-weight: bold;",
-                                                            innerHTML: vol.getAttribute('label')},
-                                                            output);
+                                                        var cn = dojo.create('span', { style: "font-weight: bold;" }, cp_entry);
+                                                        var cn_txt = dojo.doc.createTextNode(vol.getAttribute('label'));
+                                                        cn.appendChild(cn_txt);
                                                         vol_appended = true;
                                                     }
-                                                    dojo.create('span', { className: 'live_separator_cell',
-                                                        "innerHTML": ' - '}, 
-                                                        output);
-                                                    dojo.create('span', { "style": "font-weight: bold;",
-                                                        "innerHTML": dojox.xml.parser.textContent(location)}, 
-                                                        output);
+                                                    var loc = dojo.create('span', { "style": "font-weight: bold;"}, cp_entry);
+                                                    var loc_txt = dojo.doc.createTextNode(' - ' + dojox.xml.parser.textContent(location));
+                                                    loc.appendChild(loc_txt);
                                                 }
                                             });
                                             if (loc_id == 8 || loc_id == 20 || loc_id == 185 || loc_id == 156) {
                                                 return;
                                             }
+                                            dojo.query('circ_lib', cp).forEach(function (circ_lib) {
+                                                var cp_lib = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry, "first");
+                                                var cp_lib_txt = dojo.doc.createTextNode(circ_lib.getAttribute('name') + ' - ');
+                                                cp_lib.appendChild(cp_lib_txt);
+                                            });
                                             dojo.query('status', cp).forEach(function (status) {
-                                                var pfx = dojo.doc.createTextNode(' (');
-                                                output.appendChild(pfx);
-                                                dojo.create('span', { "style": "font-weight: bold;",
-                                                    "innerHTML": dojox.xml.parser.textContent(status) }, output);
-                                                var sfx = dojo.doc.createTextNode(')');
-                                                output.appendChild(sfx);
+                                                var cp_status = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry);
+                                                var cp_status_txt = dojo.doc.createTextNode(' (' + dojox.xml.parser.textContent(status) + ')');
+                                                cp_status.appendChild(cp_status_txt);
                                             });
-                                            dojo.create('br', null, output);
 
                                             item_cnt++;
                                             if (item_cnt >= max_items) {
-                                                output.appendChild(dojo.doc.createTextNode('... more print items listed in full record'));
-                                                dojo.create('br', null, output);
+                                                dojo.create('br', null, cp_entry);
+                                                cp_entry.appendChild(dojo.doc.createTextNode('... more print items listed in full record'));
                                             }
+                                            output.appendChild(cp_entry);
                                         });
                                     });
 



More information about the open-ils-commits mailing list