summaryrefslogtreecommitdiff
path: root/plugins/share
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 09:02:44 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 09:02:44 +0300
commitd466284fabe945dbc3c8034ac1468bf97b38ed94 (patch)
treec500c2f43d8f6dae470072febe9177339c0c3bc3 /plugins/share
parentcb7c075cd2db606f251b852342c2ed90ac591252 (diff)
* customizeCSS: client dialog
* remove hardcoded width from most dialogs (move to css) * add helper to easily get dialog from its widget * rework some dialog buttons to use current object instead of calling dialog by name
Diffstat (limited to 'plugins/share')
-rw-r--r--plugins/share/init.php6
-rw-r--r--plugins/share/share.js1
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/share/init.php b/plugins/share/init.php
index d0b3dfc0b..0794f5125 100644
--- a/plugins/share/init.php
+++ b/plugins/share/init.php
@@ -123,13 +123,13 @@ class Share extends Plugin {
print "<footer class='text-center'>";
- print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('shareArticleDlg').unshare()\">".
+ print "<button dojoType='dijit.form.Button' onclick=\"return App.dialogOf(this).unshare()\">".
__('Unshare article')."</button>";
- print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('shareArticleDlg').newurl()\">".
+ print "<button dojoType='dijit.form.Button' onclick=\"return App.dialogOf(this).newurl()\">".
__('Generate new URL')."</button>";
- print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('shareArticleDlg').hide()\">".
+ print "<button dojoType='dijit.form.Button' type='submit' class='alt-primary'>".
__('Close this window')."</button>";
print "</footer>";
diff --git a/plugins/share/share.js b/plugins/share/share.js
index c49f64b4b..507f27f84 100644
--- a/plugins/share/share.js
+++ b/plugins/share/share.js
@@ -8,7 +8,6 @@ Plugins.Share = {
const dialog = new dijit.Dialog({
id: "shareArticleDlg",
title: __("Share article by URL"),
- style: "width: 600px",
newurl: function () {
if (confirm(__("Generate new share URL for this article?"))) {