[-] BO : FixBug #PSCSX-122 Live module favorite

This commit is contained in:
Jerome Nadaud
2013-12-11 12:33:33 +01:00
parent 0af76e01fb
commit a918c468ec
2 changed files with 9 additions and 1 deletions
@@ -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);
}
},