2021-02-19 10:44:56 +00:00
|
|
|
/* global dijit, dojo, Plugins, xhr, __ */
|
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);
|
|
|
|
|
2023-10-26 15:01:43 +00:00
|
|
|
xhr.post("backend.php", {op: 'PluginHandler', plugin: 'af_psql_trgm', method: 'showrelated', id: id}, (reply) => {
|
2021-02-19 10:44:56 +00:00
|
|
|
dialog.attr('content', reply);
|
2021-02-17 11:08:06 +00:00
|
|
|
});
|
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
|
|
|
|