aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-12 13:13:21 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-12 13:13:21 +0200
commitc8bbe19b3fd2ba268c98561690de37fe599ff055 (patch)
treecb6d9c7c6c1bc973f3569b85a6694cb4d5059d10 /js
parent67e7910439d364f1f7a4dac1d233a7c1055fb933 (diff)
downloadwallabag-c8bbe19b3fd2ba268c98561690de37fe599ff055.tar.gz
wallabag-c8bbe19b3fd2ba268c98561690de37fe599ff055.tar.zst
wallabag-c8bbe19b3fd2ba268c98561690de37fe599ff055.zip
possibilité de mettre en fav ou en archive un article depuis la page article
Diffstat (limited to 'js')
-rw-r--r--js/poche.js15
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 @@
1function toggle_favorite(element,id) { 1function 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
9function toggle_archive(id) { 9function 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