Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #187 from jaoo/1074253
Browse files Browse the repository at this point in the history
Bug 1074253 - User should be notified that revoking URLs without connectivity (no Data Connection or Server fail) is not possible. r=ferjm
  • Loading branch information
jaoo committed Oct 14, 2014
2 parents 4d62777 + dedb25e commit 0cea1b8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions js/controller.js
Expand Up @@ -239,6 +239,15 @@
},

revokeUrl: function (token, date, callback) {
if (!navigator.onLine) {
LazyLoader.load([
'js/screens/error_screen.js'
], function() {
var _ = navigator.mozL10n.get;
OfflineScreen.show(_('noConnection'));
});
return;
}
ClientRequestHelper.revokeUrl(
token,
function onDeleted() {
Expand All @@ -258,6 +267,12 @@
},
function onError(e) {
console.error('Error when revoking URL in server: ' + e);
LazyLoader.load([
'js/screens/error_screen.js'
], function() {
var _ = navigator.mozL10n.get;
ErrorScreen.show(_('genericServerError'));
});
}
);
},
Expand Down
2 changes: 1 addition & 1 deletion js/version.js
@@ -1 +1 @@
Version = { id: '0a1833c' };
Version = { id: '72b9899' };

0 comments on commit 0cea1b8

Please sign in to comment.