]> WPIA git - gigi.git/blobdiff - static/static/js/expert.js
fix: hide non-activated domain pingconfigs
[gigi.git] / static / static / js / expert.js
index a4d14acac95b41e0fbaabbfb335749e7399b6362..09987b170124e1ab14859d96400319a63d59379a 100644 (file)
                if(expert !== null) {
                        expert.onchange = (function(expert){return function(){showExpert(expert.checked)}})(expert);
                }
+               $(".panel-activatable").map(function() {
+                       var panel = $(this);
+                       var refresh = function(){
+                               if(this.checked){
+                                       panel.find(".panel-body").removeClass("hidden");
+                               }else{
+                                       panel.find(".panel-body").addClass("hidden");
+                               }
+                       };
+                       panel.find(".panel-heading [type=\"checkbox\"]").map(refresh);
+                       panel.find(".panel-heading [type=\"checkbox\"]").click(refresh);
+                       return this.id;
+               });
        }
        (function(oldLoad) {
                if (oldLoad == undefined) {