You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/09/16 21:25:43 UTC
[1/2] git commit: WW-4365 Solves problem with matching option id to
headerKey
Repository: struts
Updated Branches:
refs/heads/develop e01109697 -> d2b22b913
WW-4365 Solves problem with matching option id to headerKey
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/3447eefd
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/3447eefd
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/3447eefd
Branch: refs/heads/develop
Commit: 3447eefdac3972d77fb3343ea31c9d61754da285
Parents: e011096
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Sep 16 21:23:37 2014 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Sep 16 21:23:37 2014 +0200
----------------------------------------------------------------------
.../resources/org/apache/struts2/static/optiontransferselect.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/3447eefd/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
index 74e27d6..c4024a3 100644
--- a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
+++ b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
@@ -44,7 +44,7 @@ function compile(ptn) {
if (ptn == '' || !window.RegExp) {
return function(val) { return val == ptn; }
} else {
- var reg = new RegExp(ptn);
+ var reg = new RegExp("\\b" + ptn);
return function (val) {
if (val == '') { // ignore empty option added by template
return true;
[2/2] git commit: Solves minor style problems
Posted by lu...@apache.org.
Solves minor style problems
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d2b22b91
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d2b22b91
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d2b22b91
Branch: refs/heads/develop
Commit: d2b22b9132cb8d34cd9ad66e5e168cf9f262bfcd
Parents: 3447eef
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Sep 16 21:25:26 2014 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Sep 16 21:25:26 2014 +0200
----------------------------------------------------------------------
.../org/apache/struts2/static/optiontransferselect.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/d2b22b91/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
index c4024a3..85a2e28 100644
--- a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
+++ b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
@@ -56,8 +56,8 @@ function compile(ptn) {
}
function moveOptions(objSourceElement, objTargetElement, toSort, chooseFunc) {
- var aryTempSourceOptions = new Array();
- var aryTempTargetOptions = new Array();
+ var aryTempSourceOptions = [];
+ var aryTempTargetOptions = [];
var x = 0;
//looping through source element to find selected options
@@ -70,7 +70,7 @@ function moveOptions(objSourceElement, objTargetElement, toSort, chooseFunc) {
}
else {
//storing options that stay to recreate select element
- var objTempValues = new Object();
+ var objTempValues = {};
objTempValues.text = objSourceElement.options[i].text;
objTempValues.value = objSourceElement.options[i].value;
aryTempSourceOptions[x] = objTempValues;
@@ -80,7 +80,7 @@ function moveOptions(objSourceElement, objTargetElement, toSort, chooseFunc) {
//sorting and refilling target list
for (var i = 0; i < objTargetElement.length; i++) {
- var objTempValues = new Object();
+ var objTempValues = {};
objTempValues.text = objTargetElement.options[i].text;
objTempValues.value = objTargetElement.options[i].value;
aryTempTargetOptions[i] = objTempValues;
@@ -178,7 +178,7 @@ function moveOptionDown(objTargetElement, type, ptn) {
function swapOptions(objTargetElement, first, second) {
var opt = objTargetElement.options;
var temp = new Option(opt[first].text, opt[first].value, opt[first].defaultSelected, opt[first].selected);
- var temp2= new Option(opt[second].text, opt[second].value, opt[second].defaultSelected, opt[second].selected);
+ var temp2 = new Option(opt[second].text, opt[second].value, opt[second].defaultSelected, opt[second].selected);
opt[first] = temp2;
opt[second] = temp;
}