Merge pull request #686 from ralpheav/master

BUG  9152 - addGridRow intermittent in Preview panel
This commit is contained in:
julceslauhub
2012-10-08 14:36:18 -07:00

View File

@@ -342,6 +342,7 @@ var G_Grid = function(oForm, sGridName){
};
this.addGridRow = function() {
this.oGrid = document.getElementById(this.sGridName);
var i, aObjects;
var defaultValue = '';
var n,a,x;
@@ -744,24 +745,19 @@ var G_Grid = function(oForm, sGridName){
elem2ParentNode = aObjects2[0].parentNode;
elem2Id = aObjects2[0].id;
elem2Name = aObjects2[0].name;
aObjects2[0].id = aObjects1[0].id;
aObjects2[0].name = aObjects1[0].name;
aObjects1[0].parentNode.replaceChild(aObjects2[0], aObjects1[0]);
elemAux = document.createElement("input");
elemAux.type = "file";
elemAux.setAttribute("id", elem2Id);
elemAux.setAttribute("name", elem2Name);
elem2ParentNode.insertBefore(elemAux, elem2ParentNode.firstChild);
break;
default:
if (aObjects2[0].type == "checkbox") {
aObjects1[0].checked = aObjects2[0].checked;
}
aObjects1[0].value = aObjects2[0].value;
aObjects1[0].className = aObjects2[0].className;
break;
@@ -822,11 +818,11 @@ var G_Grid = function(oForm, sGridName){
}
break;
default:
if ((oCell2.innerHTML.indexOf("changeValues") == 111 || oCell2.innerHTML.indexOf("changeValues") == 115)) {
if (( oCell2.innerHTML.indexOf('changeValues') == 111 || oCell2.innerHTML.indexOf('changeValues') == 115 ) ) {
break;
}
if (oCell2.innerHTML.toLowerCase().indexOf("deletegridrow") == -1) {
if (oCell2.innerHTML.toLowerCase().indexOf('deletegridrow') == -1) {
oCell1.innerHTML = oCell2.innerHTML;
}
break;