2021-02-19 11:44:56 +01:00
|
|
|
/* global dijit, dojo, Plugins, xhr, __ */
|
2021-02-12 07:02:44 +01:00
|
|
|
|
2018-12-03 08:51:14 +01:00
|
|
|
Plugins.Psql_Trgm = {
|
|
|
|
showRelated: function (id) {
|
2021-02-12 07:02:44 +01:00
|
|
|
const dialog = new dijit.Dialog({
|
2015-01-19 13:12:40 +01:00
|
|
|
title: __("Related articles"),
|
2021-02-17 12:08:06 +01:00
|
|
|
content: __("Loading, please wait...")
|
|
|
|
});
|
|
|
|
|
|
|
|
const tmph = dojo.connect(dialog, "onShow", null, function (/* e */) {
|
|
|
|
dojo.disconnect(tmph);
|
|
|
|
|
2023-10-26 17:01:43 +02:00
|
|
|
xhr.post("backend.php", {op: 'PluginHandler', plugin: 'af_psql_trgm', method: 'showrelated', id: id}, (reply) => {
|
2021-02-19 11:44:56 +01:00
|
|
|
dialog.attr('content', reply);
|
2021-02-17 12:08:06 +01:00
|
|
|
});
|
2015-01-19 13:12:40 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
dialog.show();
|
|
|
|
}
|
2018-12-03 08:51:14 +01:00
|
|
|
};
|
2015-01-19 13:12:40 +01:00
|
|
|
|