diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-02-05 16:25:22 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-02-05 16:25:22 +0100 |
commit | 2bcb7862143e62932a8d7cb92299a9a49d0fdc31 (patch) | |
tree | 9c2cdda55c4a49d338bdcf30b510c951dc5ad4f1 /apps/user_ldap/js | |
parent | 7a9d428d6f6146d44883e2c5bab04db702792ce4 (diff) | |
download | nextcloud-server-2bcb7862143e62932a8d7cb92299a9a49d0fdc31.tar.gz nextcloud-server-2bcb7862143e62932a8d7cb92299a9a49d0fdc31.zip |
no fruitless count attempts, and notification should disappear
Diffstat (limited to 'apps/user_ldap/js')
-rw-r--r-- | apps/user_ldap/js/settings.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index b1abb0994ba..768d62a18d1 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -351,7 +351,7 @@ var LdapWizard = { encodeURIComponent($('#ldap_serverconfig_chooser').val()); LdapWizard.showSpinner(spinnerID); - var request = LdapWizard.ajax(param, + LdapWizard.ajax(param, function(result) { LdapWizard.applyChanges(result); LdapWizard.hideSpinner(spinnerID); @@ -360,7 +360,7 @@ var LdapWizard = { } }, function (result) { - OC.Notification.show('Counting the entries failed with, ' + result.message); + OC.Notification.showTemporary('Counting the entries failed with: ' + result.message); LdapWizard.hideSpinner(spinnerID); if(!_.isUndefined(doneCallback)) { doneCallback(method); @@ -371,11 +371,17 @@ var LdapWizard = { }, countGroups: function(doneCallback) { - LdapWizard._countThings('countGroups', '#ldap_group_count', doneCallback); + var groupFilter = $('#ldap_group_filter').val(); + if(!_.isEmpty(groupFilter)) { + LdapWizard._countThings('countGroups', '#ldap_group_count', doneCallback); + } }, countUsers: function(doneCallback) { - LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback); + var userFilter = $('#ldap_userlist_filter').val(); + if(!_.isEmpty(userFilter)) { + LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback); + } }, /** |