[open-ils-commits] r13667 - branches/rel_1_6_0/Open-ILS/web/js/dojo/openils (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jul 21 11:05:08 EDT 2009


Author: erickson
Date: 2009-07-21 11:05:06 -0400 (Tue, 21 Jul 2009)
New Revision: 13667

Modified:
   branches/rel_1_6_0/Open-ILS/web/js/dojo/openils/BibTemplate.js
Log:
IE does not support Array.map(), use dojo.map().  dojox.data.dom.textContent() returns nothing in IE -- use innerHTML instead when using IE.

Modified: branches/rel_1_6_0/Open-ILS/web/js/dojo/openils/BibTemplate.js
===================================================================
--- branches/rel_1_6_0/Open-ILS/web/js/dojo/openils/BibTemplate.js	2009-07-21 15:04:57 UTC (rev 13666)
+++ branches/rel_1_6_0/Open-ILS/web/js/dojo/openils/BibTemplate.js	2009-07-21 15:05:06 UTC (rev 13667)
@@ -53,14 +53,16 @@
                             dojo.forEach(slot_list, function (slot) {
                                 var joiner = slot.getAttribute('join') || ' ';
 
-                                var slot_handler = dojo.query(
-                                    'script[type=opac/slot-format]',
-                                    slot
-                                ).orphan().map(
-                                    function(x){return dojox.data.dom.textContent(x)}
-                                ).join('');
-                        
-                
+                                var slot_handler = dojo.map(
+                                    dojo.query('script[type=opac/slot-format]', slot).orphan(),
+                                    function(x){
+                                        if(dojo.isIE) return x.innerHTML;
+                                        return dojox.data.dom.textContent(x)
+                                    }
+                                );
+
+                                slot_handler = slot_handler.join('');
+
                                 if (slot_handler) slot_handler = new Function('item', slot_handler);
                                 else slot_handler = new Function('item','return dojox.data.dom.textContent(item);');
                 
@@ -69,10 +71,10 @@
                                     bib
                                 );
 
-                                if (item_list.length) slot.innerHTML = item_list.map(slot_handler).join(joiner);
-                
+                                if (item_list.length) slot.innerHTML = dojo.map(item_list, slot_handler).join(joiner);
+
                                 delete(slot_handler);
-                            
+
                             });
                        }
                     });



More information about the open-ils-commits mailing list