浏览代码

Show a spinner when SOGo restarts

andryyy 8 年之前
父节点
当前提交
3dc486993e
共有 2 个文件被更改,包括 26 次插入0 次删除
  1. 2 0
      data/web/inc/footer.inc.php
  2. 24 0
      data/web/inc/header.inc.php

+ 2 - 0
data/web/inc/footer.inc.php

@@ -85,6 +85,7 @@ $(document).ready(function() {
 	// Trigger SOGo restart
 	$('#triggerRestartSogo').click(function(){
 		$(this).prop("disabled",true);
+		$(this).html('<span class="glyphicon glyphicon-refresh glyphicon-spin"></span> ');
 		$('#statusTriggerRestartSogo').text('Stopping SOGo workers, this may take a while... ');
 		$.ajax({
 			method: 'get',
@@ -105,6 +106,7 @@ $(document).ready(function() {
 					},
 					success: function(data) {
 						$('#statusTriggerRestartSogo').append(data);
+						$('#triggerRestartSogo').html('<span class="glyphicon glyphicon-ok"></span> ');
 					}
 				});
 			}

+ 24 - 0
data/web/inc/header.inc.php

@@ -119,6 +119,30 @@ table[data-sortable].sortable-theme-bootstrap.sortable-theme-bootstrap-striped t
     background-color: #fafafa;
 	border:1px solid white;
 }
+.glyphicon-spin {
+    -webkit-animation: spin 1000ms infinite linear;
+    animation: spin 1000ms infinite linear;
+}
+@-webkit-keyframes spin {
+    0% {
+        -webkit-transform: rotate(0deg);
+        transform: rotate(0deg);
+    }
+    100% {
+        -webkit-transform: rotate(359deg);
+        transform: rotate(359deg);
+    }
+}
+@keyframes spin {
+    0% {
+        -webkit-transform: rotate(0deg);
+        transform: rotate(0deg);
+    }
+    100% {
+        -webkit-transform: rotate(359deg);
+        transform: rotate(359deg);
+    }
+}
 </style>
 <?php
 if (preg_match("/mailbox.php/i", $_SERVER['REQUEST_URI'])):