Browse Source

P4TB-400: Follow-up for the UI: Use "Apply" for the first button.

master
Jörg Knobloch 11 months ago
parent
commit
94e5682727
4 changed files with 16 additions and 33 deletions
  1. +2
    -5
      addon/_locales/de/messages.json
  2. +2
    -5
      addon/_locales/en/messages.json
  3. +9
    -15
      addon/content/dialogs/options.js
  4. +3
    -8
      addon/content/dialogs/options.xhtml

+ 2
- 5
addon/_locales/de/messages.json View File

@ -299,11 +299,8 @@
"optionsImportFingerprint": {
"message": "Privater Schlüssel erfolgreich importiert. Der Fingerabdruck des ausgewählten Schlüssel ist:"
},
"optionsUseAsSelected": {
"message": "Benutzen wie gewählt"
},
"optionsUseForAddress": {
"message": "Benutzen für Adresse"
"optionsApply": {
"message": "Anwenden"
},
"optionsCancel": {
"message": "Abbrechen"


+ 2
- 5
addon/_locales/en/messages.json View File

@ -299,11 +299,8 @@
"optionsImportFingerprint": {
"message": "Private key successfully imported. The fingerprint of the selected key is:"
},
"optionsUseAsSelected": {
"message": "Use as selected"
},
"optionsUseForAddress": {
"message": "Use for address"
"optionsApply": {
"message": "Apply"
},
"optionsCancel": {
"message": "Cancel"


+ 9
- 15
addon/content/dialogs/options.js View File

@ -458,11 +458,6 @@ var pEpOptions = {
let commPartnerAddress = document.getElementById("commPartnerAddress");
commPartnerAddress.removeAttribute("hidden");
let button1 = document.getElementById("useForAddress");
button1.removeAttribute("hidden");
let button2 = document.getElementById("cancelKey");
button2.removeAttribute("hidden");
gFpr = fprs[0];
} else {
msg = pEpOptions.getLocaleMessage("optionsImportFingerprint");
@ -481,11 +476,12 @@ var pEpOptions = {
let importOptions = document.getElementById("importOptions");
importOptions.removeAttribute("hidden");
let button1 = document.getElementById("useKey");
button1.removeAttribute("hidden");
let button2 = document.getElementById("cancelKey");
button2.removeAttribute("hidden");
}
let button1 = document.getElementById("applyKey");
button1.removeAttribute("hidden");
let button2 = document.getElementById("cancelKey");
button2.removeAttribute("hidden");
gImportResult = result;
},
@ -502,7 +498,7 @@ var pEpOptions = {
// Make Enter move to the next UI element as Tab already does.
if (event.key == "Enter") {
let button = document.getElementById("useForAddress");
let button = document.getElementById("applyKey");
button.focus();
}
},
@ -517,15 +513,13 @@ var pEpOptions = {
commPartnerAddress.setAttribute("hidden", "hidden");
let importOptions = document.getElementById("importOptions");
importOptions.setAttribute("hidden", "true");
let button1 = document.getElementById("useKey");
let button1 = document.getElementById("applyKey");
button1.setAttribute("hidden", "true");
let button2 = document.getElementById("useForAddress");
let button2 = document.getElementById("cancelKey");
button2.setAttribute("hidden", "true");
let button3 = document.getElementById("cancelKey");
button3.setAttribute("hidden", "true");
},
useKey() {
applyKey() {
if (gImportResult.length > 0) {
let keyUse = Services.prefs.getStringPref("extensions.pEp.keyUse", "other");
try {


+ 3
- 8
addon/content/dialogs/options.xhtml View File

@ -167,15 +167,10 @@
minresultsforpopup="3"
onkeypress="pEpOptions.commPartnerKeyPress(event, this);"/>
<hbox>
<html:button id="useKey"
<html:button id="applyKey"
hidden="true"
data-localekey="optionsUseAsSelected"
onclick="pEpOptions.useKey();">
</html:button>
<html:button id="useForAddress"
hidden="true"
data-localekey="optionsUseForAddress"
onclick="pEpOptions.useKey();">
data-localekey="optionsApply"
onclick="pEpOptions.applyKey();">
</html:button>
<html:button id="cancelKey"
hidden="true"


Loading…
Cancel
Save