Skip to content

Commit

Permalink
Merge branch 'MDL-30627-master-1' of git://git.luns.net.uk/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparup Banerjee committed Dec 20, 2011
2 parents 21be45b + bc6b179 commit 50c5955
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 0 additions & 7 deletions blocks/community/yui/comments/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
5 changes: 3 additions & 2 deletions enrol/yui/notification/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 50c5955

Please sign in to comment.