mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-25 01:01:52 +00:00
skinability fixes for the download headers dialog.
This commit is contained in:
parent
ba86aad319
commit
7d2a3ebd79
@ -41,9 +41,9 @@ function OnLoad()
|
||||
doSetOKCancel(OkButtonCallback, CancelButtonCallback);
|
||||
|
||||
if (window.arguments && window.arguments[0]) {
|
||||
dump ("param = " + window.arguments[0] + "\n");
|
||||
//dump ("param = " + window.arguments[0] + "\n");
|
||||
param = window.arguments[0].QueryInterface( Components.interfaces.nsIDialogParamBlock );
|
||||
dump ("after QI param = " + window.arguments[0] + "\n");
|
||||
//dump ("after QI param = " + window.arguments[0] + "\n");
|
||||
|
||||
newmessages = param.GetInt(2);
|
||||
newsgroupname = param.GetString(0);
|
||||
@ -52,9 +52,9 @@ function OnLoad()
|
||||
param.SetInt(0, 0); /* by default, act like the user hit cancel */
|
||||
param.SetInt(1, 0); /* by default, act like the user did not select download all */
|
||||
|
||||
dump("new message count = " + newmessages + "\n");
|
||||
dump("newsgroup name = " + newsgroupname + "\n");
|
||||
dump("serverid = " + serverid + "\n");
|
||||
//dump("new message count = " + newmessages + "\n");
|
||||
//dump("newsgroup name = " + newsgroupname + "\n");
|
||||
//dump("serverid = " + serverid + "\n");
|
||||
|
||||
var accountManager = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager);
|
||||
server = accountManager.getIncomingServer(serverid);
|
||||
@ -67,7 +67,7 @@ function OnLoad()
|
||||
// doesn't JS have a printf?
|
||||
window.title = downloadHeadersTitlePrefix + " " + newsgroupname;
|
||||
var infotext = downloadHeadersInfoText1 + " " + newmessages + " " + downloadHeadersInfoText2;
|
||||
setDivText('info',infotext);
|
||||
setText('info',infotext);
|
||||
}
|
||||
|
||||
|
||||
@ -80,21 +80,20 @@ function OnLoad()
|
||||
return true;
|
||||
}
|
||||
|
||||
function setDivText(divname, value) {
|
||||
var div = document.getElementById(divname);
|
||||
if (!div) return;
|
||||
if (div.firstChild)
|
||||
div.removeChild(div.firstChild);
|
||||
div.appendChild(document.createTextNode(value));
|
||||
function setText(id, value) {
|
||||
var element = document.getElementById(id);
|
||||
if (!element) return;
|
||||
element.setAttribute('value',value);
|
||||
}
|
||||
|
||||
function OkButtonCallback() {
|
||||
nntpServer.maxArticles = numberElement.value;
|
||||
//dump("mark read checked?="+markreadElement.checked+"\n");
|
||||
nntpServer.markOldRead = markreadElement.checked;
|
||||
|
||||
var radio = document.getElementById("all");
|
||||
if (radio) {
|
||||
dump("radio value " + radio.checked + "\n");
|
||||
//dump("all radio value " + radio.checked + "\n");
|
||||
if (radio.checked) {
|
||||
param.SetInt(1, 1); /* the user selected download all */
|
||||
}
|
||||
|
@ -25,33 +25,33 @@ Rights Reserved.
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://messenger/locale/downloadheaders.dtd">
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
<window xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
align="vertical"
|
||||
orient="vertical"
|
||||
onload="OnLoad()">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://global/content/strres.js"/>
|
||||
<html:script language="JavaScript" src="chrome://messenger/content/downloadheaders.js"/>
|
||||
<script language="JavaScript" src="chrome://global/content/strres.js" />
|
||||
<script language="JavaScript" src="chrome://messenger/content/downloadheaders.js" />
|
||||
|
||||
<box align="vertical">
|
||||
<box orient="vertical">
|
||||
<spring flex="100%"/>
|
||||
<html:div id="info"/>
|
||||
<box align="horizontal" flex="100%">
|
||||
<html:input type="radio" id="all" name="download"/>
|
||||
<html:label for="all">&all.label;</html:label>
|
||||
</box>
|
||||
<text id="info"/>
|
||||
<radiogroup orient="vertical">
|
||||
<box orient="horizontal">
|
||||
<radio id="all" />
|
||||
<text value="&all.label;" />
|
||||
</box>
|
||||
<box orient="horizontal">
|
||||
<radio id="some" checked="true" />
|
||||
<text value="&download.label;" />
|
||||
<textfield id="number" size="10"/>
|
||||
<text value="&headers.label;" />
|
||||
</box>
|
||||
</radiogroup>
|
||||
|
||||
<box align="horizontal" flex="100%">
|
||||
<html:input type="radio" id="some" name="download" checked="true"/>
|
||||
<html:label for="some">&download.label;</html:label>
|
||||
<html:input type="text" id="number" size="10"/>
|
||||
<html:label>&headers.label;</html:label>
|
||||
</box>
|
||||
|
||||
<box align="horizontal" flex="100%">
|
||||
<html:input type="checkbox" id="markread"/>
|
||||
<html:label>&mark.label;</html:label>
|
||||
<box orient="horizontal" flex="100%">
|
||||
<checkbox id="markread"/>
|
||||
<text value="&mark.label;" />
|
||||
</box>
|
||||
|
||||
<spring flex="100%"/>
|
||||
|
Loading…
Reference in New Issue
Block a user