summaryrefslogtreecommitdiff
path: root/plugins/af_psql_trgm/init.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-03 10:51:14 +0300
committerAndrew Dolgov <[email protected]>2018-12-03 10:51:14 +0300
commit78cc470193448048759b3f315ee630e50acb064b (patch)
treedcb14ea4a2ba9c10666b7b2669bf7776bc04d6b4 /plugins/af_psql_trgm/init.js
parent84affc7b1d71769038dfd25d74e40d6bf744e5fb (diff)
remove some plugin JS code out of global context
Diffstat (limited to 'plugins/af_psql_trgm/init.js')
-rw-r--r--plugins/af_psql_trgm/init.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/af_psql_trgm/init.js b/plugins/af_psql_trgm/init.js
index af2facfc1..af337ca6b 100644
--- a/plugins/af_psql_trgm/init.js
+++ b/plugins/af_psql_trgm/init.js
@@ -1,6 +1,5 @@
-function showTrgmRelated(id) {
- try {
-
+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"))
@@ -10,16 +9,13 @@ function showTrgmRelated(id) {
id: "trgmRelatedDlg",
title: __("Related articles"),
style: "width: 600px",
- execute: function() {
+ execute: function () {
},
href: query,
});
dialog.show();
-
- } catch (e) {
- exception_error("showTrgmRelated", e);
}
-}
+};