]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for MDL-7493. Added html id attribute for the image button used to toggle hide...
authorvyshane <vyshane>
Mon, 11 Dec 2006 07:15:30 +0000 (07:15 +0000)
committervyshane <vyshane>
Mon, 11 Dec 2006 07:15:30 +0000 (07:15 +0000)
blocks/moodleblock.class.php

index 1fa9c43e2d4fb11280e2320f4478ee19f1d17855..6cbd9468dc17586192c25df7ce8e51748c0ea14d 100644 (file)
@@ -245,11 +245,6 @@ class block_base {
                 // The full treatment, please. Include the title text.
                 print_side_block($this->_title_html(), $this->content->text, NULL, NULL, $this->content->footer, $this->html_attributes(), $this->title);
             }
-            
-            //make a record of the block for the ajax course format to use
-            if (!empty($COURSE->javascriptportal)) {
-                $COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);    
-            }
         }
     }
 
@@ -272,7 +267,14 @@ class block_base {
         if (!empty($CFG->allowuserblockhiding)) {
             //Accessibility: added static 'alt' text for the +- icon.
             //TODO (nfreear): language string 'hide OR show block'
-            $title .= '<div class="hide-show"><a title="'.get_string('showhideblock','access').'" href="#" onclick="elementToggleHide(this, true, function(el) {return findParentNode(el, \'DIV\', \'sideblock\'); } ); return false;"><img src="'.$CFG->pixpath.'/spacer.gif" alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>';
+            $title .= '<div class="hide-show">'.
+                                         '<a title="'.get_string('showhideblock','access').
+                                         '" href="#" onclick="elementToggleHide(this, true, function(el) {'.
+                                         'return findParentNode(el, \'DIV\', \'sideblock\'); '.
+                                         '}, \''.$CFG->pixpath.'\' ); return false;">'.
+                                         '<img src="'.$CFG->pixpath.'/spacer.gif" '.
+                                         'id = "togglehide_inst'.$this->instance->id.'"'.
+                                         'alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>';
         }
 
         //Accesssibility: added H2 (was in, weblib.php: print_side_block)
@@ -283,7 +285,6 @@ class block_base {
         }
 
         $title .= '</div>';
-
         return $title;
     }
 
@@ -706,11 +707,6 @@ class block_list extends block_base {
                 print_side_block($this->_title_html(), '', $this->content->items, $this->content->icons, 
                                  $this->content->footer, $this->html_attributes(), $this->title);
             }
-            
-            //make a record of the block for the ajax course format to use
-            if (!empty($COURSE->javascriptportal)) {
-                $COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);    
-            }
         }
     }