mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1515966 - Download notification click action now opens about:downloads. r=sdaswani
Differential Revision: https://phabricator.services.mozilla.com/D15215 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
cbb94950ec
commit
b0e869dfdd
@ -160,7 +160,7 @@ var DownloadNotifications = {
|
||||
this.showInAboutDownloads(download);
|
||||
}
|
||||
} else {
|
||||
ConfirmCancelPrompt.show(download);
|
||||
this.showInAboutDownloads(download);
|
||||
}
|
||||
}).catch(Cu.reportError);
|
||||
},
|
||||
@ -275,19 +275,6 @@ DownloadNotification.prototype = {
|
||||
},
|
||||
};
|
||||
|
||||
var ConfirmCancelPrompt = {
|
||||
show: function(download) {
|
||||
// Open a prompt that offers a choice to cancel the download
|
||||
let title = strings.GetStringFromName("downloadCancelPromptTitle1");
|
||||
let message = strings.GetStringFromName("downloadCancelPromptMessage1");
|
||||
|
||||
if (Services.prompt.confirm(null, title, message)) {
|
||||
download.cancel().catch(Cu.reportError);
|
||||
download.removePartialData().catch(Cu.reportError);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function DownloadNotificationButton(buttonId, iconUrl, titleStringName, onClicked) {
|
||||
this.buttonId = buttonId;
|
||||
this.title = strings.GetStringFromName(titleStringName);
|
||||
|
Loading…
Reference in New Issue
Block a user