gecko-dev/xpfe/components/ucth/resources/unknownContent.xul

117 lines
3.9 KiB
Plaintext
Raw Normal View History

<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
1999-05-17 22:56:09 +00:00
<!DOCTYPE window
[
<!ENTITY unknownWindow.title "Unknown File Type">
<!ENTITY startDownload "You have started to download a file of type">
<!ENTITY contentType.label "contentType goes here">
<!ENTITY dialogMore.label "More Info...">
<!ENTITY dialogPick.label "Pick App...">
<!ENTITY dialogSave.label "Save File...">
<!ENTITY dialogCancel.label "Cancel">
]>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
1999-05-17 22:56:09 +00:00
title="&unknownWindow.title;"
width="425"
height="180">
<data>
<broadcaster id="data.location" type="url" value="url...to be replaced"/>
<broadcaster id="data.contentType" type="string" value="content-type...to be replaced"/>
<!-- Commands: more/pick/save/close -->
<broadcaster id="data.execute" command=""/>
<!-- Temporary onLoad() trigger -->
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onchange="onLoad()"/>
</data>
<html:script>
var data;
var dialog;
function initData() {
// Create data object and initialize.
data = new Object;
data.location = document.getElementById("data.location");
data.contentType = document.getElementById("data.contentType");
data.execute = document.getElementById("data.execute");
}
function initDialog() {
// Create dialog object and initialize.
dialog = new Object;
dialog.contentType = document.getElementById("dialog.contentType");
dialog.more = document.getElementById("dialog.more");
dialog.pick = document.getElementById("dialog.pick");
dialog.save = document.getElementById("dialog.save");
dialog.cancel = document.getElementById("dialog.cancel");
}
function loadDialog() {
// Set initial dialog field contents.
dialog.contentType.childNodes[0].nodeValue = " " + data.contentType.getAttribute( "value" );
}
function onLoad() {
// Init data.
initData();
// Init dialog.
initDialog();
// Fill dialog.
loadDialog();
}
function more() {
dump( "unknownContent::more not implemented\n" );
}
function pick() {
dump( "unknownContent::pick not implemented\n" );
}
function save() {
// Execute "save to disk" logic.
data.execute.setAttribute("command","save");
}
function cancel() {
// Close the window.
data.execute.setAttribute("command","close");
}
</html:script>
<html:table style="width:100%;">
<html:tr>
<html:td colspan="4">
1999-05-17 22:56:09 +00:00
&startDownload;
<html:div id="dialog.contentType" style="display:inline">
1999-05-17 22:56:09 +00:00
&contentType.label;
</html:div>
</html:td>
</html:tr>
<html:tr>
<html:td style="width:25%">
1999-05-17 22:56:09 +00:00
<html:button id="dialog.more" onclick="more()" disabled="">&dialogMore.label;</html:button>
</html:td>
<html:td style="width:25%">
1999-05-17 22:56:09 +00:00
<html:button id="dialog.pick" onclick="pick()" disabled="">&dialogPick.label;</html:button>
</html:td>
<html:td style="width:25%">
1999-05-17 22:56:09 +00:00
<html:button id="dialog.save" onclick="save()">&dialogSave.label;</html:button>
</html:td>
<html:td style="width:25%">
1999-05-17 22:56:09 +00:00
<html:button id="dialog.cancel" onclick="cancel()">&dialogCancel.label;</html:button>
</html:td>
</html:tr>
</html:table>
</window>