2010-06-30 06:37:52 +00:00
|
|
|
M.core_message = M.core_message || {};
|
2010-02-06 12:38:07 +00:00
|
|
|
|
2010-05-03 09:25:51 +00:00
|
|
|
M.core_message.init_focus = function(Y, eid) {
|
2010-02-06 12:38:07 +00:00
|
|
|
document.getElementById(eid).focus();
|
2010-09-17 19:33:24 +00:00
|
|
|
};
|
2010-02-06 12:38:07 +00:00
|
|
|
|
|
|
|
M.core_message.init_refresh_page = function(Y, delay, url) {
|
2013-04-15 13:29:14 +01:00
|
|
|
var delay_callback = function() {
|
|
|
|
document.location.replace(url);
|
|
|
|
};
|
|
|
|
setTimeout(delay_callback, delay);
|
2010-09-17 19:33:24 +00:00
|
|
|
};
|
2010-06-25 08:16:10 +00:00
|
|
|
|
|
|
|
M.core_message.combinedsearchgotfocus = function(e) {
|
|
|
|
if (e.target.get('value')==this.defaultsearchterm) {
|
|
|
|
e.target.select();
|
|
|
|
}
|
2010-09-17 19:33:24 +00:00
|
|
|
};
|
2010-06-29 06:57:21 +00:00
|
|
|
|
2011-08-16 14:06:11 +08:00
|
|
|
M.core_message.init_editsettings = function(Y) {
|
|
|
|
var editsettings = {
|
|
|
|
|
|
|
|
init : function() {
|
|
|
|
var disableall = Y.one(".disableallcheckbox");
|
|
|
|
disableall.on('change', editsettings.changeState);
|
|
|
|
disableall.simulate("change");
|
|
|
|
},
|
|
|
|
|
|
|
|
changeState : function(e) {
|
|
|
|
Y.all('.notificationpreference').each(function(node) {
|
|
|
|
var disabled = e.target.get('checked');
|
|
|
|
|
|
|
|
node.removeAttribute('disabled');
|
|
|
|
if (disabled) {
|
|
|
|
node.setAttribute('disabled', 1)
|
|
|
|
}
|
|
|
|
}, this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
editsettings.init();
|
2013-04-15 13:29:14 +01:00
|
|
|
}
|