summaryrefslogtreecommitdiff
path: root/js/CommonDialogs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-02 20:07:57 +0300
committerAndrew Dolgov <[email protected]>2018-12-02 20:07:57 +0300
commitd9c5c93cef313127b9b5010fbe279fdbddedadec (patch)
tree3a1838a1d9e9ff80bbbd57cd7b09b940f6ea4095 /js/CommonDialogs.js
parentad1b6f0a8618ed214001e90c0e5db380758a6c84 (diff)
move some more stuff out of common.js
rework client-side cookie functions a bit limit dojo cachebust based on server scripts modification time remove param_escape()
Diffstat (limited to 'js/CommonDialogs.js')
-rw-r--r--js/CommonDialogs.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index d8733e1c2..efdc4e503 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -2,6 +2,40 @@
/* global __, ngettext */
define(["dojo/_base/declare"], function (declare) {
return declare("fox.CommonDialogs", null, {
+ closeInfoBox: function() {
+ const dialog = dijit.byId("infoBox");
+ if (dialog) dialog.hide();
+ },
+ removeFeedIcon: function(id) {
+ if (confirm(__("Remove stored feed icon?"))) {
+ notify_progress("Removing feed icon...", true);
+
+ const query = {op: "pref-feeds", method: "removeicon", feed_id: id};
+
+ xhrPost("backend.php", query, () => {
+ notify_info("Feed icon removed.");
+ if (App.isPrefs()) {
+ Feeds.reload();
+ } else {
+ setTimeout('Feeds.reload(false, false)', 50);
+ }
+ });
+ }
+
+ return false;
+ },
+ uploadFeedIcon: function() {
+ const file = $("icon_file");
+
+ if (file.value.length == 0) {
+ alert(__("Please select an image file to upload."));
+ } else if (confirm(__("Upload new icon for this feed?"))) {
+ notify_progress("Uploading, please wait...", true);
+ return true;
+ }
+
+ return false;
+ },
quickAddFeed: function() {
const query = "backend.php?op=feeds&method=quickAddFeed";