diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/CommonDialogs.js | 19 | ||||
-rwxr-xr-x | js/common.js | 21 |
2 files changed, 19 insertions, 21 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); diff --git a/js/common.js b/js/common.js index ec6381e31..1da3e6d1b 100755 --- a/js/common.js +++ b/js/common.js @@ -344,27 +344,6 @@ function fatalError(code, msg, ext_info) { } */ // noinspection JSUnusedGlobalSymbols -function uploadIconHandler(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; - } -} - - -// noinspection JSUnusedGlobalSymbols function label_to_feed_id(label) { return _label_base_index - 1 - Math.abs(label); } |