Skip to contentSkip to conversation

conga/luci/cluster index_html

Cluster-devel [email protected] 1 participant 1 message Sep 25, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-09-25 16:25:57

Modified files:
luci/cluster : index_html

Log message:
fresh new javascript for fences

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.12&r2=1.13

luci/cluster/index_html +24 -0
@@ -94,6 +94,30 @@
         window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
         return false;
         }
+
+      function swap_div(container_id, element_id) {
+        container_element = document.getElementById(container_id)
+        if (!container_element) {
+          alert('Can\'t find element with id = ' + container_id);
+          return (-1);
+        }
+                                                                                
+        child_element = document.getElementById(element_id);
+        if (!child_element) {
+          alert('Can\'t find element with id = ' + element_id);
+          return (-1);
+        }
+                                                                                
+        temp = container_element.firstChild;
+        container_element.replaceChild(child_element, container_element.firstChild);                                                                                
+        invisible_div = document.getElementById('invisible');
+        if (!invisible_div) {
+          alert('No invisible div');
+          return (-1);
+        }
+                                                                                
+        invisible_div.appendChild(temp);
+      }
         //-->
        </SCRIPT>
       <metal:javascriptslot define-slot="javascript_head_slot" />