diff --git a/admin-dev/themes/default/template/controllers/modules/js.tpl b/admin-dev/themes/default/template/controllers/modules/js.tpl
index 799f285b1..ef165d5c4 100644
--- a/admin-dev/themes/default/template/controllers/modules/js.tpl
+++ b/admin-dev/themes/default/template/controllers/modules/js.tpl
@@ -315,6 +315,8 @@
var value_pref = el.data('value');
var module_pref = el.data('module');
var action_pref = 'f';
+ var total_favorites = parseInt($('#favorite-count').html());
+
try
{
resAjax = $.ajax({
@@ -336,6 +338,12 @@
if (data == 'OK')
{
el.parent('li').find('.toggle_favorite').toggle();
+
+
+ if (value_pref)
+ $('#favorite-count').html(total_favorites+1);
+ else
+ $('#favorite-count').html(total_favorites-1);
}
},
diff --git a/admin-dev/themes/default/template/controllers/modules/page.tpl b/admin-dev/themes/default/template/controllers/modules/page.tpl
index 73f895cf5..efd10729f 100644
--- a/admin-dev/themes/default/template/controllers/modules/page.tpl
+++ b/admin-dev/themes/default/template/controllers/modules/page.tpl
@@ -95,7 +95,7 @@
- {l s='Favorites'} {$nb_modules_favorites}
+ {l s='Favorites'} {$nb_modules_favorites}
{l s='All'} {$nb_modules}