mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 06:55:56 +00:00
remove some plugin JS code out of global context
This commit is contained in:
@@ -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¶m=" + 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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ class Af_Psql_Trgm extends Plugin {
|
||||
function hook_article_button($line) {
|
||||
return "<img src=\"plugins/af_psql_trgm/button.png\"
|
||||
style=\"cursor : pointer\" style=\"cursor : pointer\"
|
||||
onclick=\"showTrgmRelated(".$line["id"].")\"
|
||||
onclick=\"Plugins.Psql_Trgm.showRelated(".$line["id"].")\"
|
||||
class='tagsPic' title='".__('Show related articles')."'>";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user