From: Bill Erickson Date: Tue, 14 Dec 2010 20:30:29 +0000 (-0500) Subject: using browser detection in js_common (via ssi), have FF/Xulrunner load the postbody... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=13ecde7a49312ed11e6315ce54821ed6db342813;p=evergreen%2Fequinox.git using browser detection in js_common (via ssi), have FF/Xulrunner load the postbody JS loader and all other browsers load the regular js_common content, w/ some slight changes to keep inline JS out of the picture. This is all because IE treats JS loaded vis legacyRequire as running in the non-global scope, which pretty much breaks all the code loaded in this fashion --- diff --git a/Open-ILS/web/opac/skin/default/js/advanced.js b/Open-ILS/web/opac/skin/default/js/advanced.js index dc4689f340..ccdc6ad304 100644 --- a/Open-ILS/web/opac/skin/default/js/advanced.js +++ b/Open-ILS/web/opac/skin/default/js/advanced.js @@ -176,5 +176,6 @@ function __setsortsel() { } else $("adv_global_sort_dir").disabled = false; } -__setsortsel(); +setTimeout(__setsortsel, 100); + console.log("end advanced.js"); diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js index 0e95c40e4a..5ecf30a8e1 100644 --- a/Open-ILS/web/opac/skin/default/js/holds.js +++ b/Open-ILS/web/opac/skin/default/js/holds.js @@ -41,10 +41,12 @@ function holdsHandleStaff() { }; } -$('holds_frozen_thaw_input').onchange = - function(){holdsVerifyThawDateUI('holds_frozen_thaw_input');} -$('holds_frozen_thaw_input').onkeyup = - function(){holdsVerifyThawDateUI('holds_frozen_thaw_input');} +setTimeout(function() { + $('holds_frozen_thaw_input').onchange = + function(){holdsVerifyThawDateUI('holds_frozen_thaw_input');} + $('holds_frozen_thaw_input').onkeyup = + function(){holdsVerifyThawDateUI('holds_frozen_thaw_input');} + }, 100); function _holdsHandleStaffMe() { holdArgs.recipient = G.user; diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index db63725bce..2ba2ae53cd 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -22,6 +22,7 @@ function clearNodes( node, keepArray ) { function myOPACInit() { fieldmapper.IDL.load(['mous']); + $('myopac_holds_actions_none').selected = true; var orgHiding = checkOrgHiding(); if (orgHiding) { diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js index 14bd7278c3..08e8319464 100644 --- a/Open-ILS/web/opac/skin/default/js/rdetail.js +++ b/Open-ILS/web/opac/skin/default/js/rdetail.js @@ -556,7 +556,7 @@ function _rdetailDraw(r) { try { chili_init(); } catch(E) { - dump(E + '\n'); + console.log(E + '\n'); hideMe($('rdetail_reviews_link')); hideMe($('rdetail_chilifresh_reviews')); } diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index 9c7953c274..c13ca27904 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -718,7 +718,7 @@ function fetchGoogleBooksLink () { function fetchChiliFreshReviews() { if (chilifresh && chilifresh != '(none)') { - try { chili_init(); } catch(E) { dump(E + '\n'); } + try { chili_init(); } catch(E) { console.log(E + '\n'); } } } diff --git a/Open-ILS/web/opac/skin/default/xml/body.xml b/Open-ILS/web/opac/skin/default/xml/body.xml index 818bac98e4..b9b3bb866f 100644 --- a/Open-ILS/web/opac/skin/default/xml/body.xml +++ b/Open-ILS/web/opac/skin/default/xml/body.xml @@ -35,6 +35,8 @@ - + + + diff --git a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml index 31b692650d..82ce698b9a 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml @@ -15,11 +15,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/web/opac/skin/default/xml/common/js_common_postbody.xml b/Open-ILS/web/opac/skin/default/xml/common/js_common_postbody.xml index f3d5b8af59..301e482a27 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/js_common_postbody.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/js_common_postbody.xml @@ -57,21 +57,6 @@ /* END COMPRESSION */ - if(dojo.isIE) { - setTimeout( - function() { - openils.Util.requireLegacy('http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js'); - CFInstall.check({ - preventPrompt: true, - onmissing: function() { - if (dojo.cookie("noGCF") != "true") - unHideMe($('gcfPrompt')); - } - }); - }, 0); - } - - config.css.color_1 = "color_1"; config.css.color_2 = "color_2"; config.css.color_3 = "color_3"; @@ -234,8 +219,6 @@ openils.Util.requireLegacy('/skin/default/js/holds.js'); openils.Util.requireLegacy('/skin/default/js/sidebar.js'); - $('myopac_holds_actions_none').selected = true; - diff --git a/Open-ILS/web/opac/skin/default/xml/home/index_body.xml b/Open-ILS/web/opac/skin/default/xml/home/index_body.xml index a81a72d755..ec0aa9b5be 100644 --- a/Open-ILS/web/opac/skin/default/xml/home/index_body.xml +++ b/Open-ILS/web/opac/skin/default/xml/home/index_body.xml @@ -30,7 +30,9 @@ + +