mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
N°6124 - Performance: Draw datatable only once when elements added in linksets
This commit is contained in:
@@ -254,9 +254,10 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
|
|||||||
function (data) {
|
function (data) {
|
||||||
if (data != '') {
|
if (data != '') {
|
||||||
$.each(data.data, function (idx, row) {
|
$.each(data.data, function (idx, row) {
|
||||||
$('#datatable_'+me.id).DataTable().row.add(row).draw();
|
$('#datatable_'+me.id).DataTable().row.add(row);
|
||||||
});
|
});
|
||||||
|
// N°6124 Only draw table once for performance reasons
|
||||||
|
$('#datatable_'+me.id).DataTable().draw();
|
||||||
|
|
||||||
$.each(data.scripts, function (idx, script) {
|
$.each(data.scripts, function (idx, script) {
|
||||||
$.globalEval(script);
|
$.globalEval(script);
|
||||||
@@ -266,7 +267,6 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
|
|||||||
$(this).trigger('validate', '');
|
$(this).trigger('validate', '');
|
||||||
}); // Validate newly added form fields...
|
}); // Validate newly added form fields...
|
||||||
$('#datatable_'+me.id).DataTable().columns.adjust().draw();
|
$('#datatable_'+me.id).DataTable().columns.adjust().draw();
|
||||||
//$('#datatable_team_list').DataTable().columns.adjust().draw();
|
|
||||||
$('#busy_'+me.iInputId).html('');
|
$('#busy_'+me.iInputId).html('');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user