From mboxrd@z Thu Jan 1 00:00:00 1970 From: jparsons@sourceware.org Date: 25 Sep 2006 16:25:57 -0000 Subject: [Cluster-devel] conga/luci/cluster index_html Message-ID: <20060925162557.6898.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- conga/luci/cluster/index_html 2006/09/08 22:54:32 1.12 +++ conga/luci/cluster/index_html 2006/09/25 16:25:57 1.13 @@ -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); + } //-->