Browse Source

HUE-186. Add functionality to DataGroupToggle
* Only showing section if it is not displayed. *

Marcus McLaughlin 15 years ago
parent
commit
dff5882bdb

+ 6 - 6
desktop/core/static/js/Source/BehaviorFilters/Behavior.DataGroupToggle.js

@@ -46,10 +46,10 @@ Behavior.addGlobalFilters({
                                 return;
                                 return;
                         }
                         }
                         sections.each(function(section) {
                         sections.each(function(section) {
-                                if(show.contains(section)) {
-                                        section.show();
-                                } else {
+                                if(!show.contains(section)) {
                                         section.hide();
                                         section.hide();
+                                } else if (!section.isDisplayed()) {
+                                        section.show();
                                 }
                                 }
                         });
                         });
                 };
                 };
@@ -70,10 +70,10 @@ Behavior.addGlobalFilters({
                                 return;
                                 return;
                         }
                         }
                         sections.each(function(section) {
                         sections.each(function(section) {
-                                if(show.contains(section)) {
-                                        section.show();
-                                } else {
+                                if(!show.contains(section)) {
                                         section.hide();
                                         section.hide();
+                                } else if (!section.isDisplayed()) {
+                                        section.show();
                                 }
                                 }
                         });
                         });
                 };
                 };