diff options
author | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-02-20 19:05:28 +0100 |
---|---|---|
committer | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-02-20 19:05:28 +0100 |
commit | ca6f0622237cf5ca1b330886eea197a554dc71fd (patch) | |
tree | ab7f2d12562aae1f1a46f2b0a1ee52022fc3b707 /id/ConfigWebTool/src/main/webapp/js | |
parent | 69475d1ca29ac530df84153635119adf908cbb53 (diff) | |
download | moa-id-spss-ca6f0622237cf5ca1b330886eea197a554dc71fd.tar.gz moa-id-spss-ca6f0622237cf5ca1b330886eea197a554dc71fd.tar.bz2 moa-id-spss-ca6f0622237cf5ca1b330886eea197a554dc71fd.zip |
fixing peps configuration
Diffstat (limited to 'id/ConfigWebTool/src/main/webapp/js')
-rw-r--r-- | id/ConfigWebTool/src/main/webapp/js/common.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js index 384e40509..98f7bdacb 100644 --- a/id/ConfigWebTool/src/main/webapp/js/common.js +++ b/id/ConfigWebTool/src/main/webapp/js/common.js @@ -210,7 +210,12 @@ function oaOnLoad() { 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]); + try { + var lastindex = parseInt(clone.innerHTML.match(/name="storkconfig.cpepslist\[(\d)/)[1]); + } catch (err) { + + var lastindex = 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'); |