title: __("Share article by URL"),
style: "width: 600px",
newurl: function() {
-
- var ok = confirm(__("Generate new share URL for this article?"));
-
- if (ok) {
+ if (confirm(__("Generate new share URL for this article?"))) {
notify_progress("Trying to change URL...", true);
new Effect.Highlight(e);
+ var img = $("SHARE-IMG-" + id);
+ if (img) img.src = img.src.replace("notshared.png", "share.png");
+
notify('');
} else {
},
unshare: function() {
-
- var ok = confirm(__("Remove sharing for this article?"));
-
- if (ok) {
+ if (confirm(__("Remove sharing for this article?"))) {
notify_progress("Trying to unshare...", true);
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);
}