1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

possibilité de mettre en fav ou en archive un article depuis la page article

This commit is contained in:
nicosomb 2013-04-12 13:13:21 +02:00
parent 67e7910439
commit c8bbe19b3f
8 changed files with 107 additions and 100 deletions

View 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');
}
}