remove unused js_shared.xml file, restore big attachEvt() onunload thing
authorsenator <lebbeous@esilibrary.com>
Thu, 3 Mar 2011 17:07:37 +0000 (12:07 -0500)
committersenator <lebbeous@esilibrary.com>
Thu, 3 Mar 2011 17:07:37 +0000 (12:07 -0500)
not really certain why, though

Open-ILS/web/opac/skin/kcls/xml/common/js_common_postbody.xml
Open-ILS/web/opac/skin/kcls/xml/common/js_shared.xml [deleted file]

index 7bdd170..dd4f0de 100644 (file)
@@ -56,6 +56,7 @@
         openils.Util.requireLegacy('<!--#echo var="OILS_JS_BASE"-->/utils.js');
         openils.Util.requireLegacy('<!--#echo var="OILS_JS_BASE"-->/config.js');
         openils.Util.requireLegacy('<!--#echo var="OILS_JS_BASE"-->/CGI.js');
+        openils.Util.requireLegacy('<!--#echo var="OILS_JS_BASE"-->/Cookies.js');
         openils.Util.requireLegacy('<!--#echo var="OILS_JS_BASE"-->/md5.js');
         openils.Util.requireLegacy('<!--#echo var="OILS_JS_BASE"-->/slimtree.js');
         openils.Util.requireLegacy('<!--#echo var="OILS_JS_BASE"-->/opac_utils.js');
         config.css.color_2 = "color_2";
         config.css.color_3 = "color_3";
 
+        var cookieManager = new HTTP.Cookies();
+
+        // KCLS suppressed orgs
+        var localSuppressedOrgs = {1500:true, 1501:true, 1558:true};  /* change to suit */
+        for (var i in orgArraySearcher) {
+            var org = orgArraySearcher[i];
+            if(localSuppressedOrgs[i]) {
+                org.opac_visible('f');
+            }
+        }
+
         <!--#if expr="$OILS_OPAC_FORCE_LOGIN_SSL"-->
             forceLoginSSL = true;
         <!--#endif -->
             void(0);
         }
 
+        attachEvt("common", "unload", function(){
+            if(typeof(G)!="undefined") destroyObj(G);
+            if(typeof(HTTP)!="undefined") destroyObj(HTTP);
+            if(typeof(_c)!="undefined") destroyObj(_c);
+            if(typeof(_l)!="undefined") destroyObj(_l);
+            if(typeof(config)!="undefined") destroyObj(config);
+            if(typeof(facet_list)!="undefined") destroyObj(facet_list);
+            if(typeof(globalOrgTree)!="undefined") destroyObj(globalOrgTree);
+            if(typeof(globalOrgTypes)!="undefined") destroyObj(globalOrgTypes);
+            if(typeof(google)!="undefined") destroyObj(google);
+            if(typeof(orgArraySearcher)!="undefined") destroyObj(orgArraySearcher);
+            if(typeof(recordsCache)!="undefined") destroyObj(recordsCache);
+            if(typeof(search_list)!="undefined") destroyObj(search_list);
+            if(typeof(subjectCache)!="undefined") destroyObj(subjectCache);
+            if(typeof(xrefCacheIndex)!="undefined") destroyObj(xrefCacheIndex);
+            if(typeof(x)!="undefined") destroyObj(x);
+            if(typeof(string)!="undefined") string = "";
+            //removeChildren(document);
+            //alert(errCounter+'\n'+errCounter2);
+        });
+
         console.log('end of main script');
     }
 
diff --git a/Open-ILS/web/opac/skin/kcls/xml/common/js_shared.xml b/Open-ILS/web/opac/skin/kcls/xml/common/js_shared.xml
deleted file mode 100644 (file)
index 1796235..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-<!--#if expr="$OILS_PAGE='index.xml'"-->
-isFrontPage = true;
-<!--#endif-->
-
-config.ids.searchbar = {};
-config.css.searchbar = {};
-config.ids.searchbar.text = 'search_box';
-config.ids.searchbar.facets = 'facet_box';
-config.ids.searchbar.submit = 'search_submit';
-config.ids.searchbar.type_selector = 'search_type_selector';
-config.ids.searchbar.depth_selector = 'depth_selector';
-config.ids.searchbar.form_selector = 'form_selector';
-config.ids.searchbar.extra_row = 'searchbar_extra';
-config.ids.searchbar.main_row            = 'searchbar_main_row';
-config.ids.searchbar.table                = 'searchbar_table';
-config.ids.searchbar.location_tag    = 'search_location_tag_link';
-config.ids.searchbar.lib_sel_span    = 'lib_selector_span';
-config.ids.searchbar.lib_sel_link    = 'lib_selector_link';
-config.ids.searchbar.depth_sel_span    = 'depth_selector_span';
-config.ids.common.top_logo = "top_left_logo";
-config.ids.sidebar = {};
-config.css.sidebar = {};
-config.names.sidebar = {};
-config.css.sidebar.item = {};
-config.ids.sidebar.home                = 'home_link_div';
-config.ids.sidebar.advanced        = 'advanced_link_div';
-config.ids.sidebar.myopac            = 'myopac_link_div';
-config.ids.sidebar.prefs            = 'prefs_link_div';
-config.ids.sidebar.mresult            = 'mresult_link_div';
-config.ids.sidebar.rresult            = 'result_link_div';
-config.ids.sidebar.rdetail            = "rdetail_link_div";
-config.ids.sidebar.login            = 'login_link';
-config.ids.sidebar.logout            = 'logout_link';
-config.ids.sidebar.logoutbox        = 'logout_link_div';
-config.ids.sidebar.loginbox        = 'login_link_div';
-config.ids.sidebar.logged_in_as    = 'logged_in_as_div';
-config.ids.sidebar.username_dest    = 'username_dest';
-
-config.ids.sidebar.home_link        = 'home_link'
-config.ids.sidebar.advanced_link    = 'advanced_link'
-config.ids.sidebar.myopac_link    = 'myopac_link'
-
-config.css.encircled                = 'encircled';
-
-config.ids.login = {};
-config.css.login = {};
-config.ids.login.form            = "login_form";
-config.ids.login.box            = "login_box";
-config.ids.login.tbody            = "login_tbody";
-config.ids.login.username    = "login_username";
-config.ids.login.password    = "login_password";
-config.ids.login.button        = "login_button";
-config.ids.login.cancel        = "login_cancel_button";
-config.ids.altcanvas.login            = config.ids.login.box;
-
-config.ids.altcanvas.myopac_reload = 'myopac_reloading';
-config.ids.myopac = {};
-config.css.myopac = {};
-config.names.myopac = {};
-
-config.ids.altcanvas.org_tree       = config.ids.common.org_container;
-config.ids.altcanvas.holds          = 'holds_box';
-config.ids.altcanvas.check_holds    = 'check_holds_box';
-config.ids.altcanvas.xulholds       = 'xulholds_box';
-config.ids.altcanvas.loading        = 'loading_alt';
-
-<!--#if expr="$OILS_PAGE='rdetail.xml'"-->
-config.ids.rdetail              = {};
-config.ids.rdetail.view_marc    = "rdetail_view_marc";
-config.ids.rdetail.details_body = 'rdetail_details_body';
-config.ids.rdetail.title        = 'rdetail_title';
-config.ids.rdetail.author       = 'rdetail_author';
-config.ids.rdetail.isbn         = 'rdetail_isbn';
-config.ids.rdetail.edition      = 'rdetail_edition';
-config.ids.rdetail.pubdate      = 'rdetail_pubdate';
-config.ids.rdetail.publisher    = 'rdetail_publisher';
-config.ids.rdetail.tor          = 'rdetail_tor';
-config.ids.rdetail.abstr        = 'rdetail_abstract';
-config.ids.rdetail.image        = 'rdetail_image';
-config.ids.rdetail.tor_pic      = 'rdetail_tor_pic';
-
-config.ids.rdetail.cp_status        = "rdetail_copy_info_status";
-config.ids.rdetail.cp_info_row      = "rdetail_copy_info_row";
-config.ids.rdetail.cp_info_loading  = "rdetail_copy_info_loading";
-config.ids.rdetail.cp_info_local    = "copy_info_local_link";
-config.ids.rdetail.cp_info_all      = "copy_info_all_link";
-config.ids.rdetail.cp_info_none     = "rdetail_copy_info_none";
-config.names.rdetail.lib_cell       = "rdetail_library_cell";
-config.names.rdetail.cn_cell        = "rdetail_callnumber_cell";
-config.names.rdetail.cp_count_cell  = "rdetail_copy_count_cell";
-config.names.rdetail.cp_status      = 'rdetail_status_cell';
-
-<!--#endif-->
-
-var OILS_OPAC_IMAGES_HOST = null;
-<!--#if expr="$OILS_OPAC_IMAGES_HOST"-->
-    OILS_OPAC_IMAGES_HOST = '<!--#echo var="OILS_OPAC_IMAGES_HOST"-->extras/ac/jacket/';
-<!--#endif -->
-var OILS_OPAC_STATIC_PROTOCOL = null;
-<!--#if expr="$OILS_OPAC_STATIC_PROTOCOL"-->
-    OILS_OPAC_STATIC_PROTOCOL = '<!--#echo var="OILS_OPAC_STATIC_PROTOCOL"-->';
-<!--#endif -->
-
-var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
-if (chilifresh == '(none)') { chilifresh = false; }
-var novelist = '<!--#echo var="OILS_NOVELIST_URL"-->';
-if (novelist == '(none)') { novelist = false; }
-
-
-var cookieManager = new HTTP.Cookies();  
-
-/*  -----------------------------------------------------------------------
-    KCLS suppressed orgs 
-    ----------------------------------------------------------------------- */
-var localSuppressedOrgs = {1500:true, 1501:true, 1558:true};  /* change to suit */
-for (var i in orgArraySearcher) {
-    var org = orgArraySearcher[i];
-    if(localSuppressedOrgs[i]) {
-        org.opac_visible('f');
-    }
-}
-/* ----------------------------------------------------------------------- */ 
-
-<!--#if expr="$OILS_OPAC_FORCE_LOGIN_SSL"-->
-    forceLoginSSL = true;
-<!--#endif -->
-
-
-/* I'm not sure how to test for the situation where this block is
-   needed, but this won't hurt. */
-try {
-    if ($('holds_frozen_chkbox').checked)
-        unHideMe($("hold_frozen_thaw_row"));
-} catch (E) {
-    void(0);
-}
-
-dojo.require('dojo.cookie');
-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.widget.FacetSidebar"); // pulls in Searcher and I18N
-dojo.require("dijit.form.CheckBox");
-dojo.require("openils.widget.ProgressDialog");
-
-
-dojo.addOnLoad(
-    function() {
-        setTimeout(
-            function() {
-                attachEvt("common", "unload", function(){
-                    if(typeof(G)!="undefined") destroyObj(G);
-                    if(typeof(HTTP)!="undefined") destroyObj(HTTP);
-                    if(typeof(_c)!="undefined") destroyObj(_c);
-                    if(typeof(_l)!="undefined") destroyObj(_l);
-                    if(typeof(config)!="undefined") destroyObj(config);
-                    if(typeof(facet_list)!="undefined") destroyObj(facet_list);
-                    if(typeof(globalOrgTree)!="undefined") destroyObj(globalOrgTree);
-                    if(typeof(globalOrgTypes)!="undefined") destroyObj(globalOrgTypes);
-                    if(typeof(google)!="undefined") destroyObj(google);
-                    if(typeof(orgArraySearcher)!="undefined") destroyObj(orgArraySearcher);
-                    if(typeof(recordsCache)!="undefined") destroyObj(recordsCache);
-                    if(typeof(search_list)!="undefined") destroyObj(search_list);
-                    if(typeof(subjectCache)!="undefined") destroyObj(subjectCache);
-                    if(typeof(xrefCacheIndex)!="undefined") destroyObj(xrefCacheIndex);
-                    if(typeof(x)!="undefined") destroyObj(x);
-                    if(typeof(string)!="undefined") string = "";
-                    //removeChildren(document);
-                    //alert(errCounter+'\n'+errCounter2);
-                });
-            }, 0
-        )
-    }
-);
-
-
-/* google analytics ------------------------------------------ */
-var _gaq = _gaq || [];
-_gaq.push(['_setAccount', 'UA-3018520-10']);
-_gaq.push(['_trackPageview']);
-
-(function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-})();
-/* google analytics ------------------------------------------ */
-
-try { 
-    document.getElementById('toptable').style.display = 'table'; 
-} catch(e) {
-    try {
-        document.getElementById('toptable').style.display = ''; 
-    } catch(ee) {}
-}
-