aboutsummaryrefslogtreecommitdiffstats
path: root/html/js/noty.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/js/noty.js')
-rw-r--r--html/js/noty.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/html/js/noty.js b/html/js/noty.js
new file mode 100644
index 0000000..294db6e
--- /dev/null
+++ b/html/js/noty.js
@@ -0,0 +1,30 @@
+// Different noty types:
+// alert, success, error, warning, information, confirmation
+function noty_warn(text) {
+ notyfication('warning', text);
+}
+
+function noty_info(text) {
+ notyfication('information', text);
+}
+
+function noty_debug(text) {
+ notyfication('information', text);
+}
+
+// Haha, did you see what I did here?
+function notyfication(type, text) {
+ var n = noty({
+ text: text,
+ type: type,
+ layout: 'topRight',
+ theme: 'relax',
+ timeout: 30000, // ms
+ animation: {
+ open: 'animated bounceInUp', // Animate.css class names
+ close: 'animated bounceOutUp', // Animate.css class names
+ easing: 'swing', // unavailable - no need
+ speed: 500 // unavailable - no need
+ }
+ });
+}