diff options
author | Christian Pointner <equinox@ffgraz.net> | 2013-12-29 22:35:35 +0000 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2013-12-29 22:35:35 +0000 |
commit | 53180fa94e95906400abb7a7979dec0a8764410a (patch) | |
tree | 8fd866a19573683a61dcc081b81e7b72b568bb95 /map.js | |
parent | 4c98da1ceff06e565a8e85e395c747b28edef19d (diff) |
visability for channels and default route
Diffstat (limited to 'map.js')
-rw-r--r-- | map.js | 202 |
1 files changed, 101 insertions, 101 deletions
@@ -208,9 +208,9 @@ function drawLinks(xmlData) { line.setMap(map); overlays["links"].push(line); } - // if(document.visibleform.elements["defaultroute"].checked) { - // toggleVisible("defaultroute"); - // } + if(document.visibleform.elements["defaultroute"].checked) { + toggleVisible("defaultroute"); + } if(document.visibleform.elements["bad"].checked) { toggleVisible("bad"); } @@ -223,54 +223,54 @@ function drawLinks(xmlData) { if(document.visibleform.elements["tunnel"].checked) { toggleVisible("tunnel"); } - // if(document.visibleform.elements["2.4channel"].checked) { - // toggleVisible("2.4channel"); - // } - // if(document.visibleform.elements["channel1"].checked) { - // toggleVisible("channel1"); - // } - // if(document.visibleform.elements["channel2"].checked) { - // toggleVisible("channel2"); - // } - // if(document.visibleform.elements["channel3"].checked) { - // toggleVisible("channel3"); - // } - // if(document.visibleform.elements["channel4"].checked) { - // toggleVisible("channel4"); - // } - // if(document.visibleform.elements["channel5"].checked) { - // toggleVisible("channel5"); - // } - // if(document.visibleform.elements["channel6"].checked) { - // toggleVisible("channel6"); - // } - // if(document.visibleform.elements["channel7"].checked) { - // toggleVisible("channel7"); - // } - // if(document.visibleform.elements["channel8"].checked) { - // toggleVisible("channel8"); - // } - // if(document.visibleform.elements["channel9"].checked) { - // toggleVisible("channel9"); - // } - // if(document.visibleform.elements["channel10"].checked) { - // toggleVisible("channel10"); - // } - // if(document.visibleform.elements["channel11"].checked) { - // toggleVisible("channel11"); - // } - // if(document.visibleform.elements["channel12"].checked) { - // toggleVisible("channel12"); - // } - // if(document.visibleform.elements["channel13"].checked) { - // toggleVisible("channel13"); - // } - // if(document.visibleform.elements["5channel"].checked) { - // toggleVisible("5channel"); - // } - // if(document.visibleform.elements["undef"].checked) { - // toggleVisible("undef"); - // } + if(document.visibleform.elements["2.4channel"].checked) { + toggleVisible("2.4channel"); + } + if(document.visibleform.elements["channel1"].checked) { + toggleVisible("channel1"); + } + if(document.visibleform.elements["channel2"].checked) { + toggleVisible("channel2"); + } + if(document.visibleform.elements["channel3"].checked) { + toggleVisible("channel3"); + } + if(document.visibleform.elements["channel4"].checked) { + toggleVisible("channel4"); + } + if(document.visibleform.elements["channel5"].checked) { + toggleVisible("channel5"); + } + if(document.visibleform.elements["channel6"].checked) { + toggleVisible("channel6"); + } + if(document.visibleform.elements["channel7"].checked) { + toggleVisible("channel7"); + } + if(document.visibleform.elements["channel8"].checked) { + toggleVisible("channel8"); + } + if(document.visibleform.elements["channel9"].checked) { + toggleVisible("channel9"); + } + if(document.visibleform.elements["channel10"].checked) { + toggleVisible("channel10"); + } + if(document.visibleform.elements["channel11"].checked) { + toggleVisible("channel11"); + } + if(document.visibleform.elements["channel12"].checked) { + toggleVisible("channel12"); + } + if(document.visibleform.elements["channel13"].checked) { + toggleVisible("channel13"); + } + if(document.visibleform.elements["5channel"].checked) { + toggleVisible("5channel"); + } + if(document.visibleform.elements["undef"].checked) { + toggleVisible("undef"); + } } function showLinkInfo(link, point) { @@ -398,63 +398,63 @@ function makeIcon(type) { function toggleVisible(element) { var elements = Object(); - // if (element=='bad' || element=='middle' || element=='good'){ - // document.visibleform.elements["2.4channel"].checked=false; - // document.visibleform.elements["channel1"].checked=false; - // document.visibleform.elements["channel2"].checked=false; - // document.visibleform.elements["channel3"].checked=false; - // document.visibleform.elements["channel4"].checked=false; - // document.visibleform.elements["channel5"].checked=false; - // document.visibleform.elements["channel6"].checked=false; - // document.visibleform.elements["channel7"].checked=false; - // document.visibleform.elements["channel8"].checked=false; - // document.visibleform.elements["channel9"].checked=false; - // document.visibleform.elements["channel10"].checked=false; - // document.visibleform.elements["channel11"].checked=false; - // document.visibleform.elements["channel12"].checked=false; - // document.visibleform.elements["channel13"].checked=false; - // document.visibleform.elements["5channel"].checked=false; - // document.visibleform.elements["undef"].checked=false; - // } - // if (element=='2.4channel'){ - // document.visibleform.elements["channel1"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel2"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel3"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel4"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel5"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel6"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel7"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel8"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel9"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel10"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel11"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel12"].checked=document.visibleform.elements["2.4channel"].checked; - // document.visibleform.elements["channel13"].checked=document.visibleform.elements["2.4channel"].checked; - // } + if (element=='bad' || element=='middle' || element=='good'){ + document.visibleform.elements["2.4channel"].checked=false; + document.visibleform.elements["channel1"].checked=false; + document.visibleform.elements["channel2"].checked=false; + document.visibleform.elements["channel3"].checked=false; + document.visibleform.elements["channel4"].checked=false; + document.visibleform.elements["channel5"].checked=false; + document.visibleform.elements["channel6"].checked=false; + document.visibleform.elements["channel7"].checked=false; + document.visibleform.elements["channel8"].checked=false; + document.visibleform.elements["channel9"].checked=false; + document.visibleform.elements["channel10"].checked=false; + document.visibleform.elements["channel11"].checked=false; + document.visibleform.elements["channel12"].checked=false; + document.visibleform.elements["channel13"].checked=false; + document.visibleform.elements["5channel"].checked=false; + document.visibleform.elements["undef"].checked=false; + } + if (element=='2.4channel'){ + document.visibleform.elements["channel1"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel2"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel3"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel4"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel5"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel6"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel7"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel8"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel9"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel10"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel11"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel12"].checked=document.visibleform.elements["2.4channel"].checked; + document.visibleform.elements["channel13"].checked=document.visibleform.elements["2.4channel"].checked; + } switch(element) { - // case 'defaultroute': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].defaultroute == '0');"); break; + case 'defaultroute': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].defaultroute == '0');"); break; case 'offline': elements.overlays = overlays["locations"]; elements.select = new Function("id", "return (locations[overlays['locations'][id].locid].state == 'offline');"); break; case 'online': elements.overlays = overlays["locations"]; elements.select = new Function("id", "return (locations[overlays['locations'][id].locid].state != 'offline');"); break; case 'bad': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value >= 6);"); break; case 'middle': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value >= 3 && links[overlays['links'][id].linkid].value < 6);"); break; case 'good': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value >= 0 && links[overlays['links'][id].linkid].value < 3);"); break; case 'tunnel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].value == -1);"); break; - // case 'channel1': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '1');"); break; - // case 'channel2': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '2');"); break; - // case 'channel3': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '3');"); break; - // case 'channel4': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '4');"); break; - // case 'channel5': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '5');"); break; - // case 'channel6': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '6');"); break; - // case 'channel7': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '7');"); break; - // case 'channel8': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '8');"); break; - // case 'channel9': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '9');"); break; - // case 'channel10': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '10');"); break; - // case 'channel11': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '11');"); break; - // case 'channel12': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '12');"); break; - // case 'channel13': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '13');"); break; - // case 'undef': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == 'undef');"); break; - // case '2.4channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == '2.4');"); break; - // case '5channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence !=='2.4' && links[overlays['links'][id].linkid].frequence !=='undef');"); break; + case 'channel1': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '1');"); break; + case 'channel2': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '2');"); break; + case 'channel3': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '3');"); break; + case 'channel4': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '4');"); break; + case 'channel5': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '5');"); break; + case 'channel6': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '6');"); break; + case 'channel7': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '7');"); break; + case 'channel8': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '8');"); break; + case 'channel9': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '9');"); break; + case 'channel10': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '10');"); break; + case 'channel11': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '11');"); break; + case 'channel12': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '12');"); break; + case 'channel13': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '13');"); break; + case 'undef': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == 'undef');"); break; + case '2.4channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == '2.4');"); break; + case '5channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence !=='2.4' && links[overlays['links'][id].linkid].frequence !=='undef');"); break; } if(document.visibleform.elements[element].checked) { |