diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index ec3ed20b4..6eb17f8de 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -1620,7 +1620,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:Newsroom:Preferences' => 'Préférences du centre d\'information', 'UI:Newsroom:ConfigurationLink' => 'Configuration', 'UI:Newsroom:ResetCache' => 'Ràz du cache', - 'UI:Newsroom:ResetCache:Success:Message' => 'Le cache a été réinitialisé avec succès', + 'UI:Newsroom:ResetCache:Success:Message' => 'Le cache de la newsroom a été réinitialisé avec succès', 'UI:Newsroom:DisplayMessagesFor_Provider' => 'Afficher les messages de %1$s', 'UI:Newsroom:DisplayAtMost_X_Messages' => 'Afficher au plus %1$s messages dans le menu %2$s.', )); diff --git a/js/components/newsroom-menu.js b/js/components/newsroom-menu.js index b619300ea..8168e7274 100644 --- a/js/components/newsroom-menu.js +++ b/js/components/newsroom-menu.js @@ -363,7 +363,6 @@ $(function() var sKey = this._makeCacheKey(idx); localStorage.removeItem(sKey); } - CombodoToast.OpenSuccessToast(Dict.S('UI:Newsroom:ResetCache:Success:Message')); }, _makeCacheKey: function(idxProvider) { diff --git a/js/pages/backoffice/itop-newsroom.view-all.js b/js/pages/backoffice/itop-newsroom.view-all.js index 210b4e7cc..4f74b0c9d 100644 --- a/js/pages/backoffice/itop-newsroom.view-all.js +++ b/js/pages/backoffice/itop-newsroom.view-all.js @@ -15,6 +15,8 @@ $('body').on('itop.notification.deleted', '.ibo-notifications--view-all--contain $('.ibo-notifications--view-all--unread-action').attr('disabled', 'disabled'); $('.ibo-notifications--view-all--delete-action').attr('disabled', 'disabled'); } + + $('#ibo-navigation-menu--notifications-menu').newsroom_menu("clearCache"); }); let fReadUnreadDisabled = function() { @@ -28,6 +30,8 @@ let fReadUnreadDisabled = function() { $('.ibo-notifications--view-all--read-action').removeAttr('disabled'); $('.ibo-notifications--view-all--unread-action').removeAttr('disabled'); } + + $('#ibo-navigation-menu--notifications-menu').newsroom_menu("clearCache"); } $('body').on('itop.notification.read itop.notification.unread', '.ibo-notifications--view-all--container', fReadUnreadDisabled); diff --git a/pages/preferences.php b/pages/preferences.php index 0eeb4a8af..9bf43ffd3 100644 --- a/pages/preferences.php +++ b/pages/preferences.php @@ -315,7 +315,11 @@ JS // - Reset button $oNewsroomResetCacheButton = ButtonUIBlockFactory::MakeForAlternativeDestructiveAction(Dict::S('UI:Newsroom:ResetCache')); - $oNewsroomResetCacheButton->SetOnClickJsCode("$('#ibo-navigation-menu--notifications-menu').newsroom_menu('clearCache')"); + $oNewsroomResetCacheButton->SetOnClickJsCode(<<AddSubBlock($oNewsroomResetCacheButton); // - Cancel button $oNewsroomCancelButton = ButtonUIBlockFactory::MakeForCancel(Dict::S('UI:Button:Cancel')); @@ -916,7 +920,12 @@ try { } if ($bProvidersModified) { - $oPage->add_ready_script('$(".itop-newsroom_menu").newsroom_menu("clearCache");'); + $oPage->add_ready_script( + <<