-
Notifications
You must be signed in to change notification settings - Fork 22
/
log.xul
44 lines (44 loc) · 2.87 KB
/
log.xul
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://tabulator/skin/tabulator.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://tabulator/locale/en-US/tabulatorsidebar.dtd">
<window id="tabulatorlogwindow" flex="1"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
contenttitlesetting="true"
title="&tablog.title;"
windowtype="tabulatorlog">
<hbox id="tablogbar">
<label value="Level"/>
<menulist label="Errors, Warnings, and Messages">
<menupopup>
<menuitem oncommand="tabulatorLog.setLevel(tabulatorLog.TNONE)" label="Off"/>
<menuitem oncommand="tabulatorLog.setLevel(tabulatorLog.TALL)" label="Full"/>
<menuitem oncommand="tabulatorLog.setLevel(tabulatorLog.TERROR)" label="Errors"/>
<menuitem oncommand="tabulatorLog.setLevel(tabulatorLog.TERROR+tabulatorLog.TWARN)" label="Errors and Warnings"/>
<menuitem oncommand="tabulatorLog.setLevel(tabulatorLog.TERROR+tabulatorLog.TWARN+tabulatorLog.TMESG)" label="Errors, Warnings, and Messages" selected="true"/>
<menuitem oncommand="tabulatorLog.setLevel(tabulatorLog.TERROR+tabulatorLog.TWARN+tabulatorLog.TMESG+tabulatorLog.TSUCCESS)" label="Errors, Warnings, Messages, and Successes"/>
<menuitem oncommand="tabulatorLog.setLevel(tabulatorLog.TERROR+tabulatorLog.TWARN+tabulatorLog.TMESG+tabulatorLog.TSUCCESS+tabulatorLog.TINFO)" label="Errors, Warnings, Messages, Successes, and Info"/>
</menupopup>
</menulist>
<button id="tablog-clear" accesskey="C" oncommand="tabulatorLog.clear()" label="Clear"/>
<button id="nav-events" accesskey="D" oncommand="tabulatorLog.dumpStore()" label="Dump Store" />
</hbox>
<iframe type="content-primary" flex="1" id="loghtml" src="chrome://tabulator/content/log.html"/>
<script type="application/x-javascript">
var tabulatorLog = Components.classes["@dig.csail.mit.edu/tabulator;1"]
.getService(Components.interfaces.nsISupports)
.wrappedJSObject.log
function setupLog()
{
var doc=content.document;
var div = doc.createElement('div');
div.setAttribute('id','logdiv');
doc.body.appendChild(div);
tabulatorLog.setContainer(div);
}
window.addEventListener('load',setupLog,true);
//this does not work either
//document.getElementById('loghtml').addEventListener('load',function(){alert("test")},null);
</script>
</window>