diff --git a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js index d403dfbc675..a468a203bd6 100644 --- a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js +++ b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js @@ -76,7 +76,8 @@ DIALOGUE = function(config) { .append(Y.Node.create('
')) .append(Y.Node.create('
')) .append(Y.Node.create('
'))); - Y.one(document.body).append(config.notificationBase); + config.attachmentPoint = config.attachmentPoint || document.body; + Y.one(config.attachmentPoint).append(config.notificationBase); config.srcNode = '#' + id; delete config.buttons; // Don't let anyone pass in buttons as we want to control these during init. addButton can be used later. DIALOGUE.superclass.constructor.apply(this, [config]); diff --git a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js index 98487c06028..0df4ff48ae4 100644 --- a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js +++ b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js @@ -1,2 +1,2 @@ -YUI.add("moodle-core-notification-dialogue",function(s,e){var t,n,i,a,l,d,r,u,h,o,c,g="moodle-dialogue",f="notificationBase",v={BASE:"moodle-dialogue-base",WRAP:"moodle-dialogue-wrap",HEADER:"moodle-dialogue-hd",BODY:"moodle-dialogue-bd",CONTENT:"moodle-dialogue-content",FOOTER:"moodle-dialogue-ft",HIDDEN:"hidden",LIGHTBOX:"moodle-dialogue-lightbox"};M.core=M.core||{},t="Moodle dialogue",i=g+"-fullscreen",a=g+"-hidden",l=" [role=dialog]",d="[role=menubar]",r=".",u="moodle-has-zindex",h='input:not([type="hidden"]):not([disabled]):not([tabindex^="-"]),a[href]:not([disabled]):not([tabindex^="-"]),button:not([disabled]):not([tabindex^="-"]),textarea:not([disabled]):not([tabindex^="-"]),select:not([disabled]):not([tabindex^="-"]),[tabindex]:not([disabled]):not([tabindex^="-"])',o="form",n=function(e){var t="moodle-dialogue-"+s.stamp(this)+"-wrap";e.notificationBase=s.Node.create('
').append(s.Node.create('').append(s.Node.create('
')).append(s.Node.create('
')).append(s.Node.create('
'))),s.one(document.body).append(e.notificationBase),e.srcNode="#"+t,delete e.buttons,n.superclass.constructor.apply(this,[e])},s.extend(n,s.Panel,{_resizeevent:null,_orientationevent:null,_calculatedzindex:!1,_currentMaskNodeId:null,_originalPosition:null,_hiddenSiblings:null,hideIfNotForm:function(){null===this.get("boundingBox").one(o)&&this.hide()},initializer:function(){var e,t,i,o;!1!==this.get("closeButton")&&(t=this.get("closeButtonTitle"),this.get("buttons").header[0].setAttribute("title",t),this.get("buttons").header[0].setAttribute("aria-label",t)),this.setStdModContent(s.WidgetStdMod.HEADER,'
'+this.get("headerContent")+"
",s.WidgetStdMod.REPLACE),this._hiddenSiblings=[],this.get("render")&&this.render(),this.after("visibleChange",this.visibilityChanged,this),this.get("center")&&this.centerDialogue(),this.get("modal")&&(this.get(f).set("aria-hidden","true"),this.plug(s.M.core.LockScroll)),this.set("focusOn",s.Array(this.get("focusOn")).filter(function(e){return"focusoutside"!==e.eventName})),(e=this.get("boundingBox")).addClass(u),s.Array.each(this.get("extraClasses"),e.addClass,e),this.get("visible")&&this.applyZIndex(),this.on("maskShow",this.applyZIndex),this.on("maskShow",function(){var e,t=s.one(s.config.win),i=this.get("boundingBox");this.get("center")||(this._originalPosition=i.getXY()),e=this.get("maskNode"),this._currentMaskNodeId!==e.get("_yuid")&&(this._currentMaskNodeId=e.get("_yuid"),e.on("click",this.hideIfNotForm,this)),"fixed"!==i.getStyle("position")&&i.setStyles({top:t.get("scrollTop"),left:t.get("scrollLeft")})},this),i=this.get("notificationBase"),""!==(o=this.get("additionalBaseClass"))&&i.addClass(o),this.after("destroyedChange",function(){this.get(f).remove(!0)},this)},applyZIndex:function(){var i=1040,e=1,t=this.get("boundingBox"),o=this.get("maskNode"),n=this.get("zIndex");0===n||this._calculatedzindex?(s.all(l+", "+d+", "+r+u).each(function(e){var t=this.findZIndex(e);i').append(s.Node.create('').append(s.Node.create('
')).append(s.Node.create('
')).append(s.Node.create('
'))),e.attachmentPoint=e.attachmentPoint||document.body,s.one(e.attachmentPoint).append(e.notificationBase),e.srcNode="#"+t,delete e.buttons,n.superclass.constructor.apply(this,[e])},s.extend(n,s.Panel,{_resizeevent:null,_orientationevent:null,_calculatedzindex:!1,_currentMaskNodeId:null,_originalPosition:null,_hiddenSiblings:null,hideIfNotForm:function(){null===this.get("boundingBox").one(o)&&this.hide()},initializer:function(){var e,t,i,o;!1!==this.get("closeButton")&&(t=this.get("closeButtonTitle"),this.get("buttons").header[0].setAttribute("title",t),this.get("buttons").header[0].setAttribute("aria-label",t)),this.setStdModContent(s.WidgetStdMod.HEADER,'
'+this.get("headerContent")+"
",s.WidgetStdMod.REPLACE),this._hiddenSiblings=[],this.get("render")&&this.render(),this.after("visibleChange",this.visibilityChanged,this),this.get("center")&&this.centerDialogue(),this.get("modal")&&(this.get(f).set("aria-hidden","true"),this.plug(s.M.core.LockScroll)),this.set("focusOn",s.Array(this.get("focusOn")).filter(function(e){return"focusoutside"!==e.eventName})),(e=this.get("boundingBox")).addClass(h),s.Array.each(this.get("extraClasses"),e.addClass,e),this.get("visible")&&this.applyZIndex(),this.on("maskShow",this.applyZIndex),this.on("maskShow",function(){var e,t=s.one(s.config.win),i=this.get("boundingBox");this.get("center")||(this._originalPosition=i.getXY()),e=this.get("maskNode"),this._currentMaskNodeId!==e.get("_yuid")&&(this._currentMaskNodeId=e.get("_yuid"),e.on("click",this.hideIfNotForm,this)),"fixed"!==i.getStyle("position")&&i.setStyles({top:t.get("scrollTop"),left:t.get("scrollLeft")})},this),i=this.get("notificationBase"),""!==(o=this.get("additionalBaseClass"))&&i.addClass(o),this.after("destroyedChange",function(){this.get(f).remove(!0)},this)},applyZIndex:function(){var i=1040,e=1,t=this.get("boundingBox"),o=this.get("maskNode"),n=this.get("zIndex");0===n||this._calculatedzindex?(s.all(l+", "+d+", "+r+h).each(function(e){var t=this.findZIndex(e);i
')) .append(Y.Node.create('
')) .append(Y.Node.create('
'))); - Y.one(document.body).append(config.notificationBase); + config.attachmentPoint = config.attachmentPoint || document.body; + Y.one(config.attachmentPoint).append(config.notificationBase); config.srcNode = '#' + id; delete config.buttons; // Don't let anyone pass in buttons as we want to control these during init. addButton can be used later. DIALOGUE.superclass.constructor.apply(this, [config]); diff --git a/lib/yui/src/notification/js/dialogue.js b/lib/yui/src/notification/js/dialogue.js index 69194415f40..c0af4aca5bc 100644 --- a/lib/yui/src/notification/js/dialogue.js +++ b/lib/yui/src/notification/js/dialogue.js @@ -46,7 +46,8 @@ DIALOGUE = function(config) { .append(Y.Node.create('
')) .append(Y.Node.create('
')) .append(Y.Node.create('
'))); - Y.one(document.body).append(config.notificationBase); + config.attachmentPoint = config.attachmentPoint || document.body; + Y.one(config.attachmentPoint).append(config.notificationBase); config.srcNode = '#' + id; delete config.buttons; // Don't let anyone pass in buttons as we want to control these during init. addButton can be used later. DIALOGUE.superclass.constructor.apply(this, [config]);