Show a spinner when SOGo restarts

master
andryyy 2016-12-31 23:05:52 +01:00
parent 6d24f582b6
commit 3dc486993e
2 changed files with 26 additions and 0 deletions

View File

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

View File

@ -119,6 +119,30 @@ table[data-sortable].sortable-theme-bootstrap.sortable-theme-bootstrap-striped t
background-color: #fafafa; background-color: #fafafa;
border:1px solid white; 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> </style>
<?php <?php
if (preg_match("/mailbox.php/i", $_SERVER['REQUEST_URI'])): if (preg_match("/mailbox.php/i", $_SERVER['REQUEST_URI'])):