LDAP Wizard: reset connection status indicator when switching LDAP config

This commit is contained in:
Arthur Schiwon 2016-04-01 12:11:47 +02:00 committed by Morris Jobke
parent 6321596134
commit 3e26e1ec16
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 11 additions and 0 deletions

View File

@ -24,6 +24,8 @@ OCA = OCA || {};
STATUS_INCOMPLETE: 1,
/** @constant {number} */
STATUS_SUCCESS: 2,
/** @constant {number} */
STATUS_UNTESTED: 3,
/**
* initializes the instance. Always call it after creating the instance.
@ -210,6 +212,7 @@ OCA = OCA || {};
* @listens ConfigModel#configLoaded
*/
onConfigLoaded: function(view) {
view._updateStatusIndicator(view.STATUS_UNTESTED);
view.basicStatusCheck(view);
view.functionalityCheck();
},
@ -370,6 +373,14 @@ OCA = OCA || {};
var $indicatorLight = $('.ldap_config_state_indicator_sign');
switch(state) {
case this.STATUS_UNTESTED:
$indicator.text(t('user_ldap',
'Testing configuration…'
));
$indicator.addClass('ldap_grey');
$indicatorLight.removeClass('error');
$indicatorLight.removeClass('success');
break;
case this.STATUS_ERROR:
$indicator.text(t('user_ldap',
'Configuration incorrect'