IE does not support Array.map(), use dojo.map(). dojox.data.dom.textContent() return...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Jul 2009 15:04:38 +0000 (15:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Jul 2009 15:04:38 +0000 (15:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13665 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/BibTemplate.js

index ebb902d..5860b26 100644 (file)
@@ -53,14 +53,16 @@ if(!dojo._hasResource["openils.BibTemplate"]) {
                             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 @@ if(!dojo._hasResource["openils.BibTemplate"]) {
                                     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);
-                            
+
                             });
                        }
                     });