message MDL-22320 message notification overlay stick to the bottom right of the screen fix for IE 6

This commit is contained in:
Andrew Davis 2010-06-30 06:37:52 +00:00
parent 290d9fe42a
commit 8a811c5674

View file

@ -1,4 +1,4 @@
M.core_message = {}; M.core_message = M.core_message || {};
M.core_message.init_focus = function(Y, eid) { M.core_message.init_focus = function(Y, eid) {
document.getElementById(eid).focus(); document.getElementById(eid).focus();
@ -47,15 +47,17 @@ M.core_message.init_notification = function(Y, title, content, url) {
Y.use('overlay', function() { Y.use('overlay', function() {
var o = new Y.Overlay({ var o = new Y.Overlay({
headerContent : title, headerContent : title,
bodyContent : content, bodyContent : content
//centered : true
}); });
o.render(Y.one(document.body)); o.render(Y.one(document.body));
//align the bottom right corner of the overlay with the bottom right of the viewport if (Y.UA.ie > 0 && Y.UA.ie < 7) {
o.set("align", { // Adjust for IE 6 (can't handle fixed pos)
points:[Y.WidgetPositionAlign.BR, Y.WidgetPositionAlign.BR] //align the bottom right corner of the overlay with the bottom right of the viewport
}); o.set("align", {
points:[Y.WidgetPositionAlign.BR, Y.WidgetPositionAlign.BR]
});
}
Y.one('#notificationyes').on('click', function(e) { Y.one('#notificationyes').on('click', function(e) {
window.location.href = url; window.location.href = url;