зеркало из https://github.com/mozilla/pjs.git
Bug 260335 Teach pref window and wsm how to lock colourpickers r=varga sr=jag
This commit is contained in:
Родитель
91b3e6d956
Коммит
99b5c36317
|
@ -246,6 +246,8 @@ nsPrefWindow.prototype =
|
|||
prefattribute = "value";
|
||||
else if (elt == "checkbox" || elt == "listitem")
|
||||
prefattribute = "checked";
|
||||
else if (elt == "colorpicker")
|
||||
prefattribute = "color";
|
||||
else if (elt == "button")
|
||||
prefattribute = "disabled";
|
||||
}
|
||||
|
@ -253,7 +255,7 @@ nsPrefWindow.prototype =
|
|||
var value = itemObject[prefattribute];
|
||||
var preftype = itemObject.preftype;
|
||||
if (!preftype) {
|
||||
if (elt == "textbox")
|
||||
if (elt == "textbox" || elt == "colorpicker")
|
||||
preftype = "string";
|
||||
else if (elt == "checkbox" || elt == "listitem" || elt == "button")
|
||||
preftype = "bool";
|
||||
|
@ -363,7 +365,7 @@ nsPrefWindow.prototype =
|
|||
var preftype = prefElements[i].getAttribute( "preftype" );
|
||||
var elt = prefElements[i].localName;
|
||||
if (!preftype) {
|
||||
if (elt == "textbox")
|
||||
if (elt == "textbox" || elt == "colorpicker")
|
||||
preftype = "string";
|
||||
else if (elt == "checkbox" || elt == "listitem" || elt == "button")
|
||||
preftype = "bool";
|
||||
|
@ -377,6 +379,8 @@ nsPrefWindow.prototype =
|
|||
prefattribute = "value";
|
||||
else if (elt == "checkbox" || elt == "listitem")
|
||||
prefattribute = "checked";
|
||||
else if (elt == "colorpicker")
|
||||
prefattribute = "color";
|
||||
else if (elt == "button")
|
||||
prefattribute = "disabled";
|
||||
}
|
||||
|
|
|
@ -51,23 +51,21 @@
|
|||
var _elementIDs = ["foregroundText", "background", "browserUseSystemColors", "unvisitedLinks", "activeLinks", "visitedLinks", "browserUnderlineAnchors", "browserUseDocumentColors"];
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-colors.js"/>
|
||||
|
||||
<hbox>
|
||||
<groupbox flex="1" id="pageColours">
|
||||
<caption label="&color;"/>
|
||||
<hbox align="center">
|
||||
<label value="&textColor.label;" accesskey="&textColor.accesskey;" control="foregroundtextmenu"/>
|
||||
<spacer flex="1"/>
|
||||
<colorpicker type="button" id="foregroundtextmenu" palettename="standard" onchange="setColorWell(this)"/>
|
||||
<data id="foregroundText" preftype="color" prefstring="browser.display.foreground_color" prefattribute="value" wsm_attributes="value"/>
|
||||
<label control="foregroundText" value="&textColor.label;"
|
||||
accesskey="&textColor.accesskey;" flex="1"/>
|
||||
<colorpicker type="button" id="foregroundText" palettename="standard"
|
||||
prefstring="browser.display.foreground_color"/>
|
||||
</hbox>
|
||||
<hbox align="center" style="margin-top: 5px">
|
||||
<label value="&backgroundColor.label;" accesskey="&backgroundColor.accesskey;" control="backgroundmenu"/>
|
||||
<spacer flex="1"/>
|
||||
<colorpicker type="button" id="backgroundmenu" palettename="standard" onchange="setColorWell(this)"/>
|
||||
<data id="background" preftype="color" prefstring="browser.display.background_color" prefattribute="value" wsm_attributes="value"/>
|
||||
<label control="background" value="&backgroundColor.label;"
|
||||
accesskey="&backgroundColor.accesskey;" flex="1"/>
|
||||
<colorpicker type="button" id="background" palettename="standard"
|
||||
prefstring="browser.display.background_color"/>
|
||||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<hbox align="center">
|
||||
|
@ -79,22 +77,22 @@
|
|||
<groupbox flex="1">
|
||||
<caption label="&links;"/>
|
||||
<hbox align="center">
|
||||
<label value="&linkColor.label;" accesskey="&linkColor.accesskey;" control="unvisitedlinkmenu"/>
|
||||
<spacer flex="1"/>
|
||||
<colorpicker type="button" id="unvisitedlinkmenu" palettename="standard" onchange="setColorWell(this)"/>
|
||||
<data id="unvisitedLinks" preftype="string" prefstring="browser.anchor_color" prefattribute="value" wsm_attributes="value"/>
|
||||
<label control="unvisitedLinks" value="&linkColor.label;"
|
||||
accesskey="&linkColor.accesskey;" flex="1"/>
|
||||
<colorpicker type="button" id="unvisitedLinks" palettename="standard"
|
||||
prefstring="browser.anchor_color"/>
|
||||
</hbox>
|
||||
<hbox align="center" style="margin-top: 5px">
|
||||
<label value="&activeLinkColor.label;" accesskey="&activeLinkColor.accesskey;" control="activelinkmenu"/>
|
||||
<spacer flex="1"/>
|
||||
<colorpicker type="button" id="activelinkmenu" palettename="standard" onchange="setColorWell(this)"/>
|
||||
<data id="activeLinks" preftype="string" prefstring="browser.active_color" prefattribute="value" wsm_attributes="value"/>
|
||||
<label control="activeLinks" value="&activeLinkColor.label;"
|
||||
accesskey="&activeLinkColor.accesskey;" flex="1"/>
|
||||
<colorpicker type="button" id="activeLinks" palettename="standard"
|
||||
prefstring="browser.active_color"/>
|
||||
</hbox>
|
||||
<hbox align="center" style="margin-top: 5px">
|
||||
<label value="&visitedLinkColor.label;" accesskey="&visitedLinkColor.accesskey;" control="visitedlinkmenu"/>
|
||||
<spacer flex="1"/>
|
||||
<colorpicker type="button" id="visitedlinkmenu" palettename="standard" onchange="setColorWell(this)"/>
|
||||
<data id="visitedLinks" preftype="string" prefstring="browser.visited_color" prefattribute="value" wsm_attributes="value"/>
|
||||
<label control="visitedLinks" value="&visitedLinkColor.label;"
|
||||
accesskey="&visitedLinkColor.accesskey;" flex="1"/>
|
||||
<colorpicker type="button" id="visitedLinks" palettename="standard"
|
||||
prefstring="browser.visited_color"/>
|
||||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<hbox align="center">
|
||||
|
|
Загрузка…
Ссылка в новой задаче