Enable GET params to be added properly in buildOPACLink()
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Nov 2010 20:12:06 +0000 (20:12 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Nov 2010 20:12:06 +0000 (20:12 +0000)
Symptom was that the "?l=#" parameter wasn't being added to the
home screen "Advanced Search" link. Cause was that the
dojo.addOnLoad(init) call was being made after the
dojo.addOnLoad(home_init) call, which depended on globals being
set by init(). This started happening when the JavaScript was
shifted around in an attempt to kill the white screen of death.

There may be other similar issues in other interfaces; keep
your eyes open!

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

Open-ILS/web/opac/skin/default/xml/home/index_body.xml

index a20a133..d2f031d 100644 (file)
                        </tr>
                </tbody>
        </table>
-       <script language='javascript' type='text/javascript'>isFrontPage = true;</script>
-       <script language="javascript" type='text/javascript'>
-               dojo.addOnLoad(home_init);
-               try { 
-                       document.getElementById('toptable').style.display = 'table'; 
-               } catch(e) {
-                       try {
-                               document.getElementById('toptable').style.display = ''; 
-                       } catch(ee) {}
-               }
-       </script>
        <!--#include virtual='../footer.xml'-->
     <center>
         <div id='gcfPrompt' class='hide_me'>
     </script>
 
     <script language="javascript" type="text/javascript">
+        isFrontPage = true;
         dojo.addOnLoad(init);
+        dojo.addOnLoad(home_init);
+
+        try { 
+            dojo.style(dojo.byId('toptable'), 'display', 'table'); 
+        } catch(e) {
+            try {
+                dojo.style(dojo.byId('toptable'), 'display', ''); 
+            } catch(ee) {}
+        }
+
         dojo.require("dijit._Calendar");
         dojo.require("dijit.form.DateTextBox");
         dojo.require("dijit.form.FilteringSelect");