num_comments,
comments,
int_id,
+ uuid,
hide_images,
unread,feed_id,marked,published,link,last_read,orig_feed_id,
last_marked, last_published,
"tag_cache," .
"label_cache," .
"link," .
+ "uuid," .
"last_read," .
"(SELECT hide_images FROM ttrss_feeds WHERE id = feed_id) AS hide_images," .
"last_marked, last_published, " .
}
function hook_article_button($line) {
- return "<img src=\"plugins/share/share.png\"
+ $img = $line['uuid'] ? "share.png" : "notshared.png";
+
+ return "<img id='SHARE-IMG-".$line['int_id']."' src=\"plugins/share/$img\"
class='tagsPic' style=\"cursor : pointer\"
onclick=\"shareArticle(".$line['int_id'].")\"
title='".__('Share by URL')."'>";
new Effect.Highlight(e);
+ var img = $("SHARE-IMG-" + id);
+ if (img) img.src = img.src.replace("notshared.png", "share.png");
+
notify('');
} else {
parameters: query,
onComplete: function(transport) {
notify("Article unshared.");
+
+ var img = $("SHARE-IMG-" + id);
+ if (img) img.src = img.src.replace("share.png", "notshared.png");
+
dialog.hide();
} });
}
dialog.show();
+ var img = $("SHARE-IMG-" + id);
+ if (img) img.src = img.src.replace("notshared.png", "share.png");
+
} catch (e) {
exception_error("shareArticle", e);
}