show Spinner when stuff is being saved
This commit is contained in:
parent
836f0839e5
commit
c26e9c675a
|
@ -123,6 +123,14 @@ select[multiple=multiple] + button {
|
|||
max-width: 40%;
|
||||
}
|
||||
|
||||
#ldap .ldap_saving {
|
||||
margin-right: 15px;
|
||||
color: orange;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#ldap .ldap_saving img { height: 15px; }
|
||||
|
||||
.ldap_config_state_indicator_sign {
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
|
|
|
@ -747,7 +747,10 @@ var LdapWizard = {
|
|||
}
|
||||
},
|
||||
|
||||
saveProcesses: 0,
|
||||
_save: function(object, value) {
|
||||
$('#ldap .ldap_saving').removeClass('hidden');
|
||||
LdapWizard.saveProcesses += 1;
|
||||
param = 'cfgkey='+encodeURIComponent(object.id)+
|
||||
'&cfgval='+encodeURIComponent(value)+
|
||||
'&action=save'+
|
||||
|
@ -757,10 +760,14 @@ var LdapWizard = {
|
|||
OC.filePath('user_ldap','ajax','wizard.php'),
|
||||
param,
|
||||
function(result) {
|
||||
LdapWizard.saveProcesses -= 1;
|
||||
if(LdapWizard.saveProcesses === 0) {
|
||||
$('#ldap .ldap_saving').addClass('hidden');
|
||||
}
|
||||
if(result.status === 'success') {
|
||||
LdapWizard.processChanges(object);
|
||||
} else {
|
||||
// alert('Oooooooooooh :(');
|
||||
console.log('Could not save value for ' + object.id);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<div class="ldapWizardControls">
|
||||
<span class="ldap_saving hidden"><?php p($l->t('Saving'));?> <img class="wizSpinner" src="<?php p(image_path('core', 'loading.gif')); ?>"/></span>
|
||||
<span class="ldap_config_state_indicator"></span> <span class="ldap_config_state_indicator_sign"></span>
|
||||
<button class="ldap_action_back invisible" name="ldap_action_back"
|
||||
type="button">
|
||||
|
|
Loading…
Reference in New Issue