From 6ed37834d6d15a2a5e09a812f24455eb93bbc98b Mon Sep 17 00:00:00 2001 From: Ralph Asendeteufrer Date: Mon, 8 Oct 2012 17:14:12 -0400 Subject: [PATCH] BUG 9152 addGridRow intermittent in Preview panel PROBLEM cannot addrows into a grid after change the preview tab, seemd ther are two different instances of grid. FIX grid.js was taking the ancient instange of the grid, since a new one is been displayed th old not. the addGridRow() method not points to the new instance. --- gulliver/js/grid/core/grid.js | 45 ++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/gulliver/js/grid/core/grid.js b/gulliver/js/grid/core/grid.js index 2613acadd..24e3a2007 100755 --- a/gulliver/js/grid/core/grid.js +++ b/gulliver/js/grid/core/grid.js @@ -465,6 +465,9 @@ var G_Grid = function(oForm, sGridName){ eval('aObjects[n].onclick = ' + onclickevn.replace(/\[1\]/g, '\[' + currentRow + '\]') + ';'); } break; + case "file": + aObjects[n].value = ""; + break; } } } @@ -719,6 +722,10 @@ var G_Grid = function(oForm, sGridName){ var iRow = Number(sRow); var iRowAux = iRow + 1; var lastItem = oObj.oGrid.rows.length - 2; + var elem2ParentNode; + var elem2Id = ""; + var elem2Name = ""; + var elemAux; deleteRowOnDynaform(oObj, iRow); @@ -726,16 +733,35 @@ var G_Grid = function(oForm, sGridName){ for (i = 1; i < oObj.oGrid.rows[iRowAux - 1].cells.length; i++) { var oCell1 = oObj.oGrid.rows[iRowAux - 1].cells[i]; var oCell2 = oObj.oGrid.rows[iRowAux].cells[i]; + switch (oCell1.innerHTML.replace(/^\s+|\s+$/g, '').substr(0, 6).toLowerCase()){ case '