Commit a74f0f3a authored by CardBook's avatar CardBook

version 28.0

parent eccf36f5
......@@ -23,12 +23,17 @@ if ("undefined" == typeof(cardbookPasswordManager)) {
var myUrl = cardbookPreferences.getUrl(aPrefId);
var result = cardbookPasswordManager.getPassword(aUsername, myUrl);
if (result == "") {
var myArgs = {site: myUrl, username: aUsername, password: "", context: "Missing", action: ""};
var myWindow = window.openDialog("chrome://cardbook/content/wdw_password.xul", "", cardbookRepository.modalWindowParams, myArgs);
if (myArgs.action == "SAVE") {
var strBundle = Services.strings.createBundle("chrome://cardbook/locale/cardbook.properties");
var myTitle = strBundle.GetStringFromName("wdw_passwordMissingTitle");
var commonStrBundle = Services.strings.createBundle("chrome://global/locale/commonDialogs.properties");
var myText = commonStrBundle.formatStringFromName("EnterPasswordFor", [aUsername, myUrl], 2);
var myPassword = {value: ""};
var check = {value: true};
var prompter = Services.ww.getNewPrompter(null);
if (prompter.promptPassword(myTitle, myText, myPassword, null, check)) {
cardbookPasswordManager.removeAccount(aUsername, myUrl);
cardbookPasswordManager.addAccount(aUsername, myUrl, myArgs.password);
return myArgs.password;
cardbookPasswordManager.addAccount(aUsername, myUrl, myPassword.value);
return myPassword.value;
}
}
return result;
......@@ -36,12 +41,17 @@ if ("undefined" == typeof(cardbookPasswordManager)) {
getChangedPassword: function (aUsername, aPrefId) {
var myUrl = cardbookPreferences.getUrl(aPrefId);
var myArgs = {site: myUrl, username: aUsername, password: "", context: "Wrong", action: ""};
var myWindow = window.openDialog("chrome://cardbook/content/wdw_password.xul", "", cardbookRepository.modalWindowParams, myArgs);
if (myArgs.action == "SAVE") {
var strBundle = Services.strings.createBundle("chrome://cardbook/locale/cardbook.properties");
var myTitle = strBundle.GetStringFromName("wdw_passwordWrongTitle");
var commonStrBundle = Services.strings.createBundle("chrome://global/locale/commonDialogs.properties");
var myText = commonStrBundle.formatStringFromName("EnterPasswordFor", [aUsername, myUrl], 2);
var myPassword = {value: ""};
var check = {value: true};
var prompter = Services.ww.getNewPrompter(null);
if (prompter.promptPassword(myTitle, myText, myPassword, null, check)) {
cardbookPasswordManager.removeAccount(aUsername, myUrl);
cardbookPasswordManager.addAccount(aUsername, myUrl, myArgs.password);
return myArgs.password;
cardbookPasswordManager.addAccount(aUsername, myUrl, myPassword.value);
return myPassword.value;
}
return "";
},
......
......@@ -2794,8 +2794,10 @@ if ("undefined" == typeof(cardbookUtils)) {
cleanWebObject: function (aObject) {
var cleanObjectArray = [];
for (var key in aObject) {
if (key == "Authorization" || key == "access_token") {
if (key == "access_token") {
cleanObjectArray.push(key + ': "*****"');
} else if (key == "Authorization") {
cleanObjectArray.push(key + ': "' + aObject[key].replace(/^Basic (.*)/, 'Basic ').replace(/^Digest (.*)/, 'Digest ') + '"*****"');
} else {
cleanObjectArray.push(key + ': "' + aObject[key] + '"');
}
......
This diff is collapsed.
......@@ -89,7 +89,7 @@ if ("undefined" == typeof(ovl_synchro)) {
prefs.setCharPref("accountsShown", "all");
prefs.setCharPref("accountShown", "");
prefs.setCharPref("uncategorizedCards", "");
prefs.setCharPref("addonVersion", "27.9");
prefs.setCharPref("addonVersion", "28.0");
},
lEventTimerSync : { notify: function(lTimerSync) {
......
if ("undefined" == typeof(wdw_password)) {
var wdw_password = {
checkRequired: function () {
if (document.getElementById('siteTextBox').value.trim() != "" && document.getElementById('usernameTextBox').value.trim() != "" && document.getElementById('passwordTextBox').value.trim() != "" ) {
document.getElementById('saveEditionLabel').disabled = false;
} else {
document.getElementById('saveEditionLabel').disabled = true;
}
},
showPassword: function () {
var passwordType = document.getElementById('passwordTextBox').type;
if (passwordType != "password") {
document.getElementById('passwordTextBox').type = "password";
} else {
document.getElementById('passwordTextBox').type = "";
}
},
load: function () {
var strBundle = document.getElementById("cardbook-strings");
document.title = strBundle.getString("wdw_password" + window.arguments[0].context + "Title");
document.getElementById('siteTextBox').value = window.arguments[0].site;
document.getElementById('usernameTextBox').value = window.arguments[0].username;
document.getElementById('passwordTextBox').value = window.arguments[0].password;
if (window.arguments[0].context == "New") {
document.getElementById('siteTextBox').disabled = false;
document.getElementById('usernameTextBox').disabled = false;
document.getElementById('siteTextBox').focus();
} else {
document.getElementById('siteTextBox').disabled = true;
document.getElementById('usernameTextBox').disabled = true;
document.getElementById('passwordTextBox').focus();
}
wdw_password.checkRequired();
},
save: function () {
myURL = document.getElementById('siteTextBox').value.trim();
if (cardbookSynchronization.getRootUrl(myURL) == "") {
cardbookNotifications.setNotification("errorNotifications", "ValidatingURLFailedLabel");
} else {
window.arguments[0].site = document.getElementById('siteTextBox').value;
window.arguments[0].username = document.getElementById('usernameTextBox').value;
window.arguments[0].password = document.getElementById('passwordTextBox').value;
window.arguments[0].action="SAVE";
close();
}
},
cancel: function () {
window.arguments[0].action="CANCEL";
close();
}
};
};
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xul-overlay href="chrome://cardbook/content/ovl_cardbookStringBundle.xul"?>
<!DOCTYPE window [
<!ENTITY % passwordDTD SYSTEM "chrome://cardbook/locale/wdw_password.dtd"> %passwordDTD;
<!ENTITY % buttonsDTD SYSTEM "chrome://cardbook/locale/wdw_editionButtons.dtd"> %buttonsDTD;
]>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="wdw_password.load();" resizable="true"
onclose="wdw_password.cancel();"
id="wdw_password"
persist="screenX screenY width height"
style="min-width:400px;min-height:100px;">
<stringbundleset id="stringbundleset"/>
<script src="chrome://cardbook/content/cardbookNotifications.js"/>
<script src="chrome://cardbook/content/cardbookSynchronization.js"/>
<script src="chrome://cardbook/content/wdw_password.js"/>
<keyset id="wdw_password-keys">
<key keycode="VK_ESCAPE" oncommand="wdw_password.cancel();"/>
</keyset>
<hbox flex="1">
<vbox flex="1">
<grid align="center" flex="1">
<columns>
<column/>
<column flex="1"/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&siteLabel;" control="siteTextBox"/>
<textbox id="siteTextBox" required="true" oninput="wdw_password.checkRequired();"/>
</row>
<row align="center">
<label value="&usernameLabel;" control="usernameTextBox"/>
<textbox id="usernameTextBox" required="true" oninput="wdw_password.checkRequired();"/>
</row>
<row align="center">
<label value="&passwordLabel;" control="passwordTextBox"/>
<textbox id="passwordTextBox"
type="password"
required="true"
oninput="wdw_password.checkRequired();"/>
<checkbox id="passwordCheckBox" label="&passwordShowLabel;" oncommand="wdw_password.showPassword();" disabled="false"/>
</row>
</rows>
</grid>
</vbox>
</hbox>
<hbox flex="1">
<notificationbox id="errorNotifications" flex="1"/>
</hbox>
<hbox>
<spacer flex="1"/>
<button id="saveEditionLabel" label="&saveEditionLabel;" accesskey="&saveEditionAccesskey;" oncommand="wdw_password.save();"/>
<button id="cancelEditionLabel" label="&cancelEditionLabel;" accesskey="&cancelEditionAccesskey;" oncommand="wdw_password.cancel();"/>
</hbox>
</window>
......@@ -449,7 +449,6 @@ searchAccountsLabel=Uloýrná hledání
wdw_passwordMissingTitle=Chybí heslo
wdw_passwordWrongTitle=Neplatné heslo
wdw_passwordNewTitle=Editor URL
dateDisplayedFormatLong=Dlouhý: %1
dateDisplayedFormatShort=Krátký: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Gemte søgninger
wdw_passwordMissingTitle=Manglende adgangskode
wdw_passwordWrongTitle=Ugyldig adgangskode
wdw_passwordNewTitle=URL-redigering
dateDisplayedFormatLong=Langt: %1
dateDisplayedFormatShort=Kort: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Gespeicherte Suchen
wdw_passwordMissingTitle=Fehlendes Passwort
wdw_passwordWrongTitle=Falsches Passwort
wdw_passwordNewTitle=URL Editor
dateDisplayedFormatLong=Lang: %1
dateDisplayedFormatShort=Kurz: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Αποθηκευμένη αναζήτηση
wdw_passwordMissingTitle=Λείπει κωδικός πρόσβασης
wdw_passwordWrongTitle=Λανθασμένος κωδικός
wdw_passwordNewTitle=Συντάκτης παγκόσμιο εντοπισμό πόρων
dateDisplayedFormatLong=Μακρύς: %1
dateDisplayedFormatShort=Μικρός: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Saved Searches
wdw_passwordMissingTitle=Missing password
wdw_passwordWrongTitle=Invalid password
wdw_passwordNewTitle=URL editor
dateDisplayedFormatLong=Long: %1
dateDisplayedFormatShort=Short: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Recherches avancées
wdw_passwordMissingTitle=Mot de passe manquant
wdw_passwordWrongTitle=Mot de passe incorrect
wdw_passwordNewTitle=Modification d'URL
dateDisplayedFormatLong=Long : %1
dateDisplayedFormatShort=Court : %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Spremljene pretrage
wdw_passwordMissingTitle=Nedostaje lozinka
wdw_passwordWrongTitle=Netočna zaporka
wdw_passwordNewTitle=Uređivač URL-a
dateDisplayedFormatLong=Dugi: %1
dateDisplayedFormatShort=Kratki: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Mentett keresések
wdw_passwordMissingTitle=Hiányzó jelszó
wdw_passwordWrongTitle=Helytelen jelszó
wdw_passwordNewTitle=Webcím szerkesztő
dateDisplayedFormatLong=Hosszú: %1
dateDisplayedFormatShort=Rövid: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Pencarian Tersimpan
wdw_passwordMissingTitle=Kata sandi hilang
wdw_passwordWrongTitle=Kata sandi salah
wdw_passwordNewTitle=Editor Alamat URL
dateDisplayedFormatLong=Panjang: %1
dateDisplayedFormatShort=Pendek: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Salva le ricerche
wdw_passwordMissingTitle=Password mancante
wdw_passwordWrongTitle=Password non corretta
wdw_passwordNewTitle=Editor di URL
dateDisplayedFormatLong=Lungo: %1
dateDisplayedFormatShort=Corto: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=検索フオルダー
wdw_passwordMissingTitle=パスワードがありません
wdw_passwordWrongTitle=無効なパスワード
wdw_passwordNewTitle=ユニフォームリソースロケータ「URL」エディータ
dateDisplayedFormatLong=ロング:%1
dateDisplayedFormatShort=短く:%1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=저장된 검색
wdw_passwordMissingTitle=누락 된 암호
wdw_passwordWrongTitle=유효하지 않은 비밀번호
wdw_passwordNewTitle=URL 주소 편집기
dateDisplayedFormatLong=긴: %1
dateDisplayedFormatShort=짧은: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Išsaugotos paieškos
wdw_passwordMissingTitle=Trūksta slaptažodžio
wdw_passwordWrongTitle=Neteisingas slaptažodis
wdw_passwordNewTitle=Svetainės redaktorius
dateDisplayedFormatLong=ilgasis: %1
dateDisplayedFormatShort=trumpasis: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Bewaarde zoekresultaten
wdw_passwordMissingTitle=Ontbrekend wachtwoord
wdw_passwordWrongTitle=Ongeldig wachtwoord
wdw_passwordNewTitle=URL-editor
dateDisplayedFormatLong=Lang: %1
dateDisplayedFormatShort=Kort: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Zachowane wyszukiwania
wdw_passwordMissingTitle=Podaj hasło
wdw_passwordWrongTitle=Nieprawidłowe hasło
wdw_passwordNewTitle=Edytor URL
dateDisplayedFormatLong=długi: %1
dateDisplayedFormatShort=krótki: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Procuras guardadas
wdw_passwordMissingTitle=Palavra-passe falta
wdw_passwordWrongTitle=Palavra-passe inválida
wdw_passwordNewTitle=Editor URL
dateDisplayedFormatLong=Longo: %1
dateDisplayedFormatShort=Longo: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Căutări salvate
wdw_passwordMissingTitle=Lipsește parola
wdw_passwordWrongTitle=Parolă invalidă
wdw_passwordNewTitle=Editor de adresa URL
dateDisplayedFormatLong=Lung: %1
dateDisplayedFormatShort=Scurt: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Сохранённые поисковые запросы
wdw_passwordMissingTitle=Отсутствует пароль
wdw_passwordWrongTitle=Неверный пароль
wdw_passwordNewTitle=редактор URL
dateDisplayedFormatLong=Полный: %1
dateDisplayedFormatShort=Краткий: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Shranjena iskanja
wdw_passwordMissingTitle=Manjka geslo
wdw_passwordWrongTitle=Neveljavno geslo
wdw_passwordNewTitle=??URL editor??
dateDisplayedFormatLong=Dolga: %1
dateDisplayedFormatShort=Kratka: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Sparad sökning
wdw_passwordMissingTitle=Lösenordet saknas
wdw_passwordWrongTitle=Felaktigt lösenord
wdw_passwordNewTitle=Webbadressredigerare
dateDisplayedFormatLong=Lång: %1
dateDisplayedFormatShort=Kort: %1
......
......@@ -449,7 +449,6 @@ searchAccountsLabel=Tìm kiếm Được lưu
wdw_passwordMissingTitle=Thiếu Mật khẩu
wdw_passwordWrongTitle=Mật khẩu Không hợp lệ
wdw_passwordNewTitle=Chỉnh sửa Địa chỉ URL
dateDisplayedFormatLong=Dài: %1
dateDisplayedFormatShort=Ngắn: %1
......
......@@ -6,7 +6,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>cardbook@vigneau.philippe</em:id>
<em:name>CardBook</em:name>
<em:version>27.9</em:version>
<em:version>28.0</em:version>
<em:type>2</em:type>
<em:description>vCard Address Book</em:description>
<em:creator>Philippe Vigneau</em:creator>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment