BUG 6909 SOLVED. Field to insert PM variables fixed in grids.

This commit is contained in:
Enrique Ponce De Leon
2011-05-20 10:34:25 -04:00
parent 1277022770
commit 15a447ecad

View File

@@ -174,7 +174,6 @@ var G_Grid = function(oForm, sGridName){
if ((aux4.indexOf ('display:none') > 0) || (aux4.indexOf('display: none')>0)){ if ((aux4.indexOf ('display:none') > 0) || (aux4.indexOf('display: none')>0)){
sw_display = true; sw_display = true;
} }
pTxt = txt.split('="'); pTxt = txt.split('="');
for (v=1; v < pTxt.length; v++){ for (v=1; v < pTxt.length; v++){
aux = pTxt[v]; aux = pTxt[v];
@@ -249,7 +248,8 @@ var G_Grid = function(oForm, sGridName){
}else{ }else{
defaultValue = ''; defaultValue = '';
} }
switch(aObjects[0].type){ for(n=0; n < aObjects.length; n++){
switch(aObjects[n].type){
case 'text': //TEXTBOX, CURRENCY, PERCENTAGE, DATEPICKER case 'text': //TEXTBOX, CURRENCY, PERCENTAGE, DATEPICKER
tags = oNewRow.getElementsByTagName('td')[i].getElementsByTagName('a'); tags = oNewRow.getElementsByTagName('td')[i].getElementsByTagName('a');
if (tags.length == 2){ //DATEPICKER if (tags.length == 2){ //DATEPICKER
@@ -275,27 +275,34 @@ var G_Grid = function(oForm, sGridName){
oNewRow.getElementsByTagName('td')[i].appendChild(a2); oNewRow.getElementsByTagName('td')[i].appendChild(a2);
//Load DatePicker Trigger //Load DatePicker Trigger
datePicker4("", newID, attributes.mask, attributes.start, attributes.end, attributes.time); datePicker4("", newID, attributes.mask, attributes.start, attributes.end, attributes.time);
aObjects[0].value = defaultValue; aObjects[n].value = defaultValue;
}else{ }else{
if (_BROWSER.name == 'msie'){ //Clone new input element if browser is IE if (_BROWSER.name == 'msie' && aObjects.length==1){ //Clone new input element if browser is IE
oNewOBJ = this.cloneInput(aObjects[0]); oNewOBJ = this.cloneInput(aObjects[n]);
oNewOBJ.value = defaultValue; oNewOBJ.value = defaultValue;
parentGG = aObjects[0].parentNode; parentGG = aObjects[n].parentNode;
parentGG.removeChild(aObjects[0]); parentGG.removeChild(aObjects[n]);
parentGG.appendChild(oNewOBJ); parentGG.appendChild(oNewOBJ);
}else{ }else{
aObjects[0].value = defaultValue; aObjects[n].value = defaultValue;
} }
} }
break; break;
case 'checkbox': //CHECKBOX case 'checkbox': //CHECKBOX
aObjects[0].checked = false; aObjects[n].checked = false;
aObjects[0].value = defaultValue; aObjects[n].value = defaultValue;
break; break;
case 'hidden': //HIDDEN case 'hidden': //HIDDEN
if ((attributes.gridtype != 'yesno' && attributes.gridtype != 'dropdown') || typeof attributes.gridtype == 'undefined') if ((attributes.gridtype != 'yesno' && attributes.gridtype != 'dropdown') || typeof attributes.gridtype == 'undefined')
aObjects[0].value = defaultValue; aObjects[n].value = defaultValue;
break; break;
case 'button':
if (aObjects[n].onclick){
var onclickevn = new String(aObjects[n].onclick);
eval('aObjects[n].onclick = ' + onclickevn.replace(/\[1\]/g, '\[' + currentRow + '\]') + ';');
}
break;
}
} }
} }
aObjects = null; aObjects = null;