1 M.core_message = M.core_message || {};
3 M.core_message.init_focus = function(Y, eid) {
4 document.getElementById(eid).focus();
7 M.core_message.init_refresh_page = function(Y, delay, url) {
8 var delay_callback = function() {
9 document.location.replace(url);
11 setTimeout(delay_callback, delay);
14 M.core_message.combinedsearchgotfocus = function(e) {
15 if (e.target.get('value')==this.defaultsearchterm) {
20 M.core_message.init_notification = function(Y, title, content, url) {
21 Y.use('overlay', function() {
22 var o = new Y.Overlay({
23 headerContent : title,
26 o.render(Y.one(document.body));
28 if (Y.UA.ie > 0 && Y.UA.ie < 7) {
29 // Adjust for IE 6 (can't handle fixed pos)
30 //align the bottom right corner of the overlay with the bottom right of the viewport
32 points:[Y.WidgetPositionAlign.BR, Y.WidgetPositionAlign.BR]
36 Y.one('#notificationyes').on('click', function(e) {
37 window.location.href = url;
39 Y.one('#notificationno').on('click', function(e) {