BUG 000 Pm tables fixes when edit and destroy data

This commit is contained in:
Erik Amaru Ortiz
2011-09-02 10:00:32 -04:00
parent e8c36e636a
commit a21fff422b
2 changed files with 10 additions and 14 deletions

View File

@@ -363,7 +363,7 @@ class pmTablesProxy extends HttpProxyController
$primaryKeysValues[] = isset($row[$key['FLD_NAME']]) ? $row[$key['FLD_NAME']] : '';
}
$result['rows'][$i]['__index__'] = md5(implode('-', $primaryKeysValues));
$result['rows'][$i]['__index__'] = G::encrypt(implode('-', $primaryKeysValues), 'pmtable');
}
return $result;
@@ -421,7 +421,7 @@ class pmTablesProxy extends HttpProxyController
$con->rollback();
throw new Exception($e->getMessage());
}
$index = md5(implode('-', $primaryKeysValues));
$index = G::encrypt(implode('-', $primaryKeysValues), 'pmtable');
}
else {
$toSave = false;
@@ -1037,6 +1037,7 @@ class pmTablesProxy extends HttpProxyController
*/
function _dataDestroy($row)
{
$row = G::decrypt($row, 'pmtable');
$row = str_replace('"', '', $row);
$keys = explode('-', $row);
$params = array();
@@ -1052,8 +1053,6 @@ class pmTablesProxy extends HttpProxyController
return true;
} else {
return false;
$this->success = false;
$this->message = 'Update Failed';
}
}

View File

@@ -346,16 +346,13 @@ NewPMTableRow = function(){
};
//Load PM Table Edition Row Form
EditPMTableRow = function(){
iGrid = Ext.getCmp('infoGrid');
rowsSelected = iGrid.getSelectionModel().getSelections();
var aRowsSeleted = (RetrieveRowsID(rowsSelected)).split(",") ;
var aTablesPKF = (TABLES.PKF).split(","); ;
var sParam = '';
for(var i=0;i<aTablesPKF.length; i++){
sParam += '&' + aTablesPKF[i] + '=' + aRowsSeleted[i];
}
location.href = 'additionalTablesDataEdit?sUID='+TABLES.UID+sParam;
EditPMTableRow = function(){
var row = Ext.getCmp('infoGrid').getSelectionModel().getSelected();
var selIndex = store.indexOfId(row.id);
editor.stopEditing();
Ext.getCmp('infoGrid').getView().refresh();
Ext.getCmp('infoGrid').getSelectionModel().selectRow(selIndex);
editor.startEditing(selIndex);
};
//Confirm PM Table Row Deletion Tasks