small re-org of result common code
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Nov 2005 22:44:20 +0000 (22:44 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Nov 2005 22:44:20 +0000 (22:44 +0000)
added 'hr' to sidebar trees

git-svn-id: svn://svn.open-ils.org/ILS/trunk@2011 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/xml/sidebar.xml

index 6788a1d..af89c86 100644 (file)
@@ -368,6 +368,7 @@ function resultDrawSidebarTrees( stype, treeName, items, wrapperNode, destNode )
 
                if(isNull(items[i])) continue;
                if(x++ > 7) break;
+               found = true;
 
                var item = normalize(truncate(items[i], 65));
                var trunc = 65;
@@ -375,18 +376,31 @@ function resultDrawSidebarTrees( stype, treeName, items, wrapperNode, destNode )
                var href = resultQuickLink( items[i], stype );
                tree.addNode( stype + "_" + items[i], treeName + 'Root', item, href );
 
-               var req = new Request(FETCH_CROSSREF, stype, items[i]);
-               req.request._tree = tree;
-               req.request._item = items[i];
-               req.request._stype = stype;
-               req.callback(resultAppendCrossRef);
-               req.send();     
+               /*
+               if(!IE)
+                       setTimeout('resultFireXRefReq("'+treeName+'","'+stype+'","'+item+'");',200);
+                       */
+               if(!IE) resultFireXRefReq(treeName, stype, items[i]);
+       }
 
-               found = true;
+       if(found) {
+               unHideMe(wrapperNode);
+               tree.close(tree.rootid);
        }
-       if(found) unHideMe(wrapperNode);
 }
 
+function resultFireXRefReq( treeName, stype, item ) {
+       var tree;
+       eval('tree=' + treeName);
+       var req = new Request(FETCH_CROSSREF, stype, item);
+       req.request._tree = tree;
+       req.request._item = item;
+       req.request._stype = stype;
+       req.callback(resultAppendCrossRef);
+       req.send();
+}
+
+
 function resultQuickLink( term, type ) {
        var args = {};
        args.page = MRESULT;
index 63095be..da818cf 100644 (file)
@@ -69,6 +69,7 @@
        </div>
 
        <div id='author_tree_sidebar' class='sidebar_chunk hide_me'> 
+               <hr/>
                <div id='author_sidebar_tree_div'> </div>
                <script language='javascript'>
                        var authorSidebarTree = new SlimTree(
@@ -80,6 +81,7 @@
        </div>
 
        <div id='series_tree_sidebar' class='sidebar_chunk hide_me'> 
+               <hr/>
                <div id='series_sidebar_tree_div'> </div>
                <script language='javascript'>
                        var seriesSidebarTree = new SlimTree(