mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 19:18:44 +02:00
N°4529 - Object list: Count in header not updated when refreshing through the icon
This commit is contained in:
@@ -83,7 +83,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
|
||||
}
|
||||
},
|
||||
drawCallback: function (settings) {
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
if(settings.json)
|
||||
{
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
}
|
||||
if ($(this).closest('.ibo-panel--body').find('[name=selectionMode]').val() === "negative")
|
||||
{
|
||||
$(this).closest('.dataTables_wrapper').find('.checkAll')[0].checked = true;
|
||||
@@ -108,7 +111,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
|
||||
},
|
||||
{% else %}
|
||||
drawCallback: function (settings) {
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
if(settings.json)
|
||||
{
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
}
|
||||
$(this).closest('.dataTables_wrapper').unblock();
|
||||
// Hiding pagination if only one page
|
||||
if ($(this).closest('.dataTables_wrapper').find('.dataTables_paginate:last .paginate_button:not(.previous):not(.next)').length < 2)
|
||||
|
||||
@@ -24,7 +24,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
|
||||
],
|
||||
{% endif %}
|
||||
drawCallback: function (settings) {
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
if(settings.json)
|
||||
{
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
}
|
||||
// Hiding pagination if only one page
|
||||
if ($(this).closest('.dataTables_wrapper').find('.dataTables_paginate:last .paginate_button:not(.previous):not(.next)').length < 2)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
|
||||
{% endfor %}
|
||||
],
|
||||
drawCallback: function (settings) {
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
if(settings.json)
|
||||
{
|
||||
$(this).closest('.ibo-panel').find('.ibo-datatable--result-count').html(settings.json.recordsTotal);
|
||||
}
|
||||
// Hiding pagination if only one page
|
||||
if ($(this).closest('.dataTables_wrapper').find('.dataTables_paginate:last .paginate_button:not(.previous):not(.next)').length < 2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user