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