]> git.immae.eu Git - github/wallabag/wallabag.git/blame - js/poche.js
tout est recentré sur index.php
[github/wallabag/wallabag.git] / js / poche.js
CommitLineData
a1953dff 1function toggle_favorite(element, id) {
e46efced 2 $(element).toggleClass('fav-off');
3 $.ajax ({
139769aa 4 url: "index.php?action=toggle_fav",
a1953dff 5 data:{id:id}
e46efced 6 });
7}
8
a1953dff 9function toggle_archive(element, id, view_article) {
c8bbe19b 10 $(element).toggleClass('archive-off');
e46efced 11 $.ajax ({
139769aa 12 url: "index.php?action=toggle_archive",
a1953dff 13 data:{id:id}
e46efced 14 });
b70971e0 15 var obj = $('#entry-'+id);
b70971e0 16
c8bbe19b 17 // on vient de la vue de l'article, donc pas de gestion de grille
18 if (view_article != 1) {
19 $('#content').masonry('remove',obj);
20 $('#content').masonry('reloadItems');
21 $('#content').masonry('reload');
22 }
139769aa 23}
24
a1953dff 25function sort_links(view, sort) {
26 //$('#content').load('index.php', { view: view, sort: sort, full_head: 'no' } );
27 $.get('index.php', { view: view, sort: sort, full_head: 'no' }, function(data) {
28 $('#content').html(data);
29 });
b70971e0 30}