diff options
author | Andrew Dolgov <[email protected]> | 2013-07-11 16:20:24 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-07-11 16:20:24 +0400 |
commit | abb04b76a51eb871a45011da55efb222924d50ee (patch) | |
tree | e62eff2885f6ca14be3a0c90d6ed441f6a593b5f /plugins/share/share.js | |
parent | ab25a8064461a194d97dceaa014c68bfc395702b (diff) |
share: indicate whether article is shared or not using the icon
Diffstat (limited to 'plugins/share/share.js')
-rw-r--r-- | plugins/share/share.js | 10 |
1 files changed, 10 insertions, 0 deletions
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); } |