summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets/javascript
diff options
context:
space:
mode:
authorScott Dale <sdale@pfsense.org>2007-05-15 01:09:00 +0000
committerScott Dale <sdale@pfsense.org>2007-05-15 01:09:00 +0000
commitbf5ad14297fd38946b4ba84ba41c6989aff76517 (patch)
tree19b88a825b67ebb9c517c78800a15607c4dd3b04 /usr/local/www/widgets/javascript
parent25b66ec5e31edc19a67e1dfb98977148c264f7aa (diff)
downloadpfsense-bf5ad14297fd38946b4ba84ba41c6989aff76517.zip
pfsense-bf5ad14297fd38946b4ba84ba41c6989aff76517.tar.gz
save widget settings
Diffstat (limited to 'usr/local/www/widgets/javascript')
-rw-r--r--usr/local/www/widgets/javascript/traffic_graph.js60
1 files changed, 60 insertions, 0 deletions
diff --git a/usr/local/www/widgets/javascript/traffic_graph.js b/usr/local/www/widgets/javascript/traffic_graph.js
new file mode 100644
index 0000000..8ee192a
--- /dev/null
+++ b/usr/local/www/widgets/javascript/traffic_graph.js
@@ -0,0 +1,60 @@
+function trafficshowDiv(incDiv,swapButtons){
+ //appear element
+ selectedDiv = incDiv + "graphdiv";
+ Effect.BlindDown(selectedDiv, {duration:1});
+ showSave();
+ d = document;
+ if (swapButtons){
+ selectIntLink = selectedDiv + "-min";
+ textlink = d.getElementById(selectIntLink);
+ textlink.style.display = "inline";
+
+ selectIntLink = selectedDiv + "-open";
+ textlink = d.getElementById(selectIntLink);
+ textlink.style.display = "none";
+ }
+ selectIntLink = incDiv + "_graph-config";
+ textlink = d.getElementById(selectIntLink);
+ textlink.value = "show";
+ updateGraphDisplays();
+}
+
+function trafficminimizeDiv(incDiv,swapButtons){
+ //fade element
+ selectedDiv = incDiv + "graphdiv";
+ Effect.BlindUp(selectedDiv, {duration:1});
+ showSave();
+ d = document;
+ if (swapButtons){
+ selectIntLink = selectedDiv + "-open";
+ textlink = d.getElementById(selectIntLink);
+ textlink.style.display = "inline";
+
+ selectIntLink = selectedDiv + "-min";
+ textlink = d.getElementById(selectIntLink);
+ textlink.style.display = "none";
+ }
+ selectIntLink = incDiv + "_graph-config";
+ textlink = d.getElementById(selectIntLink);
+ textlink.value = "hide";
+ updateGraphDisplays();
+}
+
+function updateGraphDisplays(){
+ var graphs = document.getElementsByClassName('graphsettings');
+ var graphsdisplayed = "";
+ var firstprint = false;
+ d = document;
+ for (i=0; i<graphs.length; i++){
+ if (firstprint)
+ graphsdisplayed += ",";
+ var graph = graphs[i].id;
+ graphsdisplayed += graph + ":";
+ textlink = d.getElementById(graph).value;
+ graphsdisplayed += textlink;
+ firstprint = true;
+ }
+ selectIntLink = "traffic_graphs-config";
+ textlink = d.getElementById(selectIntLink);
+ textlink.value = graphsdisplayed;
+} \ No newline at end of file
OpenPOWER on IntegriCloud