|
|
@ -1,6 +1,6 @@
|
|
|
|
'use strict'
|
|
|
|
'use strict'
|
|
|
|
|
|
|
|
|
|
|
|
/* global __, ngettext, dojo, dijit, Notify, App, Feeds, $$, xhrPost, xhrJson, Tables, Effect */
|
|
|
|
/* global __, ngettext, dojo, dijit, Notify, App, Feeds, $$, xhrPost, xhrJson, Tables, Effect, fox */
|
|
|
|
|
|
|
|
|
|
|
|
/* exported CommonDialogs */
|
|
|
|
/* exported CommonDialogs */
|
|
|
|
const CommonDialogs = {
|
|
|
|
const CommonDialogs = {
|
|
|
@ -75,16 +75,11 @@ const CommonDialogs = {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
quickAddFeed: function() {
|
|
|
|
quickAddFeed: function() {
|
|
|
|
|
|
|
|
|
|
|
|
// overlapping widgets
|
|
|
|
|
|
|
|
if (dijit.byId("batchSubDlg")) dijit.byId("batchSubDlg").destroyRecursive();
|
|
|
|
|
|
|
|
if (dijit.byId("feedAddDlg")) dijit.byId("feedAddDlg").destroyRecursive();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xhrPost("backend.php",
|
|
|
|
xhrPost("backend.php",
|
|
|
|
{op: "feeds", method: "quickAddFeed"},
|
|
|
|
{op: "feeds", method: "quickAddFeed"},
|
|
|
|
(transport) => {
|
|
|
|
(transport) => {
|
|
|
|
|
|
|
|
|
|
|
|
const dialog = new dijit.Dialog({
|
|
|
|
const dialog = new fox.SingleUseDialog({
|
|
|
|
id: "feedAddDlg",
|
|
|
|
id: "feedAddDlg",
|
|
|
|
title: __("Subscribe to Feed"),
|
|
|
|
title: __("Subscribe to Feed"),
|
|
|
|
content: transport.responseText,
|
|
|
|
content: transport.responseText,
|
|
|
@ -192,10 +187,7 @@ const CommonDialogs = {
|
|
|
|
showFeedsWithErrors: function() {
|
|
|
|
showFeedsWithErrors: function() {
|
|
|
|
const query = {op: "pref-feeds", method: "feedsWithErrors"};
|
|
|
|
const query = {op: "pref-feeds", method: "feedsWithErrors"};
|
|
|
|
|
|
|
|
|
|
|
|
if (dijit.byId("errorFeedsDlg"))
|
|
|
|
const dialog = new fox.SingleUseDialog({
|
|
|
|
dijit.byId("errorFeedsDlg").destroyRecursive();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dialog = new dijit.Dialog({
|
|
|
|
|
|
|
|
id: "errorFeedsDlg",
|
|
|
|
id: "errorFeedsDlg",
|
|
|
|
title: __("Feeds with update errors"),
|
|
|
|
title: __("Feeds with update errors"),
|
|
|
|
getSelectedFeeds: function () {
|
|
|
|
getSelectedFeeds: function () {
|
|
|
@ -298,13 +290,7 @@ const CommonDialogs = {
|
|
|
|
|
|
|
|
|
|
|
|
console.log("editFeed", query);
|
|
|
|
console.log("editFeed", query);
|
|
|
|
|
|
|
|
|
|
|
|
if (dijit.byId("filterEditDlg"))
|
|
|
|
const dialog = new fox.SingleUseDialog({
|
|
|
|
dijit.byId("filterEditDlg").destroyRecursive();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dijit.byId("feedEditDlg"))
|
|
|
|
|
|
|
|
dijit.byId("feedEditDlg").destroyRecursive();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dialog = new dijit.Dialog({
|
|
|
|
|
|
|
|
id: "feedEditDlg",
|
|
|
|
id: "feedEditDlg",
|
|
|
|
title: __("Edit Feed"),
|
|
|
|
title: __("Edit Feed"),
|
|
|
|
execute: function () {
|
|
|
|
execute: function () {
|
|
|
@ -363,10 +349,7 @@ const CommonDialogs = {
|
|
|
|
|
|
|
|
|
|
|
|
xhrJson("backend.php", {op: "pref-feeds", method: "getOPMLKey"}, (reply) => {
|
|
|
|
xhrJson("backend.php", {op: "pref-feeds", method: "getOPMLKey"}, (reply) => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (dijit.byId("publicOPMLDlg"))
|
|
|
|
const dialog = new fox.SingleUseDialog({
|
|
|
|
dijit.byId("publicOPMLDlg").destroyRecursive();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dialog = new dijit.Dialog({
|
|
|
|
|
|
|
|
title: __("Public OPML URL"),
|
|
|
|
title: __("Public OPML URL"),
|
|
|
|
id: 'publicOPMLDlg',
|
|
|
|
id: 'publicOPMLDlg',
|
|
|
|
onCancel: function () {
|
|
|
|
onCancel: function () {
|
|
|
@ -411,14 +394,10 @@ const CommonDialogs = {
|
|
|
|
|
|
|
|
|
|
|
|
xhrJson("backend.php", {op: "pref-feeds", method: "getFeedKey", id: feed, is_cat: is_cat}, (reply) => {
|
|
|
|
xhrJson("backend.php", {op: "pref-feeds", method: "getFeedKey", id: feed, is_cat: is_cat}, (reply) => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (dijit.byId("genFeedDlg"))
|
|
|
|
|
|
|
|
dijit.byId("genFeedDlg").destroyRecursive();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const feed_title = Feeds.getName(feed, is_cat);
|
|
|
|
const feed_title = Feeds.getName(feed, is_cat);
|
|
|
|
|
|
|
|
|
|
|
|
const secret_url = rss_url + "&key=" + encodeURIComponent(reply.link);
|
|
|
|
const secret_url = rss_url + "&key=" + encodeURIComponent(reply.link);
|
|
|
|
|
|
|
|
|
|
|
|
const dialog = new dijit.Dialog({
|
|
|
|
const dialog = new fox.SingleUseDialog({
|
|
|
|
title: __("Show as feed"),
|
|
|
|
title: __("Show as feed"),
|
|
|
|
id: 'genFeedDlg',
|
|
|
|
id: 'genFeedDlg',
|
|
|
|
onCancel: function () {
|
|
|
|
onCancel: function () {
|
|
|
|