share plugin: fix unshare()
This commit is contained in:
parent
703351c79e
commit
4036b479f9
|
@ -47,17 +47,21 @@ Plugins.Share = {
|
|||
unshare: function () {
|
||||
if (confirm(__("Remove sharing for this article?"))) {
|
||||
|
||||
Notify.progress("Trying to unshare...", true);
|
||||
|
||||
const query = {op: "pluginhandler", plugin: "share", method: "unshare", id: id};
|
||||
|
||||
xhrPost("backend.php", query, () => {
|
||||
notify("Article unshared.");
|
||||
|
||||
try {
|
||||
const img = $("SHARE-IMG-" + id);
|
||||
|
||||
if (img) {
|
||||
img.removeClassName("shared");
|
||||
img.up("div[id*=RROW]").removeClassName("shared");
|
||||
}
|
||||
|
||||
dialog.hide();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue