]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/share/share.js
share: indicate whether article is shared or not using the icon
[tt-rss.git] / plugins / share / share.js
index bbfb553d5c3cccea18cc46b11ed8e20d51123059..09c973ed843f8cc838e5a546f8baa4cf386dc7f6 100644 (file)
@@ -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);
        }