mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Merge branch 'MDL-35423-master' of git://github.com/andrewnicols/moodle
Conflicts: course/yui/build/moodle-course-modchooser/moodle-course-modchooser-min.js course/yui/dragdrop/dragdrop.js
This commit is contained in:
commit
f8a60dfe88
@ -7,7 +7,7 @@ YUI.add('moodle-course-modchooser', function (Y, NAME) {
|
||||
*/
|
||||
|
||||
var CSS = {
|
||||
PAGECONTENT : 'div#page-content',
|
||||
PAGECONTENT : 'body',
|
||||
SECTION : 'li.section',
|
||||
SECTIONMODCHOOSER : 'span.section-modchooser-link',
|
||||
SITEMENU : 'div.block_site_main_menu',
|
||||
|
@ -1 +1 @@
|
||||
YUI.add("moodle-course-modchooser",function(e,t){var n={PAGECONTENT:"div#page-content",SECTION:"li.section",SECTIONMODCHOOSER:"span.section-modchooser-link",SITEMENU:"div.block_site_main_menu",SITETOPIC:"div.sitetopic"},r="course-modchooser",i=function(){i.superclass.constructor.apply(this,arguments)};e.extend(i,M.core.chooserdialogue,{sectionid:null,initializer:function(){var t=e.one(".chooserdialoguebody"),n=e.one(".choosertitle"),r={};this.setup_chooser_dialogue(t,n,r),this.setup_for_section(),M.course.coursebase.register_module(this),e.all(".block_settings #settingsnav .type_course .modchoosertoggle a").on("click",this.toggle_mod_chooser,this)},setup_for_section:function(t){t||(t=n.PAGECONTENT),e.one(t).all(n.SITETOPIC).each(function(e){this._setup_for_section(e)},this),e.one(t).all(n.SECTION).each(function(e){this._setup_for_section(e)},this),e.one(t).all(n.SITEMENU).each(function(e){this._setup_for_section(e)},this)},_setup_for_section:function(t){var r=t.one(n.SECTIONMODCHOOSER);if(!r)return;var i=e.Node.create("<a href='#' />");r.get("children").each(function(e){i.appendChild(e)}),r.insertBefore(i),i.on("click",this.display_mod_chooser,this)},display_mod_chooser:function(e){if(e.target.ancestor(n.SITETOPIC))this.sectionid=1;else if(e.target.ancestor(n.SECTION)){var t=e.target.ancestor(n.SECTION);this.sectionid=t.get("id").replace("section-","")}else e.target.ancestor(n.SITEMENU)&&(this.sectionid=0);this.display_chooser(e)},toggle_mod_chooser:function(t){var n=e.all("div.addresourcemodchooser"),r=e.all("div.addresourcedropdown");if(n.size()===0)return;var i=e.one(".block_settings #settingsnav .type_course .modchoosertoggle a"),s=i.get("lastChild"),o;n.item(0).hasClass("visibleifjs")?(o=0,n.removeClass("visibleifjs").addClass("hiddenifjs"),r.addClass("visibleifjs").removeClass("hiddenifjs"),s.set("data",M.util.get_string("modchooserenable","moodle")),i.set("href",i.get("href").replace("off","on"))):(o=1,n.addClass("visibleifjs").removeClass("hiddenifjs"),r.removeClass("visibleifjs").addClass("hiddenifjs"),s.set("data",M.util.get_string("modchooserdisable","moodle")),i.set("href",i.get("href").replace("on","off"))),M.util.set_user_preference("usemodchooser",o),t.preventDefault()},option_selected:function(e){this.hiddenRadioValue.setAttrs({name:"jump",value:e.get("value")+"§ion="+this.sectionid})}},{NAME:r,ATTRS:{maxheight:{value:800}}}),M.course=M.course||{},M.course.init_chooser=function(e){return new i(e)}},"@VERSION@",{requires:["moodle-core-chooserdialogue","moodle-course-coursebase"]});
|
||||
YUI.add("moodle-course-modchooser",function(e,t){var n={PAGECONTENT:"body",SECTION:"li.section",SECTIONMODCHOOSER:"span.section-modchooser-link",SITEMENU:"div.block_site_main_menu",SITETOPIC:"div.sitetopic"},r="course-modchooser",i=function(){i.superclass.constructor.apply(this,arguments)};e.extend(i,M.core.chooserdialogue,{sectionid:null,initializer:function(){var t=e.one(".chooserdialoguebody"),n=e.one(".choosertitle"),r={};this.setup_chooser_dialogue(t,n,r),this.setup_for_section(),M.course.coursebase.register_module(this),e.all(".block_settings #settingsnav .type_course .modchoosertoggle a").on("click",this.toggle_mod_chooser,this)},setup_for_section:function(t){t||(t=n.PAGECONTENT),e.one(t).all(n.SITETOPIC).each(function(e){this._setup_for_section(e)},this),e.one(t).all(n.SECTION).each(function(e){this._setup_for_section(e)},this),e.one(t).all(n.SITEMENU).each(function(e){this._setup_for_section(e)},this)},_setup_for_section:function(t){var r=t.one(n.SECTIONMODCHOOSER);if(!r)return;var i=e.Node.create("<a href='#' />");r.get("children").each(function(e){i.appendChild(e)}),r.insertBefore(i),i.on("click",this.display_mod_chooser,this)},display_mod_chooser:function(e){if(e.target.ancestor(n.SITETOPIC))this.sectionid=1;else if(e.target.ancestor(n.SECTION)){var t=e.target.ancestor(n.SECTION);this.sectionid=t.get("id").replace("section-","")}else e.target.ancestor(n.SITEMENU)&&(this.sectionid=0);this.display_chooser(e)},toggle_mod_chooser:function(t){var n=e.all("div.addresourcemodchooser"),r=e.all("div.addresourcedropdown");if(n.size()===0)return;var i=e.one(".block_settings #settingsnav .type_course .modchoosertoggle a"),s=i.get("lastChild"),o;n.item(0).hasClass("visibleifjs")?(o=0,n.removeClass("visibleifjs").addClass("hiddenifjs"),r.addClass("visibleifjs").removeClass("hiddenifjs"),s.set("data",M.util.get_string("modchooserenable","moodle")),i.set("href",i.get("href").replace("off","on"))):(o=1,n.addClass("visibleifjs").removeClass("hiddenifjs"),r.removeClass("visibleifjs").addClass("hiddenifjs"),s.set("data",M.util.get_string("modchooserdisable","moodle")),i.set("href",i.get("href").replace("on","off"))),M.util.set_user_preference("usemodchooser",o),t.preventDefault()},option_selected:function(e){this.hiddenRadioValue.setAttrs({name:"jump",value:e.get("value")+"§ion="+this.sectionid})}},{NAME:r,ATTRS:{maxheight:{value:800}}}),M.course=M.course||{},M.course.init_chooser=function(e){return new i(e)}},"@VERSION@",{requires:["moodle-core-chooserdialogue","moodle-course-coursebase"]});
|
||||
|
@ -7,7 +7,7 @@ YUI.add('moodle-course-modchooser', function (Y, NAME) {
|
||||
*/
|
||||
|
||||
var CSS = {
|
||||
PAGECONTENT : 'div#page-content',
|
||||
PAGECONTENT : 'body',
|
||||
SECTION : 'li.section',
|
||||
SECTIONMODCHOOSER : 'span.section-modchooser-link',
|
||||
SITEMENU : 'div.block_site_main_menu',
|
||||
|
@ -49,7 +49,7 @@ var CSS = {
|
||||
INSTANCENAME : 'span.instancename',
|
||||
MODINDENTDIV : '.mod-indent',
|
||||
MODINDENTOUTER : '.mod-indent-outer',
|
||||
PAGECONTENT : 'div#page-content',
|
||||
PAGECONTENT : 'body',
|
||||
SECTIONLI : 'li.section',
|
||||
SHOW : 'a.'+CSS.SHOW,
|
||||
SHOWHIDE : 'a.editing_showhide'
|
||||
|
File diff suppressed because one or more lines are too long
@ -49,7 +49,7 @@ var CSS = {
|
||||
INSTANCENAME : 'span.instancename',
|
||||
MODINDENTDIV : '.mod-indent',
|
||||
MODINDENTOUTER : '.mod-indent-outer',
|
||||
PAGECONTENT : 'div#page-content',
|
||||
PAGECONTENT : 'body',
|
||||
SECTIONLI : 'li.section',
|
||||
SHOW : 'a.'+CSS.SHOW,
|
||||
SHOWHIDE : 'a.editing_showhide'
|
||||
|
2
course/yui/src/modchooser/js/modchooser.js
vendored
2
course/yui/src/modchooser/js/modchooser.js
vendored
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
var CSS = {
|
||||
PAGECONTENT : 'div#page-content',
|
||||
PAGECONTENT : 'body',
|
||||
SECTION : 'li.section',
|
||||
SECTIONMODCHOOSER : 'span.section-modchooser-link',
|
||||
SITEMENU : 'div.block_site_main_menu',
|
||||
|
2
course/yui/src/toolboxes/js/toolbox.js
vendored
2
course/yui/src/toolboxes/js/toolbox.js
vendored
@ -47,7 +47,7 @@ var CSS = {
|
||||
INSTANCENAME : 'span.instancename',
|
||||
MODINDENTDIV : '.mod-indent',
|
||||
MODINDENTOUTER : '.mod-indent-outer',
|
||||
PAGECONTENT : 'div#page-content',
|
||||
PAGECONTENT : 'body',
|
||||
SECTIONLI : 'li.section',
|
||||
SHOW : 'a.'+CSS.SHOW,
|
||||
SHOWHIDE : 'a.editing_showhide'
|
||||
|
Loading…
x
Reference in New Issue
Block a user