зеркало из https://github.com/mozilla/gecko-dev.git
Bug 145243: warning should be presented if user attempts cancellation of publish. r=kaie, sr=hewitt, moa=brade
This commit is contained in:
Родитель
9d7d2a4332
Коммит
3121dbe55c
|
@ -87,6 +87,11 @@ AbandonChanges=Abandon unsaved changes to "%title%" and reload page?
|
|||
DocumentTitle=Page Title
|
||||
NeedDocTitle=Please enter a title for the current page.
|
||||
DocTitleHelp=This identifies the page in the window title and bookmarks.
|
||||
CancelPublishTitle=Cancel publishing?
|
||||
## LOCALIZATION NOTE: "Continue" in this sentence must match the text for
|
||||
## the CancelPublishContinue key below
|
||||
CancelPublishMessage=Cancelling while publishing is in progress may result in your file(s) being incompletely transferred. Would you like to Continue or Cancel?
|
||||
CancelPublishContinue=Continue
|
||||
AttributesFor=Current attributes for:
|
||||
MissingImageError=Please enter or choose an image of type gif, jpg, or png.
|
||||
EmptyHREFError=Please choose a location to create a new link.
|
||||
|
|
|
@ -309,6 +309,25 @@ function CheckKeepOpen()
|
|||
|
||||
function onClose()
|
||||
{
|
||||
if (!gFinished)
|
||||
{
|
||||
const nsIPromptService = Components.interfaces.nsIPromptService;
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(nsIPromptService);
|
||||
const buttonFlags = (nsIPromptService.BUTTON_TITLE_IS_STRING *
|
||||
nsIPromptService.BUTTON_POS_0) +
|
||||
(nsIPromptService.BUTTON_TITLE_CANCEL *
|
||||
nsIPromptService.BUTTON_POS_1);
|
||||
var button = promptService.confirmEx(window,
|
||||
GetString("CancelPublishTitle"),
|
||||
GetString("CancelPublishMessage"),
|
||||
buttonFlags,
|
||||
GetString("CancelPublishContinue"),
|
||||
null, null, null, {});
|
||||
if (button == 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (gTimerID)
|
||||
{
|
||||
clearTimeout(gTimerID);
|
||||
|
|
Загрузка…
Ссылка в новой задаче