]> source.dussan.org Git - nextcloud-server.git/commitdiff
show Spinner when stuff is being saved
authorArthur Schiwon <blizzz@owncloud.com>
Tue, 14 Oct 2014 15:39:27 +0000 (17:39 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Tue, 14 Oct 2014 15:39:27 +0000 (17:39 +0200)
apps/user_ldap/css/settings.css
apps/user_ldap/js/settings.js
apps/user_ldap/templates/part.wizardcontrols.php

index 0dfcf47425688bc2ac0d07d59a4eda878666afbb..2353bfe1bfdfba2916ada81072ba50b69efb8269 100644 (file)
@@ -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;
index 6e936a9109106724797d74b56dd53c0e2643ff55..1972447970f3cdbe3cd51e0c2df361d3828c46f7 100644 (file)
@@ -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);
                                }
                        }
                );
index 33e1614c9c64253411fc1a8525422b4c999e9135..90d558e72d1fe9dd5dff8dcdec97d8a34a847ef8 100644 (file)
@@ -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">