2021-02-17 11:08:06 +00:00
|
|
|
/* global dijit, dojo, Plugins, xhrPost, __ */
|
2021-02-12 06:02:44 +00:00
|
|
|
|
2018-12-03 07:51:14 +00:00
|
|
|
Plugins.Psql_Trgm = {
|
|
|
|
showRelated: function (id) {
|
2021-02-12 06:02:44 +00:00
|
|
|
const dialog = new dijit.Dialog({
|
2015-01-19 12:12:40 +00:00
|
|
|
title: __("Related articles"),
|
2021-02-17 11:08:06 +00:00
|
|
|
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);
|
|
|
|
});
|
2015-01-19 12:12:40 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
dialog.show();
|
|
|
|
}
|
2018-12-03 07:51:14 +00:00
|
|
|
};
|
2015-01-19 12:12:40 +00:00
|
|
|
|