adding the spam log viewer. not part of the build.

This commit is contained in:
sspitzer%netscape.com 2002-09-19 05:31:22 +00:00
Родитель 16d573bcdd
Коммит 1b945ef6b7
2 изменённых файлов: 73 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,38 @@
var gLogView;
var gLogJunk;
var gXXX;
function onLoad()
{
return;
gXXX = window.arguments[0].xxx;
gLogJunk = document.getElementById("logJunk");
gLogJunk.checked = gXXX.loggingEnabled;
gLogView = document.getElementById("logView");
// for security, disable JS
gLogView.docShell.allowJavascript = false;
// if log doesn't exist, this will create an empty file on disk
// otherwise, the user will get an error that the file doesn't exist
gXXX.ensureLogFile();
gLogView.setAttribute("src", gXXX.logURL);
}
function toggleJunkLog()
{
gXXX.loggingEnabled = gLogJunk.checked;
}
function clearLog()
{
gXXX.clearLog();
// reload the newly truncated file
gLogView.setAttribute("src", gXXX.logURL);
}

Просмотреть файл

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/junkLog.dtd">
<dialog id="viewLogWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoad();"
title="&junkLog.title;"
windowtype="mailnews:junklog"
buttons="accept"
ondialogaccept="window.close()"
persist="screenX screenY width height">
<script type="application/x-javascript" src="chrome://messenger/content/junkLog.js"/>
<vbox flex="1">
<description>&junkLogInfo.text;</description>
<hbox>
<checkbox id="logJunk" oncommand="toggleJunkLog()" label="&enableLog.label;" accesskey="&enableLog.accesskey;"/>
<spacer flex="1"/>
<button label="&clearLog.label;" accesskey="&clearLog.accesskey;" oncommand="clearLog()"/>
</hbox>
<vbox flex="1">
<spacer height="10px"/>
<hbox flex="1">
<spacer width="10px"/>
<browser id="logView" disablehistory="true" disablesecurity="true" src="about:blank" flex="1"/>
<spacer width="10px"/>
</hbox>
<spacer height="10px"/>
</vbox>
</vbox>
</dialog>