From 3d11c61f326ef133427f6f37de4429e879c725f2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Feb 2021 15:22:10 +0300 Subject: * OPML import: don't reload everything, just feed tree * dialogs: use auto-destroying dialog for almost all dialogs instead of destroying them manually * some general dialog-related cleanup --- js/App.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'js/App.js') diff --git a/js/App.js b/js/App.js index 07cb45481..cd96dfe2a 100644 --- a/js/App.js +++ b/js/App.js @@ -1,6 +1,6 @@ 'use strict'; -/* global __, Article, Ajax, Headlines, Filters */ +/* global __, Article, Ajax, Headlines, Filters, fox */ /* global xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, Feeds, Cookie */ /* global CommonDialogs, Plugins, Effect */ @@ -313,7 +313,7 @@ const App = { }, helpDialog: function(topic) { xhrPost("backend.php", {op: "backend", method: "help", topic: topic}, (transport) => { - const dialog = new dijit.Dialog({ + const dialog = new fox.SingleUseDialog({ title: __("Help"), content: transport.responseText, }); @@ -333,7 +333,7 @@ const App = { let dialog = dijit.byId("infoBox"); if (!dialog) { - dialog = new dijit.Dialog({ + dialog = new fox.SingleUseDialog({ title: title, id: 'infoBox', onCancel: function () { @@ -577,9 +577,6 @@ const App = { } try { - if (dijit.byId("exceptionDlg")) - dijit.byId("exceptionDlg").destroyRecursive(); - let stack_msg = ""; if (error.stack) @@ -599,7 +596,7 @@ const App = { `; - const dialog = new dijit.Dialog({ + const dialog = new fox.SingleUseDialog({ id: "exceptionDlg", title: params.title || __("Unhandled exception"), content: content -- cgit v1.2.3