From 9330bde9917c0813fdf874a179cb45e1361edd47 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Feb 2021 18:40:22 +0300 Subject: [PATCH] batchsubscribe: xhr --- js/PrefFeedTree.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js index df580c948..df8cbfd1d 100644 --- a/js/PrefFeedTree.js +++ b/js/PrefFeedTree.js @@ -359,7 +359,15 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio }); } }, - href: "backend.php?" + dojo.objectToQuery({op: 'pref-feeds', method: 'batchSubscribe'}) + content: __("Loading, please wait...") + }); + + const tmph = dojo.connect(dialog, 'onShow', function () { + dojo.disconnect(tmph); + + xhrPost("backend.php", {op: 'pref-feeds', method: 'batchSubscribe'}, (transport) => { + dialog.attr('content', transport.responseText); + }) }); dialog.show();