Skip to content

Commit

Permalink
Merge branch 'MDL-33936-master-1' of git://git.luns.net.uk/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Jun 21, 2012
2 parents c691963 + c397e0c commit a273391
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions course/yui/modchooser/modchooser.js
Expand Up @@ -88,6 +88,11 @@ YUI.add('moodle-course-modchooser', function(Y) {
Y.one(baseselector).all(CSS.SECTION).each(function(section) {
this._setup_for_section(section);
}, this);

// Setup for the block site menu
Y.one(baseselector).all(CSS.SITEMENU).each(function(section) {
this._setup_for_section(section);
}, this);
},
_setup_for_section : function(section, sectionid) {
var chooserspan = section.one(CSS.SECTIONMODCHOOSER);
Expand Down Expand Up @@ -116,6 +121,9 @@ YUI.add('moodle-course-modchooser', function(Y) {
} else if (e.target.ancestor(CSS.SECTION)) {
var section = e.target.ancestor(CSS.SECTION);
this.sectionid = section.get('id').replace('section-', '');
} else if (e.target.ancestor(CSS.SITEMENU)) {
// The block site menu has a sectionid of 0
this.sectionid = 0;
}
this.display_chooser(e);
},
Expand Down

0 comments on commit a273391

Please sign in to comment.