diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/poche.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/js/poche.js b/js/poche.js index 42958e83..64df553c 100644 --- a/js/poche.js +++ b/js/poche.js | |||
@@ -1,4 +1,4 @@ | |||
1 | function toggle_favorite(element,id) { | 1 | function toggle_favorite(element, id) { |
2 | $(element).toggleClass('fav-off'); | 2 | $(element).toggleClass('fav-off'); |
3 | $.ajax ({ | 3 | $.ajax ({ |
4 | url: "process.php?action=toggle_fav", | 4 | url: "process.php?action=toggle_fav", |
@@ -6,15 +6,18 @@ function toggle_favorite(element,id) { | |||
6 | }); | 6 | }); |
7 | } | 7 | } |
8 | 8 | ||
9 | function toggle_archive(id) { | 9 | function toggle_archive(element, id, view_article) { |
10 | /*$('#entry-'+id).toggle();*/ | 10 | $(element).toggleClass('archive-off'); |
11 | $.ajax ({ | 11 | $.ajax ({ |
12 | url: "process.php?action=toggle_archive", | 12 | url: "process.php?action=toggle_archive", |
13 | data:{id:id} | 13 | data:{id:id} |
14 | }); | 14 | }); |
15 | var obj = $('#entry-'+id); | 15 | var obj = $('#entry-'+id); |
16 | $('#content').masonry('remove',obj); | ||
17 | 16 | ||
18 | $('#content').masonry('reloadItems'); | 17 | // on vient de la vue de l'article, donc pas de gestion de grille |
19 | $('#content').masonry('reload'); | 18 | if (view_article != 1) { |
19 | $('#content').masonry('remove',obj); | ||
20 | $('#content').masonry('reloadItems'); | ||
21 | $('#content').masonry('reload'); | ||
22 | } | ||
20 | } \ No newline at end of file | 23 | } \ No newline at end of file |