mirror of
https://github.com/moodle/moodle.git
synced 2025-04-11 19:42:35 +02:00
Merge branch 'MDL-47734-master-fixes' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
a1ac634692
@ -119,7 +119,6 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (this.get('render')) {
|
||||
this.render();
|
||||
}
|
||||
this.makeResponsive();
|
||||
this.after('visibleChange', this.visibilityChanged, this);
|
||||
if (this.get('center')) {
|
||||
this.centerDialogue();
|
||||
@ -152,10 +151,14 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (!this.get('center')) {
|
||||
this._originalPosition = bb.getXY();
|
||||
}
|
||||
bb.setStyles({
|
||||
top: w.get('scrollTop'),
|
||||
left: w.get('scrollLeft')
|
||||
});
|
||||
|
||||
if (bb.getStyle('position') !== 'fixed') {
|
||||
// If the boundingBox has been positioned in a fixed manner, then it will not position correctly to scrollTop.
|
||||
bb.setStyles({
|
||||
top: w.get('scrollTop'),
|
||||
left: w.get('scrollLeft')
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
|
||||
// Remove the dialogue from the DOM when it is destroyed.
|
||||
@ -274,8 +277,7 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
* @method makeResponsive
|
||||
*/
|
||||
makeResponsive : function() {
|
||||
var bb = this.get('boundingBox'),
|
||||
content;
|
||||
var bb = this.get('boundingBox');
|
||||
|
||||
if (this.shouldResizeFullscreen()) {
|
||||
// Make this dialogue fullscreen on a small screen.
|
||||
@ -290,15 +292,12 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
'height' : null,
|
||||
'right' : null,
|
||||
'bottom' : null});
|
||||
|
||||
content = Y.one('#' + this.get('id') + ' .' + CSS.BODY);
|
||||
} else {
|
||||
if (this.get('responsive')) {
|
||||
// We must reset any of the fullscreen changes.
|
||||
bb.removeClass(DIALOGUE_FULLSCREEN_CLASS)
|
||||
.setStyles({'width' : this.get('width'),
|
||||
'height' : this.get('height')});
|
||||
content = Y.one('#' + this.get('id') + ' .' + CSS.BODY);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -327,6 +326,7 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (hidden) {
|
||||
bb.addClass(DIALOGUE_HIDDEN_CLASS);
|
||||
}
|
||||
this.makeResponsive();
|
||||
},
|
||||
/**
|
||||
* Return whether this dialogue should be fullscreen or not.
|
||||
|
File diff suppressed because one or more lines are too long
@ -119,7 +119,6 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (this.get('render')) {
|
||||
this.render();
|
||||
}
|
||||
this.makeResponsive();
|
||||
this.after('visibleChange', this.visibilityChanged, this);
|
||||
if (this.get('center')) {
|
||||
this.centerDialogue();
|
||||
@ -152,10 +151,14 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (!this.get('center')) {
|
||||
this._originalPosition = bb.getXY();
|
||||
}
|
||||
bb.setStyles({
|
||||
top: w.get('scrollTop'),
|
||||
left: w.get('scrollLeft')
|
||||
});
|
||||
|
||||
if (bb.getStyle('position') !== 'fixed') {
|
||||
// If the boundingBox has been positioned in a fixed manner, then it will not position correctly to scrollTop.
|
||||
bb.setStyles({
|
||||
top: w.get('scrollTop'),
|
||||
left: w.get('scrollLeft')
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
|
||||
// Remove the dialogue from the DOM when it is destroyed.
|
||||
@ -274,8 +277,7 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
* @method makeResponsive
|
||||
*/
|
||||
makeResponsive : function() {
|
||||
var bb = this.get('boundingBox'),
|
||||
content;
|
||||
var bb = this.get('boundingBox');
|
||||
|
||||
if (this.shouldResizeFullscreen()) {
|
||||
// Make this dialogue fullscreen on a small screen.
|
||||
@ -290,15 +292,12 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
'height' : null,
|
||||
'right' : null,
|
||||
'bottom' : null});
|
||||
|
||||
content = Y.one('#' + this.get('id') + ' .' + CSS.BODY);
|
||||
} else {
|
||||
if (this.get('responsive')) {
|
||||
// We must reset any of the fullscreen changes.
|
||||
bb.removeClass(DIALOGUE_FULLSCREEN_CLASS)
|
||||
.setStyles({'width' : this.get('width'),
|
||||
'height' : this.get('height')});
|
||||
content = Y.one('#' + this.get('id') + ' .' + CSS.BODY);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -327,6 +326,7 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (hidden) {
|
||||
bb.addClass(DIALOGUE_HIDDEN_CLASS);
|
||||
}
|
||||
this.makeResponsive();
|
||||
},
|
||||
/**
|
||||
* Return whether this dialogue should be fullscreen or not.
|
||||
|
20
lib/yui/src/notification/js/dialogue.js
vendored
20
lib/yui/src/notification/js/dialogue.js
vendored
@ -90,7 +90,6 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (this.get('render')) {
|
||||
this.render();
|
||||
}
|
||||
this.makeResponsive();
|
||||
this.after('visibleChange', this.visibilityChanged, this);
|
||||
if (this.get('center')) {
|
||||
this.centerDialogue();
|
||||
@ -123,10 +122,14 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (!this.get('center')) {
|
||||
this._originalPosition = bb.getXY();
|
||||
}
|
||||
bb.setStyles({
|
||||
top: w.get('scrollTop'),
|
||||
left: w.get('scrollLeft')
|
||||
});
|
||||
|
||||
if (bb.getStyle('position') !== 'fixed') {
|
||||
// If the boundingBox has been positioned in a fixed manner, then it will not position correctly to scrollTop.
|
||||
bb.setStyles({
|
||||
top: w.get('scrollTop'),
|
||||
left: w.get('scrollLeft')
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
|
||||
// Remove the dialogue from the DOM when it is destroyed.
|
||||
@ -245,8 +248,7 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
* @method makeResponsive
|
||||
*/
|
||||
makeResponsive : function() {
|
||||
var bb = this.get('boundingBox'),
|
||||
content;
|
||||
var bb = this.get('boundingBox');
|
||||
|
||||
if (this.shouldResizeFullscreen()) {
|
||||
// Make this dialogue fullscreen on a small screen.
|
||||
@ -261,15 +263,12 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
'height' : null,
|
||||
'right' : null,
|
||||
'bottom' : null});
|
||||
|
||||
content = Y.one('#' + this.get('id') + ' .' + CSS.BODY);
|
||||
} else {
|
||||
if (this.get('responsive')) {
|
||||
// We must reset any of the fullscreen changes.
|
||||
bb.removeClass(DIALOGUE_FULLSCREEN_CLASS)
|
||||
.setStyles({'width' : this.get('width'),
|
||||
'height' : this.get('height')});
|
||||
content = Y.one('#' + this.get('id') + ' .' + CSS.BODY);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -298,6 +297,7 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
if (hidden) {
|
||||
bb.addClass(DIALOGUE_HIDDEN_CLASS);
|
||||
}
|
||||
this.makeResponsive();
|
||||
},
|
||||
/**
|
||||
* Return whether this dialogue should be fullscreen or not.
|
||||
|
Loading…
x
Reference in New Issue
Block a user