From 2ed1191622419e963081072b1db777e7b376d054 Mon Sep 17 00:00:00 2001 From: Frederick Borges Date: Wed, 10 Feb 2021 10:49:00 +0100 Subject: [PATCH] B #5212: fix dropdowns on pagination (#784) Signed-off-by: Frederick Borges (cherry picked from commit d65510d9737e8eeaf1e63c35385e7b899eb85eab) --- src/sunstone/public/app/sunstone.js | 5 +++++ src/sunstone/public/app/utils/tab-datatable.js | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/sunstone/public/app/sunstone.js b/src/sunstone/public/app/sunstone.js index 91d804c7a9..61361f5601 100644 --- a/src/sunstone/public/app/sunstone.js +++ b/src/sunstone/public/app/sunstone.js @@ -631,6 +631,11 @@ define(function(require) { } e.preventDefault(); }); + + // Reload foundation ips dropdown when change page on datatables + $(document).on("click", ".paginate_button", function() { + $('.ips-dropdown').foundation(); + }); }; var _setupTabs = function() { diff --git a/src/sunstone/public/app/utils/tab-datatable.js b/src/sunstone/public/app/utils/tab-datatable.js index c3f3c921b5..7b8ebd5020 100644 --- a/src/sunstone/public/app/utils/tab-datatable.js +++ b/src/sunstone/public/app/utils/tab-datatable.js @@ -214,7 +214,7 @@ define(function(require) { $('#' + this.dataTableId + 'Search').on('input', function() { that.dataTable.fnFilter($(this).val()); - $("ul.ips-dropdown").foundation(); + $(".ips-dropdown").foundation(); return false; }); @@ -699,7 +699,7 @@ define(function(require) { if (that.postUpdateView) { that.postUpdateView(); - $("ul.ips-dropdown").foundation(); + $(".ips-dropdown").foundation(); } if(that.conf.searchDropdownHTML != undefined){ @@ -741,7 +741,7 @@ define(function(require) { } }); - $("ul.ips-dropdown").foundation(); + $(".ips-dropdown").foundation(); } function _getElementData(id, resource_tag) {