summaryrefslogtreecommitdiff
path: root/js/CommonDialogs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-02 20:57:51 +0300
committerAndrew Dolgov <[email protected]>2018-12-02 20:57:51 +0300
commiteeb49d375ce7e6addc382bab1a1545e897bb1771 (patch)
tree23e68e2bd0e99b74f06514524ea10bde03765f0d /js/CommonDialogs.js
parent526389b2d380177490605037fdc3a24ebc688fac (diff)
uploadIconHandler -> CommonDialogs
Diffstat (limited to 'js/CommonDialogs.js')
-rw-r--r--js/CommonDialogs.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index cac4f9be1..cf21370d6 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -1,11 +1,30 @@
'use strict'
/* global __, ngettext */
define(["dojo/_base/declare"], function (declare) {
+ // noinspection JSUnusedGlobalSymbols
return declare("fox.CommonDialogs", null, {
closeInfoBox: function() {
const dialog = dijit.byId("infoBox");
if (dialog) dialog.hide();
},
+ uploadIconHandler: function(rc) {
+ switch (rc) {
+ case 0:
+ Notify.info("Upload complete.");
+ if (App.isPrefs()) {
+ Feeds.reload();
+ } else {
+ setTimeout('Feeds.reload(false, false)', 50);
+ }
+ break;
+ case 1:
+ Notify.error("Upload failed: icon is too big.");
+ break;
+ case 2:
+ Notify.error("Upload failed.");
+ break;
+ }
+ },
removeFeedIcon: function(id) {
if (confirm(__("Remove stored feed icon?"))) {
Notify.progress("Removing feed icon...", true);