Skip to content

Commit

Permalink
Corregir definición de parámetros en eventos
Browse files Browse the repository at this point in the history
(cherry picked from commit b7c940b)
  • Loading branch information
xaabi6 committed May 15, 2024
1 parent ceb9582 commit 544adf9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/rup_table/rup.table.editForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,11 +997,11 @@
*/
dt.ajax.reload();

$('#' + ctx.sTableId).triggerHandler('tableEditFormAfterInsertRow',actionType,ctx);
$('#' + ctx.sTableId).triggerHandler('tableEditFormAfterInsertRow', [ctx, actionType]);
}
if(actionType === 'PUT'){
dt.ajax.reload(function () {
$('#' + ctx.sTableId).trigger('tableEditFormSuccessCallSaveAjax',actionType,ctx);
$('#' + ctx.sTableId).trigger('tableEditFormSuccessCallSaveAjax', [ctx, actionType]);
}, false);
} else {
if (ctx.oInit.multiSelect === undefined) {
Expand All @@ -1013,7 +1013,7 @@
ctx.multiselection.selectedRowsPerPage[0] = arra;
DataTable.Api().select.drawSelectId(ctx);
}
$('#' + ctx.sTableId).trigger('tableAddFormSuccessCallSaveAjax',actionType,ctx);
$('#' + ctx.sTableId).trigger('tableAddFormSuccessCallSaveAjax', [ctx, actionType]);
}

} else { // Eliminar
Expand All @@ -1022,20 +1022,20 @@

if (ctx.oInit.multiSelect !== undefined) {
dt.ajax.reload(function () {
$('#' + ctx.sTableId).trigger('tableEditFormSuccessCallSaveAjax',actionType,ctx);
$('#' + ctx.sTableId).trigger('tableEditFormSuccessCallSaveAjax', [ctx, actionType]);
DataTable.Api().multiSelect.deselectAll(dt);
}, false);
} else if (ctx.oInit.select !== undefined) {
dt.ajax.reload(function () {
$('#' + ctx.sTableId).trigger('tableEditFormSuccessCallSaveAjax',actionType,ctx);
$('#' + ctx.sTableId).trigger('tableEditFormSuccessCallSaveAjax', [ctx, actionType]);
DataTable.Api().select.deselect(ctx);
}, false);
}
_callFeedbackOk(ctx, ctx.oInit.feedback.$feedbackContainer, msgFeedBack, 'ok'); //Se informa feedback de la tabla
}
},
complete: function () {
$('#' + ctx.sTableId).triggerHandler('tableEditFormCompleteCallSaveAjax',actionType,ctx);
$('#' + ctx.sTableId).triggerHandler('tableEditFormCompleteCallSaveAjax', [ctx, actionType]);
},
error: function (xhr) {
let divErrorFeedback;
Expand Down Expand Up @@ -1075,7 +1075,7 @@
_callFeedbackOk(ctx, divErrorFeedback, xhr.responseText, 'error');
}

$('#' + ctx.sTableId).triggerHandler('tableEditFormErrorCallSaveAjax',actionType,ctx);
$('#' + ctx.sTableId).triggerHandler('tableEditFormErrorCallSaveAjax', [ctx, actionType]);
},
validate: validaciones,
feedback: feed.rup_feedback({
Expand Down

0 comments on commit 544adf9

Please sign in to comment.