aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/webapp/js/common.js
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-11-03 11:13:38 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-11-03 11:13:38 +0100
commita3e59e5011e16271dab6cc8299a1d1241b4a7fb2 (patch)
treeaae2f450b7296a286c09a8c51d423aec4bedd0dd /id/ConfigWebTool/src/main/webapp/js/common.js
parent83dc74e60a4d9031285ac27aa0661fe0c26485e0 (diff)
parent1fbff5f5a86733bc6a75c8ae901153baa0963441 (diff)
downloadmoa-id-spss-a3e59e5011e16271dab6cc8299a1d1241b4a7fb2.tar.gz
moa-id-spss-a3e59e5011e16271dab6cc8299a1d1241b4a7fb2.tar.bz2
moa-id-spss-a3e59e5011e16271dab6cc8299a1d1241b4a7fb2.zip
Merge branch 'moa-2.1-Snapshot'MOA-SPSS-2.0.3MOA-ID-2.1.2
Conflicts: .gitignore
Diffstat (limited to 'id/ConfigWebTool/src/main/webapp/js/common.js')
-rw-r--r--id/ConfigWebTool/src/main/webapp/js/common.js34
1 files changed, 26 insertions, 8 deletions
diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js
index f7ef2c415..9f19e88a2 100644
--- a/id/ConfigWebTool/src/main/webapp/js/common.js
+++ b/id/ConfigWebTool/src/main/webapp/js/common.js
@@ -223,18 +223,36 @@ function oaOnLoad() {
function newPeps() {
var target = $(document.getElementById("stork_pepslist").getElementsByTagName("tr")).last()[0];
var clone = target.cloneNode(true);
+ var lastindex;
try {
- var lastindex = parseInt(clone.innerHTML.match(/name="storkconfig.cpepslist\[(\d)/)[1]);
+ lastindex = parseInt(clone.innerHTML.match(/name="storkconfig.cpepslist\[(\d*)\]/)[1]);
} catch (err) {
-
- var lastindex = 1;
+ lastindex = 1;
}
var nextindex = lastindex + 1;
-
- clone.innerHTML = clone.innerHTML.replace(/[A-Z]{2}</, '<');
- clone.innerHTML = clone.innerHTML.replace(/<input.*type="hidden".*>/, '<div id="wwgrp_loadGeneralConfig_storkconfig_cpepslist_0__countryCode" class="wwgrp"> <div id="wwctrl_loadGeneralConfig_storkconfig_cpepslist_0__countryCode" class="wwctrl"> <input id="loadGeneralConfig_storkconfig_cpepslist_0__countryCode" class="textfield_short" type="text" value="IT" name="storkconfig.cpepslist[0].countryCode"> </div> </div>');
- clone.innerHTML = clone.innerHTML.replace(/name="storkconfig.cpepslist\[\d/g, 'name="storkconfig.cpepslist[' + nextindex);
- clone.innerHTML = clone.innerHTML.replace(/(.*" value=").*?(".*)/g, '$1$2');
+ clone.innerHTML = '<tr>\
+ <td>\
+ <div id="wwgrp_loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__countryCode" class="wwgrp">\
+ <div id="wwctrl_loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__countryCode" class="wwctrl">\
+ <input id="loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__countryCode" class="textfield_short" type="text" value="" name="storkconfig.cpepslist['+nextindex+'].countryCode"></div>\
+ </div>\
+ </td>\
+ <td>\
+ <div id="wwgrp_loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__URL" class="wwgrp">\
+ <div id="wwctrl_loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__URL" class="wwctrl">\
+ <input type="text" name="storkconfig.cpepslist['+nextindex+'].URL" value="" id="loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__URL" class="textfield_long"></div>\
+ </div>\
+ </td>\
+ <td>\
+ <div id="wwgrp_loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__supportsXMLSignature" class="wwgrp">\
+ <div id="wwctrl_loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__supportsXMLSignature" class="wwctrl">\
+ <input type="checkbox" name="storkconfig.cpepslist['+nextindex+'].supportsXMLSignature" value="true" checked="checked" id="loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__supportsXMLSignature">\
+ <input type="hidden" id="__checkbox_loadGeneralConfig_storkconfig_cpepslist_'+nextindex+'__supportsXMLSignature" name="__checkbox_storkconfig.cpepslist['+nextindex+'].supportsXMLSignature" value=""></div>\
+ </div>\
+ </td>\
+ <td>\
+ <input type="button" value="löschen" onclick="this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);"></td>\
+ </tr>';
target.parentNode.appendChild(clone);
}
function newStorkAttribute() {