mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-08 02:24:39 -04:00
Adds notifications.
This commit is contained in:
parent
910312f7ce
commit
c7a9d444af
2 changed files with 46 additions and 0 deletions
29
src/_h5ai/client/js/inc/core/notify.js
Normal file
29
src/_h5ai/client/js/inc/core/notify.js
Normal 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
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue