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/master Commit: d2b22b9132cb8d34cd9ad66e5e168cf9f262bfcd Parents: 3447eef Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Tue Sep 16 21:25:26 2014 +0200 Committer: Lukasz Lenart <lukaszlen...@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; }