Skip to content

Commit

Permalink
course-combolist MDL-24315 Fixed issue with collapsible regions trigg…
Browse files Browse the repository at this point in the history
…ering on anchor elements
  • Loading branch information
Sam Hemelryk committed Sep 21, 2010
1 parent 0e4c5b9 commit 4461a18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion course/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function course_category_tree(array $structure) {

// Generate an id and the required JS call to make this a nice widget
$id = html_writer::random_id('course_category_tree');
$this->page->requires->js_init_call('M.util.init_toggle_class_on_click', array($id, '.category.with_children', 'collapsed'));
$this->page->requires->js_init_call('M.util.init_toggle_class_on_click', array($id, '.category.with_children .category_label', 'collapsed'));

// Start content generation
$content = html_writer::start_tag('div', array('class'=>'course_category_tree', 'id'=>$id));
Expand Down
8 changes: 4 additions & 4 deletions lib/javascript-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ M.util.init_toggle_class_on_click = function(Y, id, cssselector, toggleclassname
node.all(cssselector).each(function(node){
node.on('click', function(e){
e.stopPropagation();
if (e.target.get('nodeName')!='A' && e.target.get('nodeName')!='IMG') {
this.toggleClass(toggleclassname);
if (e.target.test(cssselector) && e.target.get('nodeName')!='A' && e.target.get('nodeName')!='IMG') {
this.ancestor().toggleClass(toggleclassname);
}
}, node);
});
Expand Down Expand Up @@ -1538,7 +1538,7 @@ M.util.init_mp3flowplayer = function (id, playerpath, audioplayerpath, fileurl,
},
audio: {url: audioplayerpath}
},
clip: { url: fileurl,
clip: {url: fileurl,
provider: "audio",
autoPlay: false
}
Expand All @@ -1565,7 +1565,7 @@ M.util.init_mp3flowplayerplugin = function (id, playerpath, audioplayerpath, fil
},
audio: {url: audioplayerpath}
},
clip: { url: fileurl,
clip: {url: fileurl,
provider: "audio",
autoPlay: false
}
Expand Down

0 comments on commit 4461a18

Please sign in to comment.