AY 4 tahun lalu
induk
melakukan
714767d1af

TEMPAT SAMPAH
__debug_bin


+ 38 - 0
webroot/css/Semantic-UI-Alert.css

@@ -0,0 +1,38 @@
+.ui-alert-content{
+  position: fixed;
+  width: 360px;
+  z-index: 2060;
+}
+.ui-alert-content-top-right{
+  top: 20px;
+  right: 20px;
+}
+.ui-alert-content-top-center{
+  top: 20px;
+  margin: 0 0 0 -180px;
+  left: 50%;
+}
+.ui-alert-content-top-left{
+  top: 20px;
+  left: 20px;
+}
+.ui-alert-content-bottom-right{
+  bottom: 0;
+  right: 20px;
+}
+.ui-alert-content-bottom-center{
+  bottom: 0;
+  margin: 0 0 0 -180px;
+  left: 50%;
+}
+.ui-alert-content-bottom-left{
+  bottom: 0;
+  left: 20px;
+}
+.ui-alert {
+  opacity: 0;
+  filter: alpha(opacity=0);
+}
+.ui-alert p{
+  display: table;
+}

+ 52 - 0
webroot/js/Semantic-UI-Alert.js

@@ -0,0 +1,52 @@
+$.uiAlert = function(options) {
+    var setUI = $.extend({
+        textHead: 'Your user registration was successful.',
+        text: 'You may now log-in with the username you have chosen',
+        textcolor: '#19c3aa',
+        bgcolors: '#fff',
+        position: 'top-right',
+        icon: '',
+        time: 5,
+        permanent: false
+    }, options);
+
+    var ui_alert = 'ui-alert-content';
+    ui_alert += '-' + setUI.position;
+    setUI.bgcolors = 'style="background-color: ' + setUI.bgcolor + ';   box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset,0 0 0 0 transparent;"';
+    if (setUI.bgcolors === '') setUI.bgcolors = 'style="background-color: ; box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset,0 0 0 0 transparent;"';
+    if (!$('body > .' + ui_alert).length) {
+        $('body').append('<div class="ui-alert-content ' + ui_alert + '" style="width: inherit;"></div>');
+    }
+    var message = $('<div id="messages" class="ui icon message" ' + setUI.bgcolors + '><i class="' + setUI.icon + ' icon" style="color: ' + setUI.textcolor + ';"></i><i class="close icon" style="color: ' + setUI.textcolor + ';" id="messageclose"></i><div style="color: ' + setUI.textcolor + '; margin-right: 10px;">   <div class="header">' + setUI.textHead + '</div>  <p> ' + setUI.text + '</p></div>  </div>');
+    $('.' + ui_alert).prepend(message);
+    message.animate({
+        opacity: '1',
+    }, 800);
+    if (setUI.permanent === false) {
+        var timer = 0;
+        $(message).mouseenter(function() {
+            clearTimeout(timer);
+        }).mouseleave(function() {
+            uiAlertHide();
+        });
+        uiAlertHide();
+    }
+
+    function uiAlertHide() {
+        timer = setTimeout(function() {
+            message.animate({
+                opacity: '0',
+            }, 300, function() {
+                message.remove();
+            });
+        }, (setUI.time * 1000));
+    }
+
+    $('#messageclose')
+        .on('click', function() {
+            $(this)
+                .closest('#messages')
+                .transition('fade');
+        });
+
+};

+ 23 - 0
webroot/js/alert.js

@@ -0,0 +1,23 @@
+function msg(content) {
+    $.uiAlert({
+        textHead: "Info",
+        text: content,
+        bgcolor: '#19c3aa',
+        textcolor: '#fff',
+        position: 'top-right',
+        icon: 'checkmark box',
+        time: 3
+    });
+}
+
+function errmsg(content) {
+    $.uiAlert({
+        textHead: "Error",
+        text: content,
+        bgcolor: '#DB2828',
+        textcolor: '#fff',
+        position: 'top-right',
+        icon: 'remove circle',
+        time: 3,
+    })
+}

+ 5 - 0
webroot/setting/banip.html

@@ -15,6 +15,11 @@
     <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
     <!-- MC Skin-->
     <link rel="stylesheet" href="/css/minecraft-skinviewer.css">
+    <!-- Semantic UI Alert-->
+    <link rel="stylesheet" href="/css/Semantic-UI-Alert.css">
+    <script src="/js/semantic-ui-alert.js"></script>
+    <script src="/js/alert.js"></script>
+
 </head>
 
 <body>

+ 4 - 0
webroot/setting/banplayer.html

@@ -15,6 +15,10 @@
     <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
     <!-- MC Skin-->
     <link rel="stylesheet" href="/css/minecraft-skinviewer.css">
+    <!-- Semantic UI Alert-->
+    <link rel="stylesheet" href="/css/Semantic-UI-Alert.css">
+    <script src="/js/semantic-ui-alert.js"></script>
+    <script src="/js/alert.js"></script>
 </head>
 
 <body>

+ 4 - 0
webroot/setting/eula.html

@@ -15,6 +15,10 @@
     <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
     <!-- MC Skin-->
     <link rel="stylesheet" href="/css/minecraft-skinviewer.css">
+    <!-- Semantic UI Alert-->
+    <link rel="stylesheet" href="/css/Semantic-UI-Alert.css">
+    <script src="/js/semantic-ui-alert.js"></script>
+    <script src="/js/alert.js"></script>
 </head>
 
 <body>

+ 4 - 0
webroot/setting/ops.html

@@ -15,6 +15,10 @@
     <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
     <!-- MC Skin-->
     <link rel="stylesheet" href="/css/minecraft-skinviewer.css">
+    <!-- Semantic UI Alert-->
+    <link rel="stylesheet" href="/css/Semantic-UI-Alert.css">
+    <script src="/js/semantic-ui-alert.js"></script>
+    <script src="/js/alert.js"></script>
 </head>
 
 <body>

+ 4 - 0
webroot/setting/properties.html

@@ -15,6 +15,10 @@
     <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
     <!-- MC Skin-->
     <link rel="stylesheet" href="/css/minecraft-skinviewer.css">
+    <!-- Semantic UI Alert-->
+    <link rel="stylesheet" href="/css/Semantic-UI-Alert.css">
+    <script src="/js/semantic-ui-alert.js"></script>
+    <script src="/js/alert.js"></script>
 </head>
 
 <body>

+ 4 - 0
webroot/setting/whitelist.html

@@ -15,6 +15,10 @@
     <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
     <!-- MC Skin-->
     <link rel="stylesheet" href="/css/minecraft-skinviewer.css">
+    <!-- Semantic UI Alert-->
+    <link rel="stylesheet" href="/css/Semantic-UI-Alert.css">
+    <script src="/js/semantic-ui-alert.js"></script>
+    <script src="/js/alert.js"></script>
 </head>
 
 <body>