these changes to rdetail.js might be wrong... page dies now, can't tell where
authorsenator <lebbeous@esilibrary.com>
Thu, 3 Mar 2011 23:04:14 +0000 (18:04 -0500)
committersenator <lebbeous@esilibrary.com>
Thu, 3 Mar 2011 23:04:14 +0000 (18:04 -0500)
Open-ILS/web/opac/skin/kcls/js/rdetail.js
Open-ILS/web/opac/skin/kcls/xml/common/js_common_postbody.xml

index 2d00adb..3ccf037 100644 (file)
@@ -885,21 +885,24 @@ function rdetailAddToBookbag() {
 }
 
 function rdetailShowAllExtras(bool) {
-       var nodes = jQuery('.rdetail_extras').filter(function(){ return jQuery(this).css('display')=='block';});
-       nodes.each(function(){
-               rdetailShowExtra(this.getAttribute("rel2"));
-               var node = $(this.getAttribute("rel"));
-               if(bool) unHideMe(node); else hideMe(node);
-       });
+    dojo.query('.rdetail_extras').filter(
+        function(n) { return dojo.style(n, 'display') == 'block'; }
+    ).forEach(
+        function(n) {
+            rdetailShowExtra(n.getAttribute("rel2"));
+            var node = $(n.getAttribute("rel"));
+            if (bool) unHideMe(node); else hideMe(node);
+        }
+    );
 }
 
 
 var rdetailMarcFetched = false;
 function rdetailShowExtra(type, args) {
-       var obj = jQuery('[rel2='+type+']').get()[0];
+       var obj = dojo.query('[rel2='+type+']')[0];
        var node = $(obj.getAttribute('rel'));
        var arrow = $(obj.getAttribute('rel')+"_arrow");
-       if(jQuery(node).css('display')=='block') {
+       if (dojo.style(node, "display") == "block")) {
                hideMe(node);
                arrow.src="/opac/skin/kcls/graphics/rdetail_arrow.png";
        } else {
@@ -1481,4 +1484,4 @@ function expandBoxes(type,bool) {
          }
          return;
        }
-}
\ No newline at end of file
+}
index 7f0f0c6..6b430ec 100644 (file)
@@ -1,3 +1,6 @@
+<!--#if expr="$OILS_PAGE='rdetail.xml'"-->
+<script src='https://www.google.com/jsapi' type='text/javascript' language='javascript'></script>
+<!--#endif-->
 <script type="text/javascript"><![CDATA[
     dojo.require('openils.Util');
 
             }
         }
 
+        openils.Util.requireLegacy('/opac/skin/kcls/js/marc.js');
         openils.Util.requireLegacy('/opac/skin/kcls/js/misc.js');
         openils.Util.requireLegacy('/opac/skin/kcls/js/depth_selector.js');
         <!--#if expr="$OILS_PAGE!='advanced.xml'"-->
         openils.Util.requireLegacy('<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/kcls/js/holds.js');
         openils.Util.requireLegacy('<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/kcls/js/container.js');
         openils.Util.requireLegacy('<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/kcls/js/copy_details.js');
-        openils.Util.requireLegacy('<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/Date.W3CDTF.js');
 
         config.ids.rdetail              = {};
         config.ids.rdetail.view_marc    = "rdetail_view_marc";