summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/js/wizard/wizardTabGeneric.js31
-rw-r--r--apps/user_ldap/js/wizard/wizardTabGroupFilter.js2
-rw-r--r--apps/user_ldap/js/wizard/wizardTabLoginFilter.js2
-rw-r--r--apps/user_ldap/js/wizard/wizardTabUserFilter.js2
4 files changed, 32 insertions, 5 deletions
diff --git a/apps/user_ldap/js/wizard/wizardTabGeneric.js b/apps/user_ldap/js/wizard/wizardTabGeneric.js
index 8940a8468a0..21085e3a584 100644
--- a/apps/user_ldap/js/wizard/wizardTabGeneric.js
+++ b/apps/user_ldap/js/wizard/wizardTabGeneric.js
@@ -28,6 +28,12 @@ OCA = OCA || {};
*/
bjQuiButtonClass: 'ui-button',
+ /**
+ * @property {bool} - indicates whether a filter mode toggle operation
+ * is still in progress
+ */
+ isToggling: false,
+
/** @inheritdoc */
init: function(tabIndex, tabID) {
this.tabIndex = tabIndex;
@@ -408,6 +414,20 @@ OCA = OCA || {};
},
/**
+ * sets the filter mode initially and resets the "isToggling" marker.
+ * This method is called after a save operation against the mode key.
+ *
+ * @param mode
+ */
+ setFilterModeOnce: function(mode) {
+ this.isToggling = false;
+ if(!this.filterModeInitialized) {
+ this.filterModeInitialized = true;
+ this.setFilterMode(mode);
+ }
+ },
+
+ /**
* sets the filter mode according to the provided configuration value
*
* @param {string} mode
@@ -568,8 +588,15 @@ OCA = OCA || {};
this.filterModeDisableableElements = filterModeDisableableElements;
this.filterModeStateElement = filterModeStateElement;
this.filterModeKey = filterModeKey;
- $switcher.click(this._toggleRawFilterMode);
- }
+ var view = this;
+ $switcher.click(function() {
+ if(view.isToggling) {
+ return;
+ }
+ view.isToggling = true;
+ view._toggleRawFilterMode();
+ });
+ },
});
diff --git a/apps/user_ldap/js/wizard/wizardTabGroupFilter.js b/apps/user_ldap/js/wizard/wizardTabGroupFilter.js
index 528b5d83670..3fbff9de9a0 100644
--- a/apps/user_ldap/js/wizard/wizardTabGroupFilter.js
+++ b/apps/user_ldap/js/wizard/wizardTabGroupFilter.js
@@ -26,7 +26,7 @@ OCA = OCA || {};
featureName: 'GroupObjectClasses'
},
ldap_group_filter_mode: {
- setMethod: 'setFilterMode'
+ setMethod: 'setFilterModeOnce'
},
ldap_groupfilter_groups: {
$element: $('#ldap_groupfilter_groups'),
diff --git a/apps/user_ldap/js/wizard/wizardTabLoginFilter.js b/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
index 691ddb5ac9a..7b9a408784a 100644
--- a/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
+++ b/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
@@ -32,7 +32,7 @@ OCA = OCA || {};
setMethod: 'setLoginAttributeEmail'
},
ldap_login_filter_mode: {
- setMethod: 'setFilterMode'
+ setMethod: 'setFilterModeOnce'
},
ldap_loginfilter_attributes: {
$element: $('#ldap_loginfilter_attributes'),
diff --git a/apps/user_ldap/js/wizard/wizardTabUserFilter.js b/apps/user_ldap/js/wizard/wizardTabUserFilter.js
index 4fe223ee075..da7cb77568e 100644
--- a/apps/user_ldap/js/wizard/wizardTabUserFilter.js
+++ b/apps/user_ldap/js/wizard/wizardTabUserFilter.js
@@ -26,7 +26,7 @@ OCA = OCA || {};
featureName: 'UserObjectClasses'
},
ldap_user_filter_mode: {
- setMethod: 'setFilterMode'
+ setMethod: 'setFilterModeOnce'
},
ldap_userfilter_groups: {
$element: $('#ldap_userfilter_groups'),