From 9786de6a3b5886437d23d9cce06ae76ab440ff51 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 13 Dec 2013 09:13:50 +0100 Subject: new peps list entry can be created --- id/ConfigWebTool/src/main/webapp/js/common.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'id/ConfigWebTool/src/main/webapp/js') diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js index ff9509895..e6fcdf977 100644 --- a/id/ConfigWebTool/src/main/webapp/js/common.js +++ b/id/ConfigWebTool/src/main/webapp/js/common.js @@ -177,4 +177,13 @@ function oaOnLoad() { ); return true; -} \ No newline at end of file +} +function newPeps() { + var target = $(document.getElementById("stork_pepslist").getElementsByTagName("tr")).last()[0]; + var clone = target.cloneNode(true); + var lastindex = parseInt(clone.innerHTML.match(/name="storkconfig.cpepslist\[(\d)/)[1]); + var nextindex = lastindex + 1; + clone.innerHTML = clone.innerHTML.replace(/name="storkconfig.cpepslist\[\d/g, 'name="storkconfig.cpepslist[' + nextindex); + clone.innerHTML = clone.innerHTML.replace(/(.*" value=").*?(".*)/g, '$1$2'); + target.parentNode.appendChild(clone); +} -- cgit v1.2.3