Add new unknownContent.xul dialog

This commit is contained in:
law%netscape.com 1999-04-28 00:30:08 +00:00
Родитель 2812bf9ab0
Коммит d7d3bff408
3 изменённых файлов: 148 добавлений и 43 удалений

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

@ -36,7 +36,7 @@ EXPORT_RESOURCE_SAMPLES = \
$(srcdir)/dialogs.css \ $(srcdir)/dialogs.css \
$(srcdir)/navigator.css \ $(srcdir)/navigator.css \
$(srcdir)/navigator.xul \ $(srcdir)/navigator.xul \
$(srcdir)/saveToDisk.xul \ $(srcdir)/unknownContent.xul \
$(srcdir)/viewSource.xul \ $(srcdir)/viewSource.xul \
$(srcdir)/downloadProgress.xul \ $(srcdir)/downloadProgress.xul \
$(srcdir)/downloadProgress.css \ $(srcdir)/downloadProgress.css \

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

@ -61,51 +61,54 @@ LLIBS= \
include <$(DEPTH)\config\rules.mak> include <$(DEPTH)\config\rules.mak>
# Define this so nobody can screw it up.
DISTRES=$(DIST)\bin\res\samples
install:: $(DLL) install:: $(DLL)
$(MAKE_INSTALL) $(DLL) $(DIST)\bin $(MAKE_INSTALL) $(DLL) $(DIST)\bin
$(MAKE_INSTALL) appshell.html $(DIST)\bin\res\samples $(MAKE_INSTALL) appshell.html $(DISTRES)
$(MAKE_INSTALL) status.html $(DIST)\bin\res\samples $(MAKE_INSTALL) status.html $(DISTRES)
$(MAKE_INSTALL) status.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) status.xul $(DISTRES)
$(MAKE_INSTALL) toolbar.xml $(DIST)\bin\res\samples $(MAKE_INSTALL) toolbar.xml $(DISTRES)
$(MAKE_INSTALL) BrowserInitPage.html $(DIST)\bin\res\samples $(MAKE_INSTALL) BrowserInitPage.html $(DISTRES)
$(MAKE_INSTALL) contentframe.html $(DIST)\bin\res\samples $(MAKE_INSTALL) contentframe.html $(DISTRES)
$(MAKE_INSTALL) sidebar.html $(DIST)\bin\res\samples $(MAKE_INSTALL) sidebar.html $(DISTRES)
$(MAKE_INSTALL) xul.css $(DIST)\bin\res\samples $(MAKE_INSTALL) xul.css $(DISTRES)
$(MAKE_INSTALL) dialogs.css $(DIST)\bin\res\samples $(MAKE_INSTALL) dialogs.css $(DISTRES)
$(MAKE_INSTALL) navigator.css $(DIST)\bin\res\samples $(MAKE_INSTALL) navigator.css $(DISTRES)
$(MAKE_INSTALL) navigator.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) navigator.xul $(DISTRES)
$(MAKE_INSTALL) viewSource.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) viewSource.xul $(DISTRES)
$(MAKE_INSTALL) saveToDisk.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) unknownContent.xul $(DISTRES)
$(MAKE_INSTALL) NetSupportUserPassword.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) NetSupportUserPassword.xul $(DISTRES)
$(MAKE_INSTALL) downloadProgress.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) downloadProgress.xul $(DISTRES)
$(MAKE_INSTALL) downloadProgress.css $(DIST)\bin\res\samples $(MAKE_INSTALL) downloadProgress.css $(DISTRES)
$(MAKE_INSTALL) navigator-mozillazine0.css $(DIST)\bin\res\samples $(MAKE_INSTALL) navigator-mozillazine0.css $(DISTRES)
$(MAKE_INSTALL) navigator-test1.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) navigator-test1.xul $(DISTRES)
$(MAKE_INSTALL) navigator-goofy.css $(DIST)\bin\res\samples $(MAKE_INSTALL) navigator-goofy.css $(DISTRES)
$(MAKE_INSTALL) navigator-shiny.css $(DIST)\bin\res\samples $(MAKE_INSTALL) navigator-shiny.css $(DISTRES)
$(MAKE_INSTALL) raindrops_light.gif $(DIST)\bin\res\samples $(MAKE_INSTALL) raindrops_light.gif $(DISTRES)
$(MAKE_INSTALL) skindemo.xul $(DIST)\bin\res\samples $(MAKE_INSTALL) skindemo.xul $(DISTRES)
clobber:: clobber::
rm -f $(DIST)\bin\$(DLLNAME).dll rm -f $(DIST)\bin\$(DLLNAME).dll
rm -f $(DIST)\res\samples\appshell.html rm -f $(DISTRES)\appshell.html
rm -f $(DIST)\res\samples\status.html rm -f $(DISTRES)\status.html
rm -f $(DIST)\res\samples\status.xul rm -f $(DISTRES)\status.xul
rm -f $(DIST)\res\samples\BrowserInitPage.html rm -f $(DISTRES)\BrowserInitPage.html
rm -f $(DIST)\res\samples\contentframe.html rm -f $(DISTRES)\contentframe.html
rm -f $(DIST)\res\samples\sidebar.html rm -f $(DISTRES)\sidebar.html
rm -f $(DIST)\res\samples\xul.css rm -f $(DISTRES)\xul.css
rm -f $(DIST)\res\samples\navigator.xul rm -f $(DISTRES)\navigator.xul
rm -f $(DIST)\res\samples\viewSource.xul rm -f $(DISTRES)\viewSource.xul
rm -f $(DIST)\res\samples\saveToDisk.xul rm -f $(DISTRES)\unknownContent.xul
rm -f $(DIST)\res\samples\downloadProgress.xul rm -f $(DISTRES)\downloadProgress.xul
rm -f $(DIST)\res\samples\downloadProgress.css rm -f $(DISTRES)\downloadProgress.css
rm -f $(DIST)\res\samples\dialogs.css rm -f $(DISTRES)\dialogs.css
rm -f $(DIST)\res\samples\navigator.css rm -f $(DISTRES)\navigator.css
rm -f $(DIST)\res\samples\navigator-mozillazine0.css rm -f $(DISTRES)\navigator-mozillazine0.css
rm -f $(DIST)\res\samples\navigator-test1.xul rm -f $(DISTRES)\navigator-test1.xul
rm -f $(DIST)\res\samples\navigator-goofy.css rm -f $(DISTRES)\navigator-goofy.css
rm -f $(DIST)\res\samples\navigator-shiny.css rm -f $(DISTRES)\navigator-shiny.css
rm -f $(DIST)\res\samples\raindrops_light.gif rm -f $(DISTRES)\raindrops_light.gif
rm -f $(DIST)\bin\res\samples\NetSupportUserPassword.xul rm -f $(DISTRES)\NetSupportUserPassword.xul

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

@ -0,0 +1,102 @@
<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<!DOCTYPE window>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Unknown File Type"
onload="onLoad()">
<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=""/>
</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">
You have started to download a file of type
<html:div id="dialog.contentType" style="display:inline">
contentType goes here
</html:div>
</html:td>
</html:tr>
<html:tr>
<html:td style="width:25%">
<html:button id="dialog.more" onclick="more()" disabled="">More Info...</html:button>
</html:td>
<html:td style="width:25%">
<html:button id="dialog.pick" onclick="pick()" disabled="">Pick App...</html:button>
</html:td>
<html:td style="width:25%">
<html:button id="dialog.save" onclick="save()">Save File...</html:button>
</html:td>
<html:td style="width:25%">
<html:button id="dialog.cancel" onclick="cancel()">Cancel</html:button>
</html:td>
</html:tr>
</html:table>
</window>