set dialogs to const

master
Andrew Dolgov 6 years ago
parent 1b91bb4564
commit 9dc5524df1

@ -581,7 +581,7 @@ function quickAddFeed() {
if (dijit.byId("batchSubDlg")) dijit.byId("batchSubDlg").destroyRecursive(); if (dijit.byId("batchSubDlg")) dijit.byId("batchSubDlg").destroyRecursive();
if (dijit.byId("feedAddDlg")) dijit.byId("feedAddDlg").destroyRecursive(); if (dijit.byId("feedAddDlg")) dijit.byId("feedAddDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "feedAddDlg", id: "feedAddDlg",
title: __("Subscribe to Feed"), title: __("Subscribe to Feed"),
style: "width: 600px", style: "width: 600px",
@ -931,7 +931,7 @@ function quickAddFilter() {
if (dijit.byId("filterEditDlg")) if (dijit.byId("filterEditDlg"))
dijit.byId("filterEditDlg").destroyRecursive(); dijit.byId("filterEditDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "filterEditDlg", id: "filterEditDlg",
title: __("Create Filter"), title: __("Create Filter"),
style: "width: 600px", style: "width: 600px",
@ -1249,7 +1249,7 @@ function editFeed(feed) {
if (dijit.byId("feedEditDlg")) if (dijit.byId("feedEditDlg"))
dijit.byId("feedEditDlg").destroyRecursive(); dijit.byId("feedEditDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "feedEditDlg", id: "feedEditDlg",
title: __("Edit Feed"), title: __("Edit Feed"),
style: "width: 600px", style: "width: 600px",
@ -1282,7 +1282,7 @@ function feedBrowser() {
if (dijit.byId("feedBrowserDlg")) if (dijit.byId("feedBrowserDlg"))
dijit.byId("feedBrowserDlg").destroyRecursive(); dijit.byId("feedBrowserDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "feedBrowserDlg", id: "feedBrowserDlg",
title: __("More Feeds"), title: __("More Feeds"),
style: "width: 600px", style: "width: 600px",
@ -1362,15 +1362,11 @@ function feedBrowser() {
Element.hide('feed_browser_spinner'); Element.hide('feed_browser_spinner');
const c = $("browseFeedList");
const reply = JSON.parse(transport.responseText); const reply = JSON.parse(transport.responseText);
const r = reply['content'];
const mode = reply['mode']; const mode = reply['mode'];
if (c && r) { if ($("browseFeedList") && reply['content']) {
c.innerHTML = r; $("browseFeedList").innerHTML = reply['content'];
} }
dojo.parser.parse("browseFeedList"); dojo.parser.parse("browseFeedList");
@ -1424,7 +1420,7 @@ function showFeedsWithErrors() {
if (dijit.byId("errorFeedsDlg")) if (dijit.byId("errorFeedsDlg"))
dijit.byId("errorFeedsDlg").destroyRecursive(); dijit.byId("errorFeedsDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "errorFeedsDlg", id: "errorFeedsDlg",
title: __("Feeds with update errors"), title: __("Feeds with update errors"),
style: "width: 600px", style: "width: 600px",

@ -1,7 +1,5 @@
/* global dijit, __ */ /* global dijit, __ */
let init_params = [];
let hotkey_prefix = false; let hotkey_prefix = false;
let hotkey_prefix_pressed = false; let hotkey_prefix_pressed = false;
@ -93,7 +91,7 @@ function editUser(id) {
if (dijit.byId("userEditDlg")) if (dijit.byId("userEditDlg"))
dijit.byId("userEditDlg").destroyRecursive(); dijit.byId("userEditDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "userEditDlg", id: "userEditDlg",
title: __("User Editor"), title: __("User Editor"),
style: "width: 600px", style: "width: 600px",
@ -128,7 +126,7 @@ function editFilter(id) {
if (dijit.byId("filterEditDlg")) if (dijit.byId("filterEditDlg"))
dijit.byId("filterEditDlg").destroyRecursive(); dijit.byId("filterEditDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "filterEditDlg", id: "filterEditDlg",
title: __("Edit Filter"), title: __("Edit Filter"),
style: "width: 600px", style: "width: 600px",
@ -476,7 +474,7 @@ function selectedUserDetails() {
if (dijit.byId("userDetailsDlg")) if (dijit.byId("userDetailsDlg"))
dijit.byId("userDetailsDlg").destroyRecursive(); dijit.byId("userDetailsDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "userDetailsDlg", id: "userDetailsDlg",
title: __("User details"), title: __("User details"),
style: "width: 600px", style: "width: 600px",
@ -577,7 +575,7 @@ function editSelectedFeeds() {
notify(""); notify("");
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "feedEditDlg", id: "feedEditDlg",
title: __("Edit Multiple Feeds"), title: __("Edit Multiple Feeds"),
style: "width: 600px", style: "width: 600px",
@ -1044,7 +1042,7 @@ function showInactiveFeeds() {
if (dijit.byId("inactiveFeedsDlg")) if (dijit.byId("inactiveFeedsDlg"))
dijit.byId("inactiveFeedsDlg").destroyRecursive(); dijit.byId("inactiveFeedsDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "inactiveFeedsDlg", id: "inactiveFeedsDlg",
title: __("Feeds without recent updates"), title: __("Feeds without recent updates"),
style: "width: 600px", style: "width: 600px",
@ -1158,7 +1156,7 @@ function editProfiles() {
const query = "backend.php?op=pref-prefs&method=editPrefProfiles"; const query = "backend.php?op=pref-prefs&method=editPrefProfiles";
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "profileEditDlg", id: "profileEditDlg",
title: __("Settings Profiles"), title: __("Settings Profiles"),
style: "width: 600px", style: "width: 600px",
@ -1458,7 +1456,7 @@ function batchSubscribe() {
if (dijit.byId("batchSubDlg")) dijit.byId("batchSubDlg").destroyRecursive(); if (dijit.byId("batchSubDlg")) dijit.byId("batchSubDlg").destroyRecursive();
if (dijit.byId("feedAddDlg")) dijit.byId("feedAddDlg").destroyRecursive(); if (dijit.byId("feedAddDlg")) dijit.byId("feedAddDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "batchSubDlg", id: "batchSubDlg",
title: __("Batch subscribe"), title: __("Batch subscribe"),
style: "width: 600px", style: "width: 600px",

@ -1020,7 +1020,7 @@ function editArticleTags(id) {
if (dijit.byId("editTagsDlg")) if (dijit.byId("editTagsDlg"))
dijit.byId("editTagsDlg").destroyRecursive(); dijit.byId("editTagsDlg").destroyRecursive();
var dialog = new dijit.Dialog({ const dialog = new dijit.Dialog({
id: "editTagsDlg", id: "editTagsDlg",
title: __("Edit article Tags"), title: __("Edit article Tags"),
style: "width: 600px", style: "width: 600px",

Loading…
Cancel
Save