]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - js/poche.js
suppression ancien fichier
[github/wallabag/wallabag.git] / js / poche.js
index 42958e83e0a53db26bbd6f4b0bf79d0e41d883d3..64df553c9d91c25cec31cea1bf29e628a8703873 100644 (file)
@@ -1,4 +1,4 @@
-function toggle_favorite(element,id) {
+function toggle_favorite(element, id) {
     $(element).toggleClass('fav-off');
     $.ajax ({
         url: "process.php?action=toggle_fav",
@@ -6,15 +6,18 @@ function toggle_favorite(element,id) {
     });
 }
 
-function toggle_archive(id) {
-    /*$('#entry-'+id).toggle();*/
+function toggle_archive(element, id, view_article) {
+    $(element).toggleClass('archive-off');
     $.ajax ({
         url: "process.php?action=toggle_archive",
         data:{id:id}
     });
     var obj = $('#entry-'+id);
-    $('#content').masonry('remove',obj);
 
-    $('#content').masonry('reloadItems');
-    $('#content').masonry('reload');
+    // on vient de la vue de l'article, donc pas de gestion de grille
+    if (view_article != 1) {
+        $('#content').masonry('remove',obj);
+        $('#content').masonry('reloadItems');
+        $('#content').masonry('reload');
+    }
 }
\ No newline at end of file