From 2905da9c66398dcae66e29b43fb0a0baab1756fa Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 24 Dec 2007 20:54:12 +0000 Subject: [PATCH] MDL-12713 all IE versions are broken beyond belief, rewrite of admin tree collapsing/expanding; merged from MOODLE_19_STABLE --- blocks/admin_tree/block_admin_tree.php | 148 +++++++++++++------------ 1 file changed, 77 insertions(+), 71 deletions(-) diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php index 6528b0b06c..ab66723c02 100644 --- a/blocks/admin_tree/block_admin_tree.php +++ b/blocks/admin_tree/block_admin_tree.php @@ -34,7 +34,7 @@ class block_admin_tree extends block_base { global $CFG; $strfolderopened = s(get_string('folderopened')); - $this->tempcontent .= '
'; + $this->tempcontent .= '
'."\n"; $this->currentdepth++; @@ -78,7 +78,7 @@ class block_admin_tree extends block_base { // check if the category we're currently printing is a parent category for the current page; if it is, we // make a note (in the javascript) that it has to be expanded after the page has loaded if ($this->section != '' and $this->pathtosection[count($this->pathtosection) - 1] == $content->name) { - $this->expandjavascript .= 'expand("vh_div'.($this->divcounter).'");'."\n"; + $this->expandjavascript .= 'expand('.$this->divcounter.');'."\n"; array_pop($this->pathtosection); } @@ -129,84 +129,90 @@ class block_admin_tree extends block_base { } if ($this->tempcontent !== '') { - $strfolderopened = s(get_string('folderopened')); - $strfolderclosed = s(get_string('folderclosed')); + $closedimg = ''.s(get_string('folderclosed')).''; + $openedimg = ''.s(get_string('folderopened')).''; $this->content = new object(); - $this->content->text = '' . "\n"; - $this->content->text .= '
' . "\n"; - - $this->content->text .= $this->tempcontent; - - $this->content->text .= '
' . "\n"; - $this->content->text .= '' . "\n"; - - $searchcontent = $adminroot->search; + $this->content->text = ' + +
+ +'.$this->tempcontent.' + +
+'; $this->content->footer = '
'. '
'. ''. - ''. + ''. '
'. '
'; } else { - $this->content = new stdClass; + $this->content = new object(); $this->content->text = ''; } -- 2.39.5