Adds notifications.

This commit is contained in:
Lars Jung 2012-10-18 20:52:47 +02:00
parent 910312f7ce
commit c7a9d444af
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,29 @@
modulejs.define('core/notify', ['$'], function ($) {
var test = null,
template = '<div id="notify"/>',
id = 0,
set = function (content) {
if (content) {
$('#notify').stop(true, true).html(content).fadeIn(400);
} else {
$('#notify').stop(true, true).fadeOut(400);
}
},
init = function () {
$(template).hide().appendTo('body');
};
init();
return {
set: set
};
});