mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-16 23:25:03 +00:00
Bug 264675 Make sure we respect locked prefs throughout UI. (Bv2) <pref-smart_browsing-ac.xul>. Patch by Serge GAUTHERIE <gautheri@noos.fr>, r=iann_bugzilla
This commit is contained in:
parent
b695767add
commit
d897de7255
@ -51,7 +51,9 @@
|
||||
|
||||
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
|
||||
<script type="application/x-javascript"><![CDATA[
|
||||
|
||||
|
||||
var gShowSearchLocked;
|
||||
|
||||
window.onload = function()
|
||||
{
|
||||
setCheck("cbxAutoFill", window.arguments[0], window.arguments[4]);
|
||||
@ -63,31 +65,31 @@
|
||||
updateImage("AutoFill");
|
||||
updateImage("ShowPopup");
|
||||
updateImage("ShowSearch");
|
||||
|
||||
|
||||
updateShowPopup();
|
||||
}
|
||||
|
||||
|
||||
function onAccept()
|
||||
{
|
||||
window.opener.receiveACPrefs(getCheck("cbxAutoFill"),
|
||||
getCheck("cbxShowPopup"),
|
||||
getCheck("cbxShowSearch"),
|
||||
getCheck("cbxMatchOnlyTyped"));
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function getCheck(aName)
|
||||
{
|
||||
return document.getElementById(aName).checked;
|
||||
}
|
||||
|
||||
|
||||
function setCheck(aName, aTruth, aDisabled)
|
||||
{
|
||||
document.getElementById(aName).checked = (aTruth == "true");
|
||||
document.getElementById(aName).disabled = (aDisabled == "true");
|
||||
}
|
||||
|
||||
|
||||
function updateImage(aImg)
|
||||
{
|
||||
var img = document.getElementById("img"+aImg);
|
||||
@ -102,20 +104,20 @@
|
||||
img.setAttribute("hidden", !checked2 || !checked);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function updateShowPopup()
|
||||
{
|
||||
var spChecked = document.getElementById("cbxShowPopup").checked;
|
||||
var showSearch = document.getElementById("cbxShowSearch");
|
||||
showSearch.disabled = !spChecked || gShowSearchLocked;
|
||||
}
|
||||
|
||||
|
||||
function doHelpButton() {
|
||||
openHelp('navigator_pref_autocomplete-adv');
|
||||
}
|
||||
|
||||
|
||||
]]></script>
|
||||
|
||||
|
||||
<groupbox>
|
||||
<caption label="&autoCompleteAdvanced.title;"/>
|
||||
<vbox>
|
||||
@ -128,7 +130,7 @@
|
||||
<checkbox id="cbxMatchOnlyTyped" label="&autoCompleteMatchOnlyTyped.label;"/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
||||
|
||||
<label value="&autocompletePreview.label;"/>
|
||||
<dialogheader>
|
||||
<vbox height="159">
|
||||
|
Loading…
x
Reference in New Issue
Block a user