+ function shownone(btn)
+ {
+ $(btn).parents(".btn-group").children(".btn-element.active").each(function(){$(this).click()});
+ }
+
+ function showall(btn)
+ {
+ $(btn).parents(".btn-group").children(".btn-element:not(.active)").each(function(){$(this).click()});
+ }
+
+ function showpeer (peer)
+ {
+ $("#"+peer).toggleClass("active");
+ if ($("#"+peer).hasClass("active")) {
+ $("#btn-showcomp > .btn-element.active").each(function(){
+ for (var index = 0; index < types.length; ++index) {
+ var className = "." + types[index] + "." + peer + "." + this.id;
+ $(className).show();
+ if ($("#"+types[index]).hasClass("active"))
+ return;
+ }
+ });
+ } else {
+ $("."+peer).hide();
+ }
+ }
+
+ function showcomp (comp)
+ {
+ $("#"+comp).toggleClass("active");
+ if ($("#"+comp).hasClass("active")) {
+ $("#btn-showpeer > .btn-element.active").each(function(){
+ for (var index = 0; index < types.length; ++index) {
+ var className = "." + types[index] + "." + comp + "." + this.id;
+ $(className).show();
+ if ($("#"+types[index]).hasClass("active"))
+ return;
+ }
+ });
+ } else {
+ $("."+comp).hide();
+ }
+ }
+
+ function load_debug (btn, up)