summaryrefslogtreecommitdiff
path: root/js/CommonDialogs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 15:50:06 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 15:50:06 +0300
commit3268364693814ae89df5d2c2d090108b182e48eb (patch)
treebd57ae9b8771814577eb4498a7432070370d56dd /js/CommonDialogs.js
parent3d11c61f326ef133427f6f37de4429e879c725f2 (diff)
more dialog-related cleanup
Diffstat (limited to 'js/CommonDialogs.js')
-rw-r--r--js/CommonDialogs.js30
1 files changed, 7 insertions, 23 deletions
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index 700867e73..fe685def3 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -1,6 +1,6 @@
'use strict'
-/* global __, ngettext, dojo, dijit, Notify, App, Feeds, $$, xhrPost, xhrJson, Tables, Effect, fox */
+/* global __, dojo, dijit, Notify, App, Feeds, $$, xhrPost, xhrJson, Tables, Effect, fox */
/* exported CommonDialogs */
const CommonDialogs = {
@@ -264,8 +264,6 @@ const CommonDialogs = {
const query = {op: "pref-feeds", quiet: 1, method: "remove", ids: feed_id};
xhrPost("backend.php", query, () => {
- if (dijit.byId("feedEditDlg")) dijit.byId("feedEditDlg").hide();
-
if (App.isPrefs()) {
dijit.byId("feedTree").reload();
} else {
@@ -293,6 +291,12 @@ const CommonDialogs = {
const dialog = new fox.SingleUseDialog({
id: "feedEditDlg",
title: __("Edit Feed"),
+ unsubscribeFeed: function(feed_id, title) {
+ if (confirm(__("Unsubscribe from %s?").replace("%s", title))) {
+ dialog.hide();
+ CommonDialogs.unsubscribeFeed(feed_id);
+ }
+ },
execute: function () {
if (this.validate()) {
Notify.progress("Saving data...", true);
@@ -351,16 +355,6 @@ const CommonDialogs = {
try {
const dialog = new fox.SingleUseDialog({
title: __("Public OPML URL"),
- id: 'publicOPMLDlg',
- onCancel: function () {
- return true;
- },
- onExecute: function () {
- return true;
- },
- onClose: function () {
- return true;
- },
content: `
<header>${__("Your Public OPML URL is:")}</header>
<section>
@@ -399,16 +393,6 @@ const CommonDialogs = {
const dialog = new fox.SingleUseDialog({
title: __("Show as feed"),
- id: 'genFeedDlg',
- onCancel: function () {
- return true;
- },
- onExecute: function () {
- return true;
- },
- onClose: function () {
- return true;
- },
content: `
<header>${__("%s can be accessed via the following secret URL:").replace("%s", feed_title)}</header>
<section>