зеркало из https://github.com/mozilla/pjs.git
*** empty log message ***
This commit is contained in:
Родитель
faeff62954
Коммит
ffa2a13c33
|
@ -637,3 +637,43 @@ function disableAllFontElements()
|
|||
}
|
||||
}
|
||||
|
||||
function setColorWell(aPicker)
|
||||
{
|
||||
var colorRef = aPicker.nextSibling; // colour value is held here
|
||||
colorRef.setAttribute( "value", aPicker.color );
|
||||
}
|
||||
|
||||
function setColorWellSr(menu,otherId,setbackground)
|
||||
{
|
||||
// Find the colorWell and colorPicker in the hierarchy.
|
||||
var colorWell = menu.firstChild;
|
||||
var colorPicker = menu.firstChild.nextSibling.nextSibling.firstChild;
|
||||
var colorRef = menu.nextSibling; // colour value is held here
|
||||
|
||||
// Extract color from colorPicker and assign to colorWell.
|
||||
var color = colorPicker.getAttribute('color');
|
||||
// set colour values in the display
|
||||
setColorFromPicker( colorWell, color );
|
||||
// set the colour value internally for use in prefwindow
|
||||
colorRef.setAttribute( "value", color );
|
||||
}
|
||||
|
||||
function getColorFromWellAndSetValue(aPickerId)
|
||||
{
|
||||
var picker = document.getElementById(aPickerId);
|
||||
var colorRef = picker.nextSibling;
|
||||
var color = colorRef.getAttribute("value");
|
||||
picker.color = color;
|
||||
return color;
|
||||
}
|
||||
|
||||
function Startup()
|
||||
{
|
||||
getColorFromWellAndSetValue("foregroundtextmenu");
|
||||
getColorFromWellAndSetValue("backgroundmenu");
|
||||
getColorFromWellAndSetValue("unvisitedlinkmenu");
|
||||
getColorFromWellAndSetValue("visitedlinkmenu");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,11 +29,12 @@
|
|||
|
||||
<stringbundle id="bundle_prefutilities"
|
||||
src="chrome://communicator/locale/pref/prefutilities.properties"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/pref/pref-colors.js"/>
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://communicator/content/pref/pref-fonts.js"/>
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
var _elementIDs = ["selectLangs"];
|
||||
var _elementIDs = ["selectLangs", "foregroundText", "background", "browserUseSystemColors", "unvisitedLinks", "visitedLinks", "browserUnderlineAnchors", "browserUseDocumentColors"];
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -286,4 +287,59 @@
|
|||
</menulist>
|
||||
|
||||
</hbox>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<hbox align="center">
|
||||
<checkbox id="browserUseSystemColors" label="&useSystemColors.label;" accesskey="&useSystemColors.accesskey;"
|
||||
prefstring="browser.display.use_system_colors"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<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"/>
|
||||
</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"/>
|
||||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<hbox align="center">
|
||||
<checkbox id="browserUnderlineAnchors" label="&underlineLinks.label;" accesskey="&underlineLinks.accesskey;"
|
||||
prefstring="browser.underline_anchors"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</hbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&someProvColors;"/>
|
||||
|
||||
<radiogroup id="browserUseDocumentColors"
|
||||
preftype="bool" prefstring="browser.display.use_document_colors">
|
||||
<radio value="true" label="&alwaysUseDocumentColors.label;" accesskey="&alwaysUseDocumentColors.accesskey;"/>
|
||||
<radio value="false" label="&useMyColors.label;" accesskey="&useMyColors.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
</groupbox>
|
||||
|
||||
</page>
|
||||
|
|
|
@ -8,8 +8,6 @@ browser.jar:
|
|||
content/browser/pref/overrideHandler.js (content/overrideHandler.js)
|
||||
content/browser/pref/pref-cache.js (content/pref-cache.js)
|
||||
content/browser/pref/pref-cache.xul (content/pref-cache.xul)
|
||||
content/browser/pref/pref-colors.js (content/pref-colors.js)
|
||||
content/browser/pref/pref-colors.xul (content/pref-colors.xul)
|
||||
content/browser/pref/pref-download.xul (content/pref-download.xul)
|
||||
content/browser/pref/pref-help.js (content/pref-help.js)
|
||||
content/browser/pref/pref-themes.xul (content/pref-themes.xul)
|
||||
|
@ -56,7 +54,6 @@ en-US.jar:
|
|||
locale/en-US/browser/pref/pref-applications-edit.dtd (locale/pref-applications-edit.dtd)
|
||||
locale/en-US/browser/pref/pref-cache.dtd (locale/pref-cache.dtd)
|
||||
locale/en-US/browser/pref/pref-charset.dtd (locale/pref-charset.dtd)
|
||||
locale/en-US/browser/pref/pref-colors.dtd (locale/pref-colors.dtd)
|
||||
locale/en-US/browser/pref/pref-themes.dtd (locale/pref-themes.dtd)
|
||||
locale/en-US/browser/pref/pref-debug.dtd (locale/pref-debug.dtd)
|
||||
locale/en-US/browser/pref/pref-debug1.dtd (locale/pref-debug1.dtd)
|
||||
|
|
Загрузка…
Ссылка в новой задаче