Bug 1147064 - Make negative/positive button order consistent. r=margaret

--HG--
extra : rebase_source : f08c887231cbbba5492c520f4c4bdced6f5306a2
This commit is contained in:
Chenxia Liu 2015-04-09 16:04:21 -07:00
Родитель 4d6cdda90b
Коммит 3cf5991a56
4 изменённых файлов: 41 добавлений и 40 удалений

Просмотреть файл

@ -29,17 +29,17 @@ var OfflineApps = {
let strings = Strings.browser;
let buttons = [{
label: strings.GetStringFromName("offlineApps.allow"),
callback: function() {
OfflineApps.allowSite(aContentWindow.document);
}
},
{
label: strings.GetStringFromName("offlineApps.dontAllow2"),
callback: function(aChecked) {
if (aChecked)
OfflineApps.disallowSite(aContentWindow.document);
}
},
{
label: strings.GetStringFromName("offlineApps.allow"),
callback: function() {
OfflineApps.allowSite(aContentWindow.document);
}
}];
let requestor = BrowserApp.manifest ? "'" + BrowserApp.manifest.name + "'" : host;

Просмотреть файл

@ -27,16 +27,6 @@ var PluginHelper = {
let message = Strings.browser.formatStringFromName("clickToPlayPlugins.message2",
[uri.host], 1);
let buttons = [
{
label: Strings.browser.GetStringFromName("clickToPlayPlugins.activate"),
callback: function(aChecked) {
// If the user checked "Don't ask again", make a permanent exception
if (aChecked)
Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.ALLOW_ACTION);
PluginHelper.playAllPlugins(aTab.browser.contentWindow);
}
},
{
label: Strings.browser.GetStringFromName("clickToPlayPlugins.dontActivate"),
callback: function(aChecked) {
@ -46,6 +36,16 @@ var PluginHelper = {
// Other than that, do nothing
}
},
{
label: Strings.browser.GetStringFromName("clickToPlayPlugins.activate"),
callback: function(aChecked) {
// If the user checked "Don't ask again", make a permanent exception
if (aChecked)
Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.ALLOW_ACTION);
PluginHelper.playAllPlugins(aTab.browser.contentWindow);
}
}
];

Просмотреть файл

@ -6648,6 +6648,13 @@ var PopupBlockerObserver = {
.replace("#2", popupCount);
let buttons = [
{
label: strings.GetStringFromName("popup.dontShow"),
callback: function(aChecked) {
if (aChecked)
PopupBlockerObserver.allowPopupsForSite(false);
}
},
{
label: strings.GetStringFromName("popup.show"),
callback: function(aChecked) {
@ -6657,13 +6664,6 @@ var PopupBlockerObserver = {
PopupBlockerObserver.showPopupsForSite();
}
},
{
label: strings.GetStringFromName("popup.dontShow"),
callback: function(aChecked) {
if (aChecked)
PopupBlockerObserver.allowPopupsForSite(false);
}
}
];
@ -6765,13 +6765,7 @@ var IndexedDB = {
observer.observe(null, responseTopic, Ci.nsIPermissionManager.UNKNOWN_ACTION);
}
let buttons = [{
label: strings.GetStringFromName("offlineApps.allow"),
callback: function() {
clearTimeout(timeoutId);
observer.observe(null, responseTopic, Ci.nsIPermissionManager.ALLOW_ACTION);
}
},
let buttons = [
{
label: strings.GetStringFromName("offlineApps.dontAllow2"),
callback: function(aChecked) {
@ -6779,6 +6773,13 @@ var IndexedDB = {
let action = aChecked ? Ci.nsIPermissionManager.DENY_ACTION : Ci.nsIPermissionManager.UNKNOWN_ACTION;
observer.observe(null, responseTopic, action);
}
},
{
label: strings.GetStringFromName("offlineApps.allow"),
callback: function() {
clearTimeout(timeoutId);
observer.observe(null, responseTopic, Ci.nsIPermissionManager.ALLOW_ACTION);
}
}];
let options = { checkbox: Strings.browser.GetStringFromName("offlineApps.dontAskAgain") };

Просмотреть файл

@ -99,6 +99,16 @@ ContentPermissionPrompt.prototype = {
let entityName = kEntities[perm.type];
let buttons = [{
label: browserBundle.GetStringFromName(entityName + ".dontAllow"),
callback: function(aChecked) {
// If the user checked "Don't ask again", make a permanent exception
if (aChecked)
Services.perms.addFromPrincipal(request.principal, access, Ci.nsIPermissionManager.DENY_ACTION);
request.cancel();
}
},
{
label: browserBundle.GetStringFromName(entityName + ".allow"),
callback: function(aChecked) {
// If the user checked "Don't ask again", make a permanent exception
@ -111,16 +121,6 @@ ContentPermissionPrompt.prototype = {
request.allow();
}
},
{
label: browserBundle.GetStringFromName(entityName + ".dontAllow"),
callback: function(aChecked) {
// If the user checked "Don't ask again", make a permanent exception
if (aChecked)
Services.perms.addFromPrincipal(request.principal, access, Ci.nsIPermissionManager.DENY_ACTION);
request.cancel();
}
}];
let requestor = chromeWin.BrowserApp.manifest ? "'" + chromeWin.BrowserApp.manifest.name + "'" : request.principal.URI.host;