summaryrefslogtreecommitdiff
path: root/js/CommonDialogs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 18:38:26 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 18:38:26 +0300
commit03b85248e6c7fb89f86cb98c839ab86f6162b657 (patch)
tree8a43339cd5089ba6bc3fd463e1ec1752f825253b /js/CommonDialogs.js
parent71dfc834662eb4172221b3f717b03665472f3657 (diff)
move some dialogs to xhr loading
Diffstat (limited to 'js/CommonDialogs.js')
-rw-r--r--js/CommonDialogs.js27
1 files changed, 18 insertions, 9 deletions
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index fe685def3..038a2981d 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -185,8 +185,6 @@ const CommonDialogs = {
});
},
showFeedsWithErrors: function() {
- const query = {op: "pref-feeds", method: "feedsWithErrors"};
-
const dialog = new fox.SingleUseDialog({
id: "errorFeedsDlg",
title: __("Feeds with update errors"),
@@ -221,12 +219,15 @@ const CommonDialogs = {
alert(__("No feeds selected."));
}
},
- execute: function () {
- if (this.validate()) {
- //
- }
- },
- href: "backend.php?" + dojo.objectToQuery(query)
+ content: __("Loading, please wait...")
+ });
+
+ const tmph = dojo.connect(dialog, 'onShow', function () {
+ dojo.disconnect(tmph);
+
+ xhrPost("backend.php", {op: "pref-feeds", method: "feedsWithErrors"}, (transport) => {
+ dialog.attr('content', transport.responseText);
+ })
});
dialog.show();
@@ -313,7 +314,15 @@ const CommonDialogs = {
});
}
},
- href: "backend.php?" + dojo.objectToQuery(query)
+ content: __("Loading, please wait...")
+ });
+
+ const tmph = dojo.connect(dialog, 'onShow', function () {
+ dojo.disconnect(tmph);
+
+ xhrPost("backend.php", {op: "pref-feeds", method: "editfeed", id: feed}, (transport) => {
+ dialog.attr('content', transport.responseText);
+ })
});
dialog.show();