From 4fc45e1dde2fb945247da117712678760e4e08c6 Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 17 Oct 2006 05:33:18 +0000 Subject: [PATCH] Merge from 1.7 --- lib/ajax/ajaxlib.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/ajax/ajaxlib.php b/lib/ajax/ajaxlib.php index 153660c69f..85064de410 100644 --- a/lib/ajax/ajaxlib.php +++ b/lib/ajax/ajaxlib.php @@ -7,6 +7,11 @@ function print_require_js($list) { global $CFG; + if (!check_browser_version('MSIE', 6.0) && !check_browser_version('Firefox', '1.5')) { + // We still have issues with YUI in other browsers. + return; + } + //list of shortname to filepath translations $translatelist = array( 'yui_yahoo' => '/lib/yui/yahoo/yahoo.js', @@ -34,7 +39,7 @@ function print_require_js($list) { /** * Used to create view of document to be passed to javascript on pageload. */ -class jsportal{ +class jsportal { var $currentblocksection = null; var $blocks = array(); @@ -45,18 +50,17 @@ class jsportal{ /** * Takes id of block and adds it */ - function block_add($id, $hidden=false){ + function block_add($id, $hidden=false ){ $hidden_binary = 0; if ($hidden) { $hidden_binary = 1; } - $this->blocks[count($this->blocks)] = array($this->currentblocksection, $id, $hidden_binary); } - function print_javascript($id){ + function print_javascript($id) { global $CFG; $blocksoutput = $output = ''; @@ -69,14 +73,14 @@ class jsportal{ $output .= ""; echo $output; } -- 2.39.5