mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-30627-master-1' of git://git.luns.net.uk/moodle
This commit is contained in:
commit
50c59551c6
7
blocks/community/yui/comments/comments.js
vendored
7
blocks/community/yui/comments/comments.js
vendored
@ -31,13 +31,6 @@ YUI.add('moodle-block_community-comments', function(Y) {
|
||||
this.overlays[commentid].render();
|
||||
this.overlays[commentid].hide();
|
||||
|
||||
// position the overlay in the middle of the web browser window
|
||||
var WidgetPositionAlign = Y.WidgetPositionAlign;
|
||||
this.overlays[commentid].set("align", {
|
||||
node:"", //empty => viewport
|
||||
points:[WidgetPositionAlign.CC, WidgetPositionAlign.CC]
|
||||
});
|
||||
|
||||
Y.one('#comments-'+commentid).on('click', this.show, this, commentid);
|
||||
}
|
||||
|
||||
|
5
enrol/yui/notification/notification.js
vendored
5
enrol/yui/notification/notification.js
vendored
@ -81,8 +81,9 @@ Y.extend(DIALOGUE, Y.Overlay, {
|
||||
if (hidden) {
|
||||
bb.setStyle('top', '-1000px').removeClass(DIALOGUE_PREFIX+'-hidden');
|
||||
}
|
||||
var x = Math.round((bb.get('winWidth') - bb.get('offsetWidth'))/2);
|
||||
var y = Math.round((bb.get('winHeight') - bb.get('offsetHeight'))/2)+Y.one(window).get('scrollTop');
|
||||
var x = Math.max(Math.round((bb.get('winWidth') - bb.get('offsetWidth'))/2), 15);
|
||||
var y = Math.max(Math.round((bb.get('winHeight') - bb.get('offsetHeight'))/2), 15) + Y.one(window).get('scrollTop');
|
||||
|
||||
if (hidden) {
|
||||
bb.addClass(DIALOGUE_PREFIX+'-hidden');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user