From abb04b76a51eb871a45011da55efb222924d50ee Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Jul 2013 16:20:24 +0400 Subject: [PATCH] share: indicate whether article is shared or not using the icon --- include/functions.php | 2 ++ plugins/share/init.php | 4 +++- plugins/share/notshared.png | Bin 0 -> 657 bytes plugins/share/share.js | 10 ++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 plugins/share/notshared.png diff --git a/include/functions.php b/include/functions.php index 35edd8d1a..145f09804 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2645,6 +2645,7 @@ num_comments, comments, int_id, + uuid, hide_images, unread,feed_id,marked,published,link,last_read,orig_feed_id, last_marked, last_published, @@ -2687,6 +2688,7 @@ "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, " . diff --git a/plugins/share/init.php b/plugins/share/init.php index 552aa0a31..a000b8ebe 100644 --- a/plugins/share/init.php +++ b/plugins/share/init.php @@ -69,7 +69,9 @@ class Share extends Plugin { } function hook_article_button($line) { - return ""; diff --git a/plugins/share/notshared.png b/plugins/share/notshared.png new file mode 100644 index 0000000000000000000000000000000000000000..523575306d53eaf176b4f9b260f0d36852565596 GIT binary patch literal 657 zcmV;C0&e|@P)>>Oks2`oIPl8XEc) z7Z-oHdiCnNh=_=7-rnASQd3j^Pnt9-52PSJKmR|74-yB-uUN6-AxJ$)AIt?^O-)VT zCr_T74pjKb-rk;L@7}!}=gytu04X?h=n%)+wQD(m;%Y$oCm?ko^&ov<19WwDGt<-4 z-%p!1tt2QYXs4s2<1aTixBr2Gf&W1YfV4h{4-yB-gVcf4gYO zty=YV-MV%Er%#{$zp$_nY(Pat1(**K2g!rffz*TafelboQ)31?&%n#e>wZc~%9rfy z?C(JQGdw&z4x}IUyRt?v{0wJ6^R0W@A*Z8= z&I?WjSJx&^y7yBz?2M*SZ18QRLbAs(#0rsh%4F{kwbCf;j=k00000NkvXXu0mjf-HSTy literal 0 HcmV?d00001 diff --git a/plugins/share/share.js b/plugins/share/share.js index bbfb553d5..09c973ed8 100644 --- a/plugins/share/share.js +++ b/plugins/share/share.js @@ -37,6 +37,9 @@ function shareArticle(id) { new Effect.Highlight(e); + var img = $("SHARE-IMG-" + id); + if (img) img.src = img.src.replace("notshared.png", "share.png"); + notify(''); } else { @@ -61,6 +64,10 @@ function shareArticle(id) { 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(); } }); } @@ -70,6 +77,9 @@ function shareArticle(id) { dialog.show(); + var img = $("SHARE-IMG-" + id); + if (img) img.src = img.src.replace("notshared.png", "share.png"); + } catch (e) { exception_error("shareArticle", e); }