From 0abee2507017c6079783e7aa220b7f009313f62c Mon Sep 17 00:00:00 2001 From: senator Date: Thu, 3 Mar 2011 12:07:37 -0500 Subject: [PATCH] remove unused js_shared.xml file, restore big attachEvt() onunload thing not really certain why, though --- .../skin/kcls/xml/common/js_common_postbody.xml | 33 ++++ .../web/opac/skin/kcls/xml/common/js_shared.xml | 199 --------------------- 2 files changed, 33 insertions(+), 199 deletions(-) delete mode 100644 Open-ILS/web/opac/skin/kcls/xml/common/js_shared.xml diff --git a/Open-ILS/web/opac/skin/kcls/xml/common/js_common_postbody.xml b/Open-ILS/web/opac/skin/kcls/xml/common/js_common_postbody.xml index 7bdd170823..dd4f0de02e 100644 --- a/Open-ILS/web/opac/skin/kcls/xml/common/js_common_postbody.xml +++ b/Open-ILS/web/opac/skin/kcls/xml/common/js_common_postbody.xml @@ -56,6 +56,7 @@ openils.Util.requireLegacy('/utils.js'); openils.Util.requireLegacy('/config.js'); openils.Util.requireLegacy('/CGI.js'); + openils.Util.requireLegacy('/Cookies.js'); openils.Util.requireLegacy('/md5.js'); openils.Util.requireLegacy('/slimtree.js'); openils.Util.requireLegacy('/opac_utils.js'); @@ -87,6 +88,17 @@ 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'); + } + } + forceLoginSSL = true; @@ -277,6 +289,27 @@ 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 index 179623515e..0000000000 --- a/Open-ILS/web/opac/skin/kcls/xml/common/js_shared.xml +++ /dev/null @@ -1,199 +0,0 @@ - -isFrontPage = true; - - -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'; - - -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'; - - - -var OILS_OPAC_IMAGES_HOST = null; - - OILS_OPAC_IMAGES_HOST = 'extras/ac/jacket/'; - -var OILS_OPAC_STATIC_PROTOCOL = null; - - OILS_OPAC_STATIC_PROTOCOL = ''; - - -var chilifresh = ''; -if (chilifresh == '(none)') { chilifresh = false; } -var novelist = ''; -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'); - } -} -/* ----------------------------------------------------------------------- */ - - - forceLoginSSL = true; - - - -/* 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) {} -} - -- 2.11.0