From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 23 Aug 2007 04:10:38 -0000 Subject: [Cluster-devel] conga/luci/cluster resource_form_handlers.js Message-ID: <20070823041038.10037.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 Branch: RHEL5 Changes by: rmccabe at sourceware.org 2007-08-23 04:10:37 Modified files: luci/cluster : resource_form_handlers.js Log message: fix 253914: conga doesn't allow you to reuse nfs export and nfs client resources Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.11&r2=1.20.2.12 --- conga/luci/cluster/resource_form_handlers.js 2007/08/08 21:18:46 1.20.2.11 +++ conga/luci/cluster/resource_form_handlers.js 2007/08/23 04:10:37 1.20.2.12 @@ -16,12 +16,14 @@ var res = document.getElementById(res_id); if (!res || !replace) return (-1); - var new_uuid = update_resource_form_uuid(res, form.parent_uuid.value, form.tree_level.value, form.uuid.value); - var sopt = document.getElementById('gres_chooser'); - if (sopt) - sopt.options[sel.selectedIndex].className = 'invisible'; - return (replace.parentNode.replaceChild(res, replace)); + var clres = res.cloneNode(1); + clres.id = null; + clres.className = null; + + var new_uuid = update_resource_form_uuid(clres, form.parent_uuid.value, form.tree_level.value, form.uuid.value); + + return (replace.parentNode.replaceChild(clres, replace)); } function collapse_div(image) { @@ -333,6 +335,7 @@ } div.parentNode.removeChild(div); +/* var globalres = document.getElementById('global_resources_block'); if (!globalres) return (0); @@ -357,6 +360,7 @@ sopt[i].className = null; } } +*/ return (0); }