瀏覽代碼

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

Marcus McLaughlin 15 年之前
父節點
當前提交
dff5882bdb
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      desktop/core/static/js/Source/BehaviorFilters/Behavior.DataGroupToggle.js

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

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