[open-ils-commits] r12273 - in trunk/Open-ILS/web/opac/skin/default/xml: . common home (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Feb 23 01:12:44 EST 2009
Author: dbs
Date: 2009-02-23 01:12:41 -0500 (Mon, 23 Feb 2009)
New Revision: 12273
Modified:
trunk/Open-ILS/web/opac/skin/default/xml/body.xml
trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml
trunk/Open-ILS/web/opac/skin/default/xml/home/index_body.xml
Log:
Move onload attribute methods from OPAC pages to Dojo.addOnLoad().
Tabify things a little bit for consistency.
Modified: trunk/Open-ILS/web/opac/skin/default/xml/body.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/body.xml 2009-02-23 05:09:23 UTC (rev 12272)
+++ trunk/Open-ILS/web/opac/skin/default/xml/body.xml 2009-02-23 06:12:41 UTC (rev 12273)
@@ -1,7 +1,4 @@
-<!--
-<body onload='init();' style='height: 100%; border: 2px solid black;'>
--->
-<body class="tundra" onload='init();'>
+<body class="tundra">
<table width='100%'>
<tbody>
<tr>
Modified: trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml 2009-02-23 05:09:23 UTC (rev 12272)
+++ trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml 2009-02-23 06:12:41 UTC (rev 12273)
@@ -31,28 +31,34 @@
OILS_OPAC_IMAGES_HOST = '<!--#echo var="OILS_OPAC_IMAGES_HOST"-->extras/ac/jacket/';
<!--#endif -->
+ <!-- builds the "Now searching: <org_unit>" text on the home page -->
+ function home_init() {
+ getId("home_adv_search_link").setAttribute("href", buildOPACLink({page:ADVANCED}));
+ getId("home_myopac_link").setAttribute("href", buildOPACLink({page:MYOPAC}, false, true));
+ }
</script>
- <!-- enable Dojo date picker -->
- <script language='javascript' type="text/javascript">
+ <!-- enable Dojo date picker -->
+ <script language='javascript' type="text/javascript">
- var djConfig = {parseOnLoad: true, isDebug: false}, lang, bidi;
+ var djConfig = {parseOnLoad: true, isDebug: false}, lang, bidi;
- var locale = location.href.replace( /.+opac\/([^\/]+)\/skin.+/, '$1' );
- if (!locale) locale = '<!--#echo var="locale"-->';
+ var locale = location.href.replace( /.+opac\/([^\/]+)\/skin.+/, '$1' );
+ if (!locale) locale = '<!--#echo var="locale"-->';
- djConfig.locale = locale.toLowerCase();
+ djConfig.locale = locale.toLowerCase();
- </script>
+ </script>
- <script type="text/javascript" src='/js/dojo/dojo/dojo.js'></script>
+ <script type="text/javascript" src='/js/dojo/dojo/dojo.js'></script>
- <script language="javascript" type="text/javascript">
- dojo.require("dijit._Calendar");
- dojo.require("dijit.form.DateTextBox");
- dojo.require("dojo.date.locale");
- dojo.require("dojo.date.stamp");
- dojo.require("dojo.parser");
- dojo.require("openils.I18N");
- dojo.require("dijit.form.FilteringSelect");
- </script>
+ <script language="javascript" type="text/javascript">
+ dojo.addOnLoad(init);
+ dojo.require("dijit._Calendar");
+ dojo.require("dijit.form.DateTextBox");
+ dojo.require("dijit.form.FilteringSelect");
+ dojo.require("dojo.date.locale");
+ dojo.require("dojo.date.stamp");
+ dojo.require("dojo.parser");
+ dojo.require("openils.I18N");
+ </script>
Modified: trunk/Open-ILS/web/opac/skin/default/xml/home/index_body.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/home/index_body.xml 2009-02-23 05:09:23 UTC (rev 12272)
+++ trunk/Open-ILS/web/opac/skin/default/xml/home/index_body.xml 2009-02-23 06:12:41 UTC (rev 12273)
@@ -1,4 +1,4 @@
-<body class="tundra" onload='init(); getId("home_adv_search_link").setAttribute("href", buildOPACLink({page:ADVANCED})); getId("home_myopac_link").setAttribute("href", buildOPACLink({page:MYOPAC}, false, true));'>
+<body class="tundra">
<noscript>
<style type="text/css">#toptable { display: none; }</style>
@@ -23,15 +23,16 @@
</table>
<script language='javascript' type='text/javascript'>isFrontPage = true;</script>
<script language="javascript" type='text/javascript'>
- try {
- document.getElementById('toptable').style.display = 'table';
- } catch(e) {
- try {
- document.getElementById('toptable').style.display = '';
- } catch(ee) {}
- }
- </script>
- <!--#include virtual='../footer.xml'-->
+ 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'-->
</body>
More information about the open-ils-commits
mailing list