summaryrefslogtreecommitdiff
path: root/plugins/af_psql_trgm
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/af_psql_trgm
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/af_psql_trgm')
-rw-r--r--plugins/af_psql_trgm/init.js11
-rw-r--r--plugins/af_psql_trgm/init.php6
2 files changed, 7 insertions, 10 deletions
diff --git a/plugins/af_psql_trgm/init.js b/plugins/af_psql_trgm/init.js
index af337ca6b..a22e673f6 100644
--- a/plugins/af_psql_trgm/init.js
+++ b/plugins/af_psql_trgm/init.js
@@ -1,16 +1,13 @@
+/* global dijit, Plugins, __ */
+
Plugins.Psql_Trgm = {
showRelated: function (id) {
const query = "backend.php?op=pluginhandler&plugin=af_psql_trgm&method=showrelated&param=" + encodeURIComponent(id);
- if (dijit.byId("trgmRelatedDlg"))
- dijit.byId("trgmRelatedDlg").destroyRecursive();
-
- dialog = new dijit.Dialog({
- id: "trgmRelatedDlg",
+ const dialog = new dijit.Dialog({
title: __("Related articles"),
- style: "width: 600px",
execute: function () {
-
+ //
},
href: query,
});
diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php
index faacf2da7..163b0ec38 100644
--- a/plugins/af_psql_trgm/init.php
+++ b/plugins/af_psql_trgm/init.php
@@ -108,9 +108,9 @@ class Af_Psql_Trgm extends Plugin {
}
- print "<footer class='text-center'>";
- print "<button dojoType='dijit.form.Button' onclick=\"dijit.byId('trgmRelatedDlg').hide()\">".__('Close this window')."</button>";
- print "</footer>";
+ print "<footer class='text-center'>
+ <button dojoType='dijit.form.Button' type='submit' class='alt-primary'>".__('Close this window')."</button>
+ </footer>";
}