Open GoogleCodeExporter opened 9 years ago
Shouldn't the code in click event handler for oTableActions be like following
File : jQuery.datatable.editable.js
<code>
if (oActionFormLink.length != 0) {
oActionFormLink.live("click", function () {
var sClass = this.className;
var classList = sClass.split(/\s+/);
var sActionFormId = "";
var sAction = "";
for (i = 0; i < classList.length; i++) {
if (classList[i].indexOf("table-action-") > -1) {
sAction = classList[i].replace("table-action-", "");
sActionFormId = "#form" + sAction;
}
}
if (sActionFormId == "") {
properties.fnShowError("Cannot find a form with an id " + sActionFormId + " that should be associated to the action - " + sAction, sAction)
}
var oTableAction = $(sActionFormId).data("action-options");
if (oTableAction.sType == "edit") {
//var oTD = ($(this).parents('td'))[0];
var oTR = ($(this).parents('tr'))[0];
fnPopulateFormWithRowCells(oActionForm, oTR);
}
oActionForm = $(sActionFormId);// I added this line. Before this everytime the "oActionForm" object used to be overwritten with the last aoTableActions (array's) last action
$(oActionForm).dialog('open');
});
}
</code>
Original comment by akshay.b...@gmail.com
on 3 Jun 2014 at 10:53
Original issue reported on code.google.com by
albel...@gmail.com
on 18 Oct 2012 at 4:22