mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 00579267379b (bug 1122225) for rc1 failures
This commit is contained in:
parent
87b02ffadc
commit
89613a8d4f
@ -17,9 +17,6 @@ XPCOMUtils.defineLazyGetter(window, "gChromeWin", function()
|
||||
.getInterface(Ci.nsIDOMWindow)
|
||||
.QueryInterface(Ci.nsIDOMChromeWindow));
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Prompt",
|
||||
"resource://gre/modules/Prompt.jsm");
|
||||
|
||||
let debug = Cu.import("resource://gre/modules/AndroidLog.jsm", {}).AndroidLog.d.bind(null, "AboutPasswords");
|
||||
|
||||
let gStringBundle = Services.strings.createBundle("chrome://browser/locale/aboutPasswords.properties");
|
||||
@ -128,33 +125,9 @@ let Passwords = {
|
||||
|
||||
loginItem.setAttribute("loginID", login.guid);
|
||||
loginItem.className = "login-item list-item";
|
||||
|
||||
loginItem.addEventListener("click", () => {
|
||||
let prompt = new Prompt({
|
||||
window: window,
|
||||
});
|
||||
let menuItems = [
|
||||
{ label: gStringBundle.GetStringFromName("passwordsMenu.copyPassword") },
|
||||
{ label: gStringBundle.GetStringFromName("passwordsMenu.copyUsername") },
|
||||
{ label: gStringBundle.GetStringFromName("passwordsMenu.details") } ];
|
||||
|
||||
prompt.setSingleChoiceItems(menuItems);
|
||||
prompt.show((data) => {
|
||||
// Switch on indices of buttons, as they were added when creating login item.
|
||||
switch (data.button) {
|
||||
case 0:
|
||||
copyStringAndToast(login.password, gStringBundle.GetStringFromName("passwordsDetails.passwordCopied"));
|
||||
break;
|
||||
case 1:
|
||||
copyStringAndToast(login.username, gStringBundle.GetStringFromName("passwordsDetails.usernameCopied"));
|
||||
break;
|
||||
case 2:
|
||||
this._showDetails(loginItem);
|
||||
history.pushState({ id: login.guid }, document.title);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
this._showDetails(loginItem);
|
||||
history.pushState({ id: login.guid }, document.title);
|
||||
}, true);
|
||||
|
||||
// Create item icon.
|
||||
|
@ -2,10 +2,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
passwordsMenu.copyPassword=Copy password
|
||||
passwordsMenu.copyUsername=Copy username
|
||||
passwordsMenu.details=Details
|
||||
|
||||
passwordsDetails.age=Age: %S days
|
||||
|
||||
passwordsDetails.copyFailed=Copy failed
|
||||
|
Loading…
Reference in New Issue
Block a user