diff options
Diffstat (limited to 'apps/user_ldap/js/wizard/wizardTabGeneric.js')
-rw-r--r-- | apps/user_ldap/js/wizard/wizardTabGeneric.js | 31 |
1 files changed, 29 insertions, 2 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(); + }); + }, }); |