diff --git a/src/_h5ai/client/css/inc/notify.less b/src/_h5ai/client/css/inc/notify.less new file mode 100644 index 00000000..19e38cef --- /dev/null +++ b/src/_h5ai/client/css/inc/notify.less @@ -0,0 +1,17 @@ + +#notify { + position: fixed; + left: 50%; + top: 3px; + width: 200px; + margin-left: -100px; + z-index: 100; + padding: 2px 6px 2px 6px; + color: #fff; + // background-color: rgba(240, 100, 0, 0.5); + // border: 2px solid rgba(255, 255, 255, 0.5); + // border: 2px solid rgba(240, 100, 0, 0.9); + background-color: rgba(0, 0, 0, 0.2); + .border-radius(4px); + text-align: center; +} diff --git a/src/_h5ai/client/js/inc/core/notify.js b/src/_h5ai/client/js/inc/core/notify.js new file mode 100644 index 00000000..b4e7c9c7 --- /dev/null +++ b/src/_h5ai/client/js/inc/core/notify.js @@ -0,0 +1,29 @@ + +modulejs.define('core/notify', ['$'], function ($) { + + var test = null, + + template = '
', + + 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 + }; +});