зеркало из https://github.com/mozilla/pjs.git
Bug 432427: update 'download history' checkbox state to correctly reflect dependency on 'browsing history' checkbox, r=dietrich, a=beltzner
This commit is contained in:
Родитель
dd3da5681c
Коммит
beb2fe34a3
|
@ -114,15 +114,34 @@
|
|||
return undefined;
|
||||
},
|
||||
|
||||
onReadDownloads: function (aEvent)
|
||||
{
|
||||
// Call the common function that will update the accept button if needed
|
||||
this.onReadGeneric();
|
||||
|
||||
let historyPref = document.getElementById("privacy.item.history")
|
||||
let downloadPref = document.getElementById("privacy.item.downloads");
|
||||
|
||||
// Disable the checkbox if history is selected
|
||||
let downloads = document.getElementById("downloads-checkbox");
|
||||
downloads.disabled = historyPref.value;
|
||||
|
||||
// The "Download History" checkbox is selected if either of the history or
|
||||
// downloads preferences are true.
|
||||
return historyPref.value || downloadPref.value;
|
||||
},
|
||||
|
||||
updateDownloadHistory: function ()
|
||||
{
|
||||
// When toggling history, we automatically clear download history too,
|
||||
// so we disable that control.
|
||||
// so we disable that control and set its value to true.
|
||||
let downloads = document.getElementById("downloads-checkbox");
|
||||
let history = document.getElementById("history-checkbox");
|
||||
let s = new Sanitizer();
|
||||
downloads.disabled = history.checked ||
|
||||
!s.canClearItem("downloads");
|
||||
if (history.checked)
|
||||
downloads.checked = true;
|
||||
},
|
||||
};
|
||||
]]>
|
||||
|
@ -152,7 +171,7 @@
|
|||
label="&itemDownloads.label;"
|
||||
accesskey="&itemDownloads.accesskey;"
|
||||
preference="privacy.item.downloads"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadDownloads();"/>
|
||||
<checkbox label="&itemFormSearchHistory.label;"
|
||||
accesskey="&itemFormSearchHistory.accesskey;"
|
||||
preference="privacy.item.formdata"
|
||||
|
|
Загрузка…
Ссылка в новой задаче