1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-30 12:30:52 +02:00
ttrss/plugins/af_psql_trgm/init.js
2021-02-17 14:08:06 +03:00

22 lines
530 B
JavaScript

/* global dijit, dojo, Plugins, xhrPost, __ */
Plugins.Psql_Trgm = {
showRelated: function (id) {
const dialog = new dijit.Dialog({
title: __("Related articles"),
content: __("Loading, please wait...")
});
const tmph = dojo.connect(dialog, "onShow", null, function (/* e */) {
dojo.disconnect(tmph);
xhrPost("backend.php", {op: 'pluginhandler', plugin: 'af_psql_trgm', method: 'showrelated', id: id}, (transport) => {
dialog.attr('content', transport.responseText);
});
});
dialog.show();
}
};