2018-06-04 00:06:17 +08:00
|
|
|
(function (global, document) {
|
2018-06-24 10:01:21 +08:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
(document);
|
2018-06-04 00:06:17 +08:00
|
|
|
|
|
|
|
// Registers a given ID for a fade out after 5 seconds.
|
|
|
|
global.registerHide = function(id) {
|
|
|
|
setTimeout(function() {
|
|
|
|
$(id).fadeOut("fast");
|
|
|
|
}, 5000);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Shows a global message on the given label ID and registers it for hiding.
|
|
|
|
global.showGlobalMessage = function(id, text) {
|
|
|
|
global.textSet(id, text);
|
|
|
|
global.registerHide(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Shows a global error message.
|
|
|
|
global.globalErrorShow = function(text) {
|
|
|
|
global.showGlobalMessage("#global-error", text);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Shows a global success message.
|
|
|
|
global.globalOKShow = function(text) {
|
|
|
|
global.showGlobalMessage("#global-ok", text);
|
|
|
|
}
|
|
|
|
|
2018-12-20 13:48:43 +08:00
|
|
|
} (window.commento, document));
|