forked from wallabag/wallabag
possibilité de mettre en fav ou en archive un article depuis la page article
This commit is contained in:
15
js/poche.js
15
js/poche.js
@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user