You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
647 B

11 years ago
var message_url = sbRoot + '/ui/get_messages';
$.pnotify.defaults.pnotify_width = "340px";
$.pnotify.defaults.pnotify_history = false;
$.pnotify.defaults.pnotify_delay = 4000;
function check_notifications() {
11 years ago
$.getJSON(message_url, function(data){
$.each(data, function(name,data){
$.pnotify({
pnotify_type: data.type,
pnotify_hide: data.type == 'notice',
pnotify_title: data.title,
pnotify_text: data.message
});
11 years ago
});
});
11 years ago
setTimeout(check_notifications, 3000)
}
11 years ago
$(document).ready(function(){
check_notifications();
});