Changed the last embedPC() parameter from sStateFile to sParms, although for backward compatibility, if sParms is not a JSON object definition (ie, beginning with a brace), it continues to be treated as a state filename.
This change allows us to pass any number of additional properties to embedPC(), which in turn can override properties contained in the XML file; the only property overrides currently supported are 'state' (which overrides any 'state' property set in the XML's <computer> element) and 'automount' (which overrides any 'automount' property set in the XML's <fdc> element). The goal is to make it easier to reuse XML machine definitions, by allowing commonly altered component attributes to be overridden.
This commit is contained in:
parent
5d2da60d67
commit
12b760f912
28 changed files with 2187 additions and 2059 deletions
|
|
@ -12,6 +12,9 @@ url: "http://www.pcjs.org" # "http://jeffpar.github.io" or "http://www.pcjs.org
|
||||||
twitter_username: jeffpar
|
twitter_username: jeffpar
|
||||||
github_username: jeffpar
|
github_username: jeffpar
|
||||||
|
|
||||||
|
left_brace: "{"
|
||||||
|
right_brace: "}"
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
|
|
||||||
exclude: ["index.html", "**/index.html", "logs", "node_modules", "**/c64", "src", "**/src", "**/static", "tmp", "videos", "web"]
|
exclude: ["index.html", "**/index.html", "logs", "node_modules", "**/c64", "src", "**/src", "**/static", "tmp", "videos", "web"]
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{% assign machine_template = machine.template %}
|
{% assign machine_template = machine.template %}
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
{% unless machine.state %}
|
{% capture machine_parms %}{{ site.left_brace }}state:"{{ machine.state }}",autoMount:{{ machine.automount|jsonify }}{{ site.right_brace }}{% endcapture %}
|
||||||
{% assign machine_state = '' %}
|
|
||||||
{% else %}
|
|
||||||
{% assign machine_state = machine.state %}
|
|
||||||
{% endunless %}
|
|
||||||
{% if site.pcjs.compiled == true and machine.uncompiled != true %}
|
{% if site.pcjs.compiled == true and machine.uncompiled != true %}
|
||||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine.type | remove:'-dbg' }}js/{{ site.pcjs.version }}/{{ machine.type }}.js"></script>{% endcapture %}
|
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine.type | remove:'-dbg' }}js/{{ site.pcjs.version }}/{{ machine.type }}.js"></script>{% endcapture %}
|
||||||
{% unless machine_scripts contains machine_script %}
|
{% unless machine_scripts contains machine_script %}
|
||||||
|
|
@ -38,5 +34,5 @@
|
||||||
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine.type | remove:'-dbg' }}js/templates/components.xsl{% endcapture %}
|
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine.type | remove:'-dbg' }}js/templates/components.xsl{% endcapture %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script type="text/javascript">{{ machine_embed }}("{{ machine.id }}","{{ machine_config }}","{{ machine_template }}","{{ machine_state }}");</script>
|
<script type="text/javascript">{{ machine_embed }}("{{ machine.id }}","{{ machine_config }}","{{ machine_template }}",'{{ machine_parms }}');</script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<keyboard id="keyboard" padleft="8px">
|
<keyboard id="keyboard" padleft="8px">
|
||||||
<control type="button" binding="esc">ESC</control>
|
<control type="button" binding="esc">ESC</control>
|
||||||
<control type="button" binding="ctrl-c">CTRL-C</control>
|
|
||||||
<control type="button" binding="f1">F1</control>
|
<control type="button" binding="f1">F1</control>
|
||||||
<control type="button" binding="f10">F10</control>
|
<control type="button" binding="f10">F10</control>
|
||||||
</keyboard>
|
</keyboard>
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,13 @@ Machines from our [IBM PC Application Archive](/apps/pc/):
|
||||||
|
|
||||||
And here are some machines from our [IBM PC Disk Archive](/disks/pc/):
|
And here are some machines from our [IBM PC Disk Archive](/disks/pc/):
|
||||||
|
|
||||||
* [CP/M-86 v1.1B](/disks/pc/cpm/1.1b/)
|
* [PC-DOS 1.00](/disks/pc/dos/ibm/1.00/)
|
||||||
|
* [PC-DOS 1.10](/disks/pc/dos/ibm/1.10/)
|
||||||
|
* [Multitasking MS-DOS 4.00](/disks/pc/dos/microsoft/4.0M/)
|
||||||
* [IBM Diagnostics v2.20](/disks/pc/diags/ibm/2.20/)
|
* [IBM Diagnostics v2.20](/disks/pc/diags/ibm/2.20/)
|
||||||
|
* [IBM OS/2 1.0](/disks/pc/os2/ibm/1.0/)
|
||||||
|
* [OS/2 1.0 Debugger Boot Disk](/disks/pc/os2/misc/1.0/debugger/)
|
||||||
|
* [CP/M-86 v1.1B](/disks/pc/cpm/1.1b/)
|
||||||
* [Infocom Zork I](/disks/pc/games/infocom/zork1/)
|
* [Infocom Zork I](/disks/pc/games/infocom/zork1/)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,16 @@
|
||||||
<machine id="deskpro386" class="pc" border="1" pos="center" background="#FAEBD7">
|
<machine id="deskpro386" class="pc" border="1" pos="center" background="#FAEBD7">
|
||||||
<computer id="deskpro386-ega-2048k" name="Compaq DeskPro 386" buswidth="32"/>
|
<computer id="deskpro386-ega-2048k" name="Compaq DeskPro 386" buswidth="32"/>
|
||||||
<cpu id="cpu386" model="80386" autostart="false"/>
|
<cpu id="cpu386" model="80386" autostart="false"/>
|
||||||
<ram id="ramLow" addr="0x00000" test="true" size="0xa0000" comment="ROM BIOS memory test has NOT been disabled"/>
|
<ram id="ramLow" addr="0x00000" test="false" size="0xa0000" comment="ROM BIOS memory test has been disabled"/>
|
||||||
<ram id="ramCPQ" addr="0xfa0000" size="0x60000" comment="Compaq memory at 0xFA0000"/>
|
<ram id="ramCPQ" addr="0xfa0000" size="0x60000" comment="Compaq memory at 0xFA0000"/>
|
||||||
<ram id="ramExt" addr="0x100000" size="0x100000" comment="Extended memory at 0x100000"/>
|
<ram id="ramExt" addr="0x100000" size="0x100000" comment="Extended memory at 0x100000"/>
|
||||||
<rom id="romEGA" addr="0xc0000" size="0x4000" file="/devices/pc/video/ibm/ega/ibm-ega.json" notify="videoEGA"/>
|
<rom id="romEGA" addr="0xc0000" size="0x4000" file="/devices/pc/video/ibm/ega/ibm-ega.json" notify="videoEGA"/>
|
||||||
<rom id="romBIOS" addr="0xf8000" size="0x8000" alias="[0xf0000,0xffff0000,0xffff8000]" file="/devices/pc/bios/compaq/deskpro386/1988-01-28/1988-01-28.json"/>
|
<rom id="romBIOS" addr="0xf8000" size="0x8000" alias="[0xf0000,0xffff0000,0xffff8000]" file="/devices/pc/bios/compaq/deskpro386/1988-01-28/1988-01-28.json"/>
|
||||||
<video ref="/devices/pc/video/ibm/ega/ibm-ega-128kb-autolockfs.xml"/>
|
<video ref="/devices/pc/video/ibm/ega/ibm-ega-128kb-autolockfs.xml"/>
|
||||||
<keyboard ref="/devices/pc/keyboard/keyboard-minimal-functions.xml"/>
|
<keyboard ref="/devices/pc/keyboard/keyboard-minimal-functions.xml"/>
|
||||||
<debugger id="debugger" messages="fault|port" commands=""/>
|
<debugger id="debugger" messages="fault" commands=""/>
|
||||||
<panel ref="/devices/pc/panel/btpanel.xml"/>
|
<panel ref="/devices/pc/panel/wide386.xml"/>
|
||||||
<fdc ref="/disks/pc/library.xml" automount='{A: {name: "PC-DOS 3.00 (Disk 1)", path: "/disks/pc/dos/ibm/3.00/PCDOS300-DISK1.json"}, B: {name: "PC-DOS 3.00 (Disk 2)", path: "/disks/pc/dos/ibm/3.00/PCDOS300-DISK2.json"}}'/>
|
<fdc ref="/disks/pc/library.xml" automount='{A: {name: "PC-DOS 3.20 (Disk 1)", path: "/disks/pc/dos/ibm/3.20/PCDOS320-DISK1.json"}, B: {name: "PC-DOS 3.20 (Disk 2)", path: "/disks/pc/dos/ibm/3.20/PCDOS320-DISK2.json"}}'/>
|
||||||
<hdcFoo id="hdcAT" type="at" drives='[{name:"20Mb Hard Disk",type:2}]'/>
|
<hdcFoo id="hdcAT" type="at" drives='[{name:"20Mb Hard Disk",type:2}]'/>
|
||||||
<chipset id="chipset" model="deskpro386" floppies="[1200,1200]"/>
|
<chipset id="chipset" model="deskpro386" floppies="[1200,1200]"/>
|
||||||
<serial id="com1" adapter="1"/>
|
<serial id="com1" adapter="1"/>
|
||||||
|
|
|
||||||
|
|
@ -61,9 +61,10 @@ that automatically run the software.
|
||||||
* MS OS/2 1.1
|
* MS OS/2 1.1
|
||||||
* MS OS/2 1.2
|
* MS OS/2 1.2
|
||||||
|
|
||||||
### Other OS/2 Disks
|
### [Other OS/2 Disks](/disks/pc/os2/misc/)
|
||||||
|
|
||||||
* [OS/2 1.0 Debugger Boot Disk](/disks/pc/os2/misc/)
|
* [OS/2 1.0 Debugger Boot Disk](/disks/pc/os2/misc/1.0/debugger/)
|
||||||
|
* [OS/2 FOOTBALL Boot Disk (v7.68.17)](/disks/pc/os2/misc/football/debugger/)
|
||||||
|
|
||||||
### Microsoft Windows
|
### Microsoft Windows
|
||||||
|
|
||||||
|
|
@ -118,7 +119,7 @@ that automatically run the software.
|
||||||
* Microsoft Windows SDK 2.03
|
* Microsoft Windows SDK 2.03
|
||||||
* Microsoft Windows SDK 3.00
|
* Microsoft Windows SDK 3.00
|
||||||
|
|
||||||
We also have links to all the [Microsoft Languages NewsLetters](/disks/pc/tools/microsoft/) that were published
|
NOTE: We also have links to all the [Microsoft Languages NewsLetters](/disks/pc/tools/microsoft/) that were published
|
||||||
in [PC Tech Journal](/pubs/pc/magazines/pctj/).
|
in [PC Tech Journal](/pubs/pc/magazines/pctj/).
|
||||||
|
|
||||||
### Microsoft Games
|
### Microsoft Games
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,6 @@ The PCjs machine below is running PC-DOS 4.00.
|
||||||
|
|
||||||
{% include machine.html id="ibm5170-msdos400" %}
|
{% include machine.html id="ibm5170-msdos400" %}
|
||||||
|
|
||||||
Vital Statistics
|
|
||||||
---
|
|
||||||
|
|
||||||
MS-DOS 4.00 was released in October 1988. The contents of the six 360Kb distribution diskettes are shown below.
|
MS-DOS 4.00 was released in October 1988. The contents of the six 360Kb distribution diskettes are shown below.
|
||||||
|
|
||||||
### Directory of MS-DOS 4.00 (Disk 1)
|
### Directory of MS-DOS 4.00 (Disk 1)
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,6 @@ The PCjs machine below is running PC-DOS 4.01.
|
||||||
|
|
||||||
{% include machine.html id="ibm5170-msdos401" %}
|
{% include machine.html id="ibm5170-msdos401" %}
|
||||||
|
|
||||||
Vital Statistics
|
|
||||||
---
|
|
||||||
|
|
||||||
MS-DOS 4.01 was released in April 1989. The contents of the six 360Kb distribution diskettes are shown below.
|
MS-DOS 4.01 was released in April 1989. The contents of the six 360Kb distribution diskettes are shown below.
|
||||||
|
|
||||||
### Directory of MS-DOS 4.01 (Disk 1)
|
### Directory of MS-DOS 4.01 (Disk 1)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ OS/2 1.0 Debugger Boot Disk
|
||||||
---
|
---
|
||||||
|
|
||||||
This disk contains a version of OS/2 1.0 built on October 12, 1988, which includes the built-in kernel debugger used by
|
This disk contains a version of OS/2 1.0 built on October 12, 1988, which includes the built-in kernel debugger used by
|
||||||
Microsoft and IBM for internal development. For more details, see the "OS/2 1.0" [blog post](/blog/2014/12/04/).
|
Microsoft and IBM for internal development.
|
||||||
|
|
||||||
{% include machine.html id="ibm5170" %}
|
{% include machine.html id="ibm5170" %}
|
||||||
|
|
||||||
|
Return to [Other OS/2 Disks](/disks/pc/os2/misc/).
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Other OS/2 Disks
|
||||||
|
|
||||||
### OS/2 1.0 Debugger Boot Disk
|
### OS/2 1.0 Debugger Boot Disk
|
||||||
|
|
||||||
The [OS/2 1.0 Debugger Boot Disk](/disks/pc/os2/misc/1.0/debugger/) contains a version of OS/2 1.0 built on
|
The [OS/2 1.0 Debugger Boot Disk](/disks/pc/os2/misc/1.0/debugger/) contains a version of OS/2 1.0 built on
|
||||||
October 12, 1988, which includes the built-in kernel debugger used by Microsoft and IBM for internal development.
|
October 12, 1988, which includes the built-in kernel debugger used by Microsoft and IBM for internal development.
|
||||||
For more details, see the "OS/2 1.0" [blog post](/blog/2014/12/04/).
|
For more details, see the "OS/2 1.0" [blog post](/blog/2014/12/04/).
|
||||||
|
|
||||||
|
|
@ -25,13 +25,13 @@ of these files, suggesting that this was a private build of IBM OS/2 1.0. When
|
||||||
The 5-digit number indicates the day the files were built. The first 2 digits are the year (88) and the 3 remaining
|
The 5-digit number indicates the day the files were built. The first 2 digits are the year (88) and the 3 remaining
|
||||||
digits are the day of the year (286 or October 12).
|
digits are the day of the year (286 or October 12).
|
||||||
|
|
||||||
A directory listing of the disk is provided below.
|
|
||||||
|
|
||||||
Aside from the fact that this version of IBMDOS.COM is much larger than the 1987 version (thanks to the inclusion of
|
Aside from the fact that this version of IBMDOS.COM is much larger than the 1987 version (thanks to the inclusion of
|
||||||
the kernel debugger), most of the file sizes are identical. But not all. For example, the 1987 version of CLOCK01.SYS
|
the kernel debugger), most of the file sizes are identical. But not all. For example, the 1987 version of CLOCK01.SYS
|
||||||
is 2762 bytes, whereas this version is 2812 bytes. So apparently a few changes were slipped into the 1.0 sources used
|
is 2762 bytes, whereas this version is 2812 bytes. So apparently a few changes were slipped into the 1.0 sources used
|
||||||
to build these binaries.
|
to build these binaries.
|
||||||
|
|
||||||
|
A directory listing of the disk is provided below.
|
||||||
|
|
||||||
IBMBIO COM 4096 10-12-88 12:32p
|
IBMBIO COM 4096 10-12-88 12:32p
|
||||||
IBMDOS COM 299143 10-12-88 10:53a
|
IBMDOS COM 299143 10-12-88 10:53a
|
||||||
IBMDOS SYM 62788 10-12-88 10:54a
|
IBMDOS SYM 62788 10-12-88 10:54a
|
||||||
|
|
@ -68,3 +68,48 @@ to build these binaries.
|
||||||
CONFIG SYS 101 12-04-14 7:45p
|
CONFIG SYS 101 12-04-14 7:45p
|
||||||
34 file(s) 765785 bytes
|
34 file(s) 765785 bytes
|
||||||
437760 bytes free
|
437760 bytes free
|
||||||
|
|
||||||
|
### OS/2 FOOTBALL Boot Disk (v7.68.17)
|
||||||
|
|
||||||
|
The [OS/2 FOOTBALL Boot Disk (v7.68.17)](/disks/pc/os2/misc/football/debugger/) contains a prototype version of OS/2
|
||||||
|
from early 1987 that added preliminary support for the Intel 80386 processor, including limited support for 32-bit code
|
||||||
|
and the ability to run multiple DOS applications in V86-mode. It was forked from pre-OS/2 1.0 sources, and the only
|
||||||
|
machine it supported was the Compaq DeskPro 386-16.
|
||||||
|
|
||||||
|
A directory listing of the disk is provided below.
|
||||||
|
|
||||||
|
Volume in drive A has no label
|
||||||
|
Directory of A:\
|
||||||
|
|
||||||
|
IBMBIO COM 50689 2-27-87 3:49p
|
||||||
|
IBMDOS COM 216962 2-27-87 3:48p
|
||||||
|
OSO001 MSG 40730 2-27-87 12:24p
|
||||||
|
ANSICALL EXE 3165 2-27-87 11:34a
|
||||||
|
BKSCALLS EXE 3611 2-27-87 11:51a
|
||||||
|
BMSCALLS EXE 2064 2-27-87 11:55a
|
||||||
|
BVSCALLS EXE 11710 2-27-87 12:02p
|
||||||
|
DOSCALL1 EXE 7071 2-27-87 12:03p
|
||||||
|
KBDCALLS EXE 4138 2-27-87 12:04p
|
||||||
|
MONCALLS EXE 5655 2-27-87 12:09p
|
||||||
|
MOUCALLS EXE 5177 2-27-87 12:16p
|
||||||
|
QUECALLS EXE 11508 2-27-87 12:28p
|
||||||
|
SESMGR EXE 25744 2-27-87 12:41p
|
||||||
|
SHELL EXE 4096 2-27-87 12:43p
|
||||||
|
VIOCALLS EXE 9833 2-27-87 12:47p
|
||||||
|
CMD EXE 47056 11-17-86 1:52p
|
||||||
|
VT52 SYS 3205 10-27-86 3:57p
|
||||||
|
IBMDOS SYM 50692 2-27-87 3:48p
|
||||||
|
COUNTRY SYS 6175 11-03-86 8:32p
|
||||||
|
MSG EXE 5824 11-03-86 8:36p
|
||||||
|
NLS EXE 3124 11-03-86 8:37p
|
||||||
|
SWAPPER EXE 4150 2-25-87 8:04p
|
||||||
|
EXEHDR EXE 23242 10-17-86 2:24p
|
||||||
|
COMMAND COM 23724 10-27-86 3:57p
|
||||||
|
CONFIG SYS 90 2-27-87 4:14p
|
||||||
|
POINTDD SYS 4240 11-03-86 7:28p
|
||||||
|
VDISK SYS 4662 11-03-86 7:28p
|
||||||
|
PGSWP32 EXE 7570 2-02-87 12:20p
|
||||||
|
LIN EXE 8084 2-12-87 3:00p
|
||||||
|
MAIN EXE 32482 11-14-86 12:44p
|
||||||
|
CPGREP EXE 25286 10-21-86 9:08p
|
||||||
|
31 File(s) 549888 bytes free
|
||||||
|
|
|
||||||
25
disks/pc/os2/misc/football/debugger/README.md
Normal file
25
disks/pc/os2/misc/football/debugger/README.md
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "OS/2 FOOTBALL Boot Disk (v7.68.17)"
|
||||||
|
permalink: /disks/pc/os2/misc/football/debugger/
|
||||||
|
machines:
|
||||||
|
- type: pc-dbg
|
||||||
|
id: deskpro386
|
||||||
|
config: /devices/pc/machine/compaq/deskpro386/ega/2048kb/machine.xml
|
||||||
|
uncompiled: true
|
||||||
|
automount:
|
||||||
|
A:
|
||||||
|
name: OS/2 FOOTBALL Boot Disk (v7.68.17)
|
||||||
|
path: /disks/pc/os2/misc/football/debugger/FOOTBALL-7.68.17.json
|
||||||
|
---
|
||||||
|
|
||||||
|
OS/2 FOOTBALL Boot Disk (v7.68.17)
|
||||||
|
---
|
||||||
|
|
||||||
|
This boot disk contains a prototype version of OS/2 from early 1987 that added preliminary support for the Intel 80386
|
||||||
|
processor, including limited support for 32-bit code and the ability to run multiple DOS applications in V86-mode.
|
||||||
|
It was forked from pre-OS/2 1.0 sources, and the only machine it supported was the Compaq DeskPro 386-16.
|
||||||
|
|
||||||
|
{% include machine.html id="deskpro386" %}
|
||||||
|
|
||||||
|
Return to [Other OS/2 Disks](/disks/pc/os2/misc/).
|
||||||
|
|
@ -6,4 +6,7 @@
|
||||||
<disk id="disk01" size="1228800" chs="80:2:15" href="/disks/pc/os2/misc/1.0/debugger/OS210-BOOT.json">
|
<disk id="disk01" size="1228800" chs="80:2:15" href="/disks/pc/os2/misc/1.0/debugger/OS210-BOOT.json">
|
||||||
<name>OS/2 1.0 Debugger Boot Disk</name>
|
<name>OS/2 1.0 Debugger Boot Disk</name>
|
||||||
</disk>
|
</disk>
|
||||||
|
<disk id="disk02" size="1228800" chs="80:2:15" img="football/debugger/static/FOOTBALL-7.68.17.img" href="/disks/pc/os2/misc/football/debugger/FOOTBALL-7.68.17.json" md5="3825dc8053f904c266b1ce98dbf1e981" md5json="7ea3f05e71ae4f3ccc7432f025426140">
|
||||||
|
<name>OS/2 FOOTBALL Boot Disk (v7.68.17)</name>
|
||||||
|
</disk>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,12 @@
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
<xsl:with-param name="component" select="'machine'"/>
|
<xsl:with-param name="component" select="'machine'"/>
|
||||||
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
|
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
|
||||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
<xsl:with-param name="parms">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$machineState != ''">state:"<xsl:value-of select="$machineState"/>"</xsl:when>
|
||||||
|
<xsl:otherwise><xsl:value-of select="@parms"/></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
|
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -107,9 +112,9 @@
|
||||||
<xsl:otherwise><xsl:value-of select="$component"/></xsl:otherwise>
|
<xsl:otherwise><xsl:value-of select="$component"/></xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="componentURL">
|
<xsl:variable name="machineParms">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$component = 'machine'">url:'<xsl:value-of select="$url"/>'</xsl:when>
|
<xsl:when test="$component = 'machine'"><xsl:value-of select="$parms"/></xsl:when>
|
||||||
<xsl:otherwise/>
|
<xsl:otherwise/>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
@ -191,7 +196,7 @@
|
||||||
<xsl:variable name="componentClass">
|
<xsl:variable name="componentClass">
|
||||||
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
|
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}" data-value="{$componentURL}">
|
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}" data-value="{$machineParms}">
|
||||||
<xsl:if test="$component = 'machine'">
|
<xsl:if test="$component = 'machine'">
|
||||||
<xsl:apply-templates select="name" mode="machine"/>
|
<xsl:apply-templates select="name" mode="machine"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
@ -206,7 +211,7 @@
|
||||||
<xsl:apply-templates select="menu" mode="component"/>
|
<xsl:apply-templates select="menu" mode="component"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="$class != '' and $component != 'machine'">
|
<xsl:if test="$class != '' and $component != 'machine'">
|
||||||
<div class="{$APPCLASS}-{$class}-object" data-value="id:'{$id}',name:'{$name}'{$comment}{$parms}"> </div>
|
<div class="{$APPCLASS}-{$class}-object" data-value="{{id:'{$id}',name:'{$name}'{$comment}{$parms}}}"> </div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="control">
|
<xsl:if test="control">
|
||||||
<div class="{$APPCLASS}-controls">
|
<div class="{$APPCLASS}-controls">
|
||||||
|
|
@ -354,30 +359,30 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@type = 'canvas'">
|
<xsl:when test="@type = 'canvas'">
|
||||||
<canvas class="{$APPCLASS}-binding {$APPCLASS}-canvas" width="{@width}" height="{@height}" style="-webkit-user-select:none;{$border}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></canvas>
|
<canvas class="{$APPCLASS}-binding {$APPCLASS}-canvas" width="{@width}" height="{@height}" style="-webkit-user-select:none;{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></canvas>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'button'">
|
<xsl:when test="@type = 'button'">
|
||||||
<button class="{$APPCLASS}-binding" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></button>
|
<button class="{$APPCLASS}-binding" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></button>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'list'">
|
<xsl:when test="@type = 'list'">
|
||||||
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}">
|
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}">
|
||||||
<xsl:apply-templates select="disk|app|manifest" mode="component"/>
|
<xsl:apply-templates select="disk|app|manifest" mode="component"/>
|
||||||
</select>
|
</select>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'text'">
|
<xsl:when test="@type = 'text'">
|
||||||
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" value="{.}" autocapitalize="off" autocorrect="off"/>
|
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" value="{.}" autocapitalize="off" autocorrect="off"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'submit'">
|
<xsl:when test="@type = 'submit'">
|
||||||
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{$type},{$binding}" value="{.}"/>
|
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}" value="{.}"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'textarea'">
|
<xsl:when test="@type = 'textarea'">
|
||||||
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" readonly="readonly"> </textarea>
|
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" readonly="readonly"> </textarea>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'heading'">
|
<xsl:when test="@type = 'heading'">
|
||||||
<div><xsl:value-of select="."/></div>
|
<div><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'file'">
|
<xsl:when test="@type = 'file'">
|
||||||
<form class="{$APPCLASS}-binding" data-value="{$type},{$binding}">
|
<form class="{$APPCLASS}-binding" data-value="{{{$type},{$binding}}}">
|
||||||
<fieldset class="{$APPCLASS}-fieldset">
|
<fieldset class="{$APPCLASS}-fieldset">
|
||||||
<input type="file"/>
|
<input type="file"/>
|
||||||
<input type="submit" value="Mount" disabled="true"/>
|
<input type="submit" value="Mount" disabled="true"/>
|
||||||
|
|
@ -385,7 +390,7 @@
|
||||||
</form>
|
</form>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'led'">
|
<xsl:when test="@type = 'led'">
|
||||||
<div class="{$APPCLASS}-binding {$APPCLASS}-{@type}" data-value="{$type},{$binding}"><xsl:value-of select="."/></div>
|
<div class="{$APPCLASS}-binding {$APPCLASS}-{@type}" data-value="{{{$type},{$binding}}}"><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'separator'">
|
<xsl:when test="@type = 'separator'">
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
@ -397,7 +402,7 @@
|
||||||
<div style="clear:both"> </div>
|
<div style="clear:both"> </div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<div class="{$APPCLASS}-binding{$subClass} {$APPCLASS}-{@type}" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></div>
|
<div class="{$APPCLASS}-binding{$subClass} {$APPCLASS}-{@type}" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="@label">
|
<xsl:if test="@label">
|
||||||
|
|
@ -423,7 +428,7 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{@path}" data-value="{$desc}"><xsl:if test="name"><xsl:value-of select="name"/></xsl:if><xsl:if test="not(name)"><xsl:value-of select="."/></xsl:if></option>
|
<option value="{@path}" data-value="{{{$desc}}}"><xsl:if test="name"><xsl:value-of select="name"/></xsl:if><xsl:if test="not(name)"><xsl:value-of select="."/></xsl:if></option>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="app[@ref]" mode="component">
|
<xsl:template match="app[@ref]" mode="component">
|
||||||
|
|
@ -446,7 +451,7 @@
|
||||||
<xsl:variable name="files">
|
<xsl:variable name="files">
|
||||||
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$path"/></xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$path"/></xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{$files}" data-value="{$desc}"><xsl:value-of select="@name"/></option>
|
<option value="{$files}" data-value="{{{$desc}}}"><xsl:value-of select="@name"/></option>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="manifest[@ref]" mode="component">
|
<xsl:template match="manifest[@ref]" mode="component">
|
||||||
|
|
@ -483,7 +488,7 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:if test="@href">
|
<xsl:if test="@href">
|
||||||
<option value="{@href}" data-value="{$link}"><xsl:value-of select="$name"/></option>
|
<option value="{@href}" data-value="{{{$link}}}"><xsl:value-of select="$name"/></option>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="not(@href)">
|
<xsl:if test="not(@href)">
|
||||||
<xsl:variable name="dir">
|
<xsl:variable name="dir">
|
||||||
|
|
@ -492,7 +497,7 @@
|
||||||
<xsl:variable name="files">
|
<xsl:variable name="files">
|
||||||
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$dir"/></xsl:if><xsl:value-of select="@dir"/><xsl:value-of select="."/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$dir"/></xsl:if><xsl:value-of select="@dir"/><xsl:value-of select="."/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{$files}" data-value="{$link}"><xsl:value-of select="$name"/></option>
|
<option value="{$files}" data-value="{{{$link}}}"><xsl:value-of select="$name"/></option>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -157,7 +157,7 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<div class="{$APPCLASS}-container" style="{$border}{$style}">
|
<div class="{$APPCLASS}-container" style="{$border}{$style}">
|
||||||
<xsl:if test="$class != '' and $component != 'machine'">
|
<xsl:if test="$class != '' and $component != 'machine'">
|
||||||
<div class="{$APPCLASS}-{$class}-object" data-value="id:'{$id}',name:'{$name}'{$parms}"></div>
|
<div class="{$APPCLASS}-{$class}-object" data-value="{{id:'{$id}',name:'{$name}'{$parms}}}"></div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="control">
|
<xsl:if test="control">
|
||||||
<div class="{$APPCLASS}-controls">
|
<div class="{$APPCLASS}-controls">
|
||||||
|
|
@ -270,27 +270,27 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@type = 'button'">
|
<xsl:when test="@type = 'button'">
|
||||||
<button class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></button>
|
<button class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></button>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'list'">
|
<xsl:when test="@type = 'list'">
|
||||||
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}">
|
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}">
|
||||||
<xsl:apply-templates select="item" mode="component"/>
|
<xsl:apply-templates select="item" mode="component"/>
|
||||||
</select>
|
</select>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'text'">
|
<xsl:when test="@type = 'text'">
|
||||||
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" value="" autocapitalize="off" autocorrect="off"/>
|
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" value="" autocapitalize="off" autocorrect="off"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'submit'">
|
<xsl:when test="@type = 'submit'">
|
||||||
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{$type},{$binding}" value="{.}"/>
|
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}" value="{.}"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'textarea'">
|
<xsl:when test="@type = 'textarea'">
|
||||||
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" readonly="readonly"></textarea>
|
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" readonly="readonly"></textarea>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'heading'">
|
<xsl:when test="@type = 'heading'">
|
||||||
<div><xsl:value-of select="."/></div>
|
<div><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'file'">
|
<xsl:when test="@type = 'file'">
|
||||||
<form class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}">
|
<form class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}">
|
||||||
<fieldset class="{$APPCLASS}-fieldset">
|
<fieldset class="{$APPCLASS}-fieldset">
|
||||||
<input type="file"/>
|
<input type="file"/>
|
||||||
<input type="submit" value="Mount" disabled="true"/>
|
<input type="submit" value="Mount" disabled="true"/>
|
||||||
|
|
@ -304,7 +304,7 @@
|
||||||
<div style="clear:both"></div><br/>
|
<div style="clear:both"></div><br/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<div class="{$APPCLASS}-binding{$subclass}" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></div>
|
<div class="{$APPCLASS}-binding{$subclass}" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="@label">
|
<xsl:if test="@label">
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ if (NODE) {
|
||||||
* @param {Object} [parmsMachine]
|
* @param {Object} [parmsMachine]
|
||||||
* @param {boolean} [fSuspended]
|
* @param {boolean} [fSuspended]
|
||||||
*
|
*
|
||||||
* The Computer component has no required (parmsComputer) properties, but does
|
* The Computer component has no required (parmsComputer) properties, but it does
|
||||||
* support the following:
|
* support the following:
|
||||||
*
|
*
|
||||||
* autoPower: true to automatically power the computer (default), false to wait;
|
* autoPower: true to automatically power the computer (default), false to wait;
|
||||||
|
|
@ -102,6 +102,16 @@ if (NODE) {
|
||||||
*
|
*
|
||||||
* state: the path to JSON-encoded state file (see details regarding 'state' below)
|
* state: the path to JSON-encoded state file (see details regarding 'state' below)
|
||||||
*
|
*
|
||||||
|
* The parmsMachine object, if provided, may contain any of:
|
||||||
|
*
|
||||||
|
* url: the location of the machine XML file
|
||||||
|
*
|
||||||
|
* autoMount: if set, this should override any 'autoMount' property in the FDC's
|
||||||
|
* parmsFDC object.
|
||||||
|
*
|
||||||
|
* state: if set, this should override any 'state' property in the Computer's
|
||||||
|
* parmsComputer object.
|
||||||
|
*
|
||||||
* If a predefined state is supplied AND it's successfully loaded, then resume behavior
|
* If a predefined state is supplied AND it's successfully loaded, then resume behavior
|
||||||
* defaults to '1' (ie, resume enabled without prompting).
|
* defaults to '1' (ie, resume enabled without prompting).
|
||||||
*
|
*
|
||||||
|
|
@ -141,7 +151,9 @@ function Computer(parmsComputer, parmsMachine, fSuspended) {
|
||||||
this.sStateData = null;
|
this.sStateData = null;
|
||||||
this.fStateData = false; // remembers if sStateData was loaded
|
this.fStateData = false; // remembers if sStateData was loaded
|
||||||
this.fServerState = false;
|
this.fServerState = false;
|
||||||
this.url = parmsMachine? parmsMachine['url'] : null;
|
|
||||||
|
this.parmsMachine = parmsMachine;
|
||||||
|
this.url = this.getMachineParm('url') || "";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate a random number x (where 0 <= x < 1), add 0.1 so that it's guaranteed to be
|
* Generate a random number x (where 0 <= x < 1), add 0.1 so that it's guaranteed to be
|
||||||
|
|
@ -230,7 +242,7 @@ function Computer(parmsComputer, parmsMachine, fSuspended) {
|
||||||
* localStorage (in other words, it prevents fAllowResume from being true, and forcing resume off).
|
* localStorage (in other words, it prevents fAllowResume from being true, and forcing resume off).
|
||||||
*/
|
*/
|
||||||
var fAllowResume;
|
var fAllowResume;
|
||||||
var sState = Component.parmsURL && Component.parmsURL['state'] || (fAllowResume = true) && parmsComputer['state'];
|
var sState = Component.parmsURL && Component.parmsURL['state'] || this.getMachineParm('state') || (fAllowResume = true) && parmsComputer['state'];
|
||||||
|
|
||||||
if (sState) {
|
if (sState) {
|
||||||
sStatePath = this.sStatePath = sState;
|
sStatePath = this.sStatePath = sState;
|
||||||
|
|
@ -318,6 +330,17 @@ Computer.prototype.getMachineID = function()
|
||||||
return this.sMachineID;
|
return this.sMachineID;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getMachineParm(sParm)
|
||||||
|
*
|
||||||
|
* @param {string} sParm
|
||||||
|
* @return {string|undefined}
|
||||||
|
*/
|
||||||
|
Computer.prototype.getMachineParm = function(sParm)
|
||||||
|
{
|
||||||
|
return this.parmsMachine && this.parmsMachine[sParm];
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getUserID()
|
* getUserID()
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -142,22 +142,11 @@ function FDC(parmsFDC) {
|
||||||
this['dmaWrite'] = this.dmaWrite;
|
this['dmaWrite'] = this.dmaWrite;
|
||||||
this['dmaFormat'] = this.dmaFormat;
|
this['dmaFormat'] = this.dmaFormat;
|
||||||
|
|
||||||
this.configMount = null;
|
/*
|
||||||
if (parmsFDC['autoMount']) {
|
* We record any 'autoMount' object now, but we no longer parse it until initBus(), because the Computer's
|
||||||
this.configMount = parmsFDC['autoMount'];
|
* getMachineParm() service may have an override for us.
|
||||||
if (typeof this.configMount == "string") {
|
*/
|
||||||
try {
|
this.configMount = parmsFDC['autoMount'] || null;
|
||||||
/*
|
|
||||||
* The most likely source of any exception will be right here, where we're parsing
|
|
||||||
* the JSON-encoded diskette data.
|
|
||||||
*/
|
|
||||||
this.configMount = eval("(" + parmsFDC['autoMount'] + ")");
|
|
||||||
} catch (e) {
|
|
||||||
Component.error("FDC auto-mount error: " + e.message + " (" + parmsFDC['autoMount'] + ")");
|
|
||||||
this.configMount = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following array keeps track of every disk image we've ever mounted. Each entry in the
|
* The following array keeps track of every disk image we've ever mounted. Each entry in the
|
||||||
|
|
@ -533,6 +522,23 @@ FDC.prototype.initBus = function(cmp, bus, cpu, dbg)
|
||||||
|
|
||||||
this.chipset = cmp.getMachineComponent("ChipSet");
|
this.chipset = cmp.getMachineComponent("ChipSet");
|
||||||
|
|
||||||
|
this.configMount = this.cmp.getMachineParm('autoMount') || this.configMount;
|
||||||
|
|
||||||
|
if (this.configMount) {
|
||||||
|
if (typeof this.configMount == "string") {
|
||||||
|
try {
|
||||||
|
/*
|
||||||
|
* The most likely source of any exception will be right here, where we're parsing
|
||||||
|
* the JSON-encoded diskette data.
|
||||||
|
*/
|
||||||
|
this.configMount = eval("(" + this.configMount + ")");
|
||||||
|
} catch (e) {
|
||||||
|
Component.error("FDC auto-mount error: " + e.message + " (" + this.configMount + ")");
|
||||||
|
this.configMount = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we didn't need auto-mount support, we could defer controller initialization until we received a powerUp() notification,
|
* If we didn't need auto-mount support, we could defer controller initialization until we received a powerUp() notification,
|
||||||
* at which point reset() would call initController(), or restore() would restore the controller; in that case, all we'd need
|
* at which point reset() would call initController(), or restore() would restore the controller; in that case, all we'd need
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,12 @@
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
<xsl:with-param name="component" select="'machine'"/>
|
<xsl:with-param name="component" select="'machine'"/>
|
||||||
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
|
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
|
||||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
<xsl:with-param name="parms">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$machineState != ''">state:"<xsl:value-of select="$machineState"/>"</xsl:when>
|
||||||
|
<xsl:otherwise><xsl:value-of select="@parms"/></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
|
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -108,9 +113,9 @@
|
||||||
<xsl:otherwise><xsl:value-of select="$component"/></xsl:otherwise>
|
<xsl:otherwise><xsl:value-of select="$component"/></xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="componentURL">
|
<xsl:variable name="machineParms">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$component = 'machine'">url:'<xsl:value-of select="$url"/>'</xsl:when>
|
<xsl:when test="$component = 'machine'"><xsl:value-of select="$parms"/></xsl:when>
|
||||||
<xsl:otherwise/>
|
<xsl:otherwise/>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
@ -192,7 +197,7 @@
|
||||||
<xsl:variable name="componentClass">
|
<xsl:variable name="componentClass">
|
||||||
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
|
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}" data-value="{$componentURL}">
|
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}" data-value="{$machineParms}">
|
||||||
<xsl:if test="$component = 'machine'">
|
<xsl:if test="$component = 'machine'">
|
||||||
<xsl:apply-templates select="name" mode="machine"/>
|
<xsl:apply-templates select="name" mode="machine"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
@ -207,7 +212,7 @@
|
||||||
<xsl:apply-templates select="menu" mode="component"/>
|
<xsl:apply-templates select="menu" mode="component"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="$class != '' and $component != 'machine'">
|
<xsl:if test="$class != '' and $component != 'machine'">
|
||||||
<div class="{$APPCLASS}-{$class}-object" data-value="id:'{$id}',name:'{$name}'{$comment}{$parms}"> </div>
|
<div class="{$APPCLASS}-{$class}-object" data-value="{{id:'{$id}',name:'{$name}'{$comment}{$parms}}}"> </div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="control">
|
<xsl:if test="control">
|
||||||
<div class="{$APPCLASS}-controls">
|
<div class="{$APPCLASS}-controls">
|
||||||
|
|
@ -355,30 +360,30 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@type = 'canvas'">
|
<xsl:when test="@type = 'canvas'">
|
||||||
<canvas class="{$APPCLASS}-binding {$APPCLASS}-canvas" width="{@width}" height="{@height}" style="-webkit-user-select:none;{$border}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></canvas>
|
<canvas class="{$APPCLASS}-binding {$APPCLASS}-canvas" width="{@width}" height="{@height}" style="-webkit-user-select:none;{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></canvas>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'button'">
|
<xsl:when test="@type = 'button'">
|
||||||
<button class="{$APPCLASS}-binding" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></button>
|
<button class="{$APPCLASS}-binding" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></button>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'list'">
|
<xsl:when test="@type = 'list'">
|
||||||
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}">
|
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}">
|
||||||
<xsl:apply-templates select="disk|app|manifest" mode="component"/>
|
<xsl:apply-templates select="disk|app|manifest" mode="component"/>
|
||||||
</select>
|
</select>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'text'">
|
<xsl:when test="@type = 'text'">
|
||||||
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" value="{.}" autocapitalize="off" autocorrect="off"/>
|
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" value="{.}" autocapitalize="off" autocorrect="off"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'submit'">
|
<xsl:when test="@type = 'submit'">
|
||||||
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{$type},{$binding}" value="{.}"/>
|
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}" value="{.}"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'textarea'">
|
<xsl:when test="@type = 'textarea'">
|
||||||
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" readonly="readonly"> </textarea>
|
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" readonly="readonly"> </textarea>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'heading'">
|
<xsl:when test="@type = 'heading'">
|
||||||
<div><xsl:value-of select="."/></div>
|
<div><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'file'">
|
<xsl:when test="@type = 'file'">
|
||||||
<form class="{$APPCLASS}-binding" data-value="{$type},{$binding}">
|
<form class="{$APPCLASS}-binding" data-value="{{{$type},{$binding}}}">
|
||||||
<fieldset class="{$APPCLASS}-fieldset">
|
<fieldset class="{$APPCLASS}-fieldset">
|
||||||
<input type="file"/>
|
<input type="file"/>
|
||||||
<input type="submit" value="Mount" disabled="true"/>
|
<input type="submit" value="Mount" disabled="true"/>
|
||||||
|
|
@ -386,7 +391,7 @@
|
||||||
</form>
|
</form>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'led'">
|
<xsl:when test="@type = 'led'">
|
||||||
<div class="{$APPCLASS}-binding {$APPCLASS}-{@type}" data-value="{$type},{$binding}"><xsl:value-of select="."/></div>
|
<div class="{$APPCLASS}-binding {$APPCLASS}-{@type}" data-value="{{{$type},{$binding}}}"><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'separator'">
|
<xsl:when test="@type = 'separator'">
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
@ -398,7 +403,7 @@
|
||||||
<div style="clear:both"> </div>
|
<div style="clear:both"> </div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<div class="{$APPCLASS}-binding{$subClass} {$APPCLASS}-{@type}" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></div>
|
<div class="{$APPCLASS}-binding{$subClass} {$APPCLASS}-{@type}" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="@label">
|
<xsl:if test="@label">
|
||||||
|
|
@ -424,7 +429,7 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{@path}" data-value="{$desc}"><xsl:if test="name"><xsl:value-of select="name"/></xsl:if><xsl:if test="not(name)"><xsl:value-of select="."/></xsl:if></option>
|
<option value="{@path}" data-value="{{{$desc}}}"><xsl:if test="name"><xsl:value-of select="name"/></xsl:if><xsl:if test="not(name)"><xsl:value-of select="."/></xsl:if></option>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="app[@ref]" mode="component">
|
<xsl:template match="app[@ref]" mode="component">
|
||||||
|
|
@ -447,7 +452,7 @@
|
||||||
<xsl:variable name="files">
|
<xsl:variable name="files">
|
||||||
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$path"/></xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$path"/></xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{$files}" data-value="{$desc}"><xsl:value-of select="@name"/></option>
|
<option value="{$files}" data-value="{{{$desc}}}"><xsl:value-of select="@name"/></option>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="manifest[@ref]" mode="component">
|
<xsl:template match="manifest[@ref]" mode="component">
|
||||||
|
|
@ -485,7 +490,7 @@
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<!-- TODO: Think about incorporating the optional "desc" tag into the disk description (see /disks/pc/tools/microsoft/c/4.00/manifest.xml) -->
|
<!-- TODO: Think about incorporating the optional "desc" tag into the disk description (see /disks/pc/tools/microsoft/c/4.00/manifest.xml) -->
|
||||||
<xsl:if test="@href">
|
<xsl:if test="@href">
|
||||||
<option value="{@href}" data-value="{$link}"><xsl:value-of select="$name"/></option>
|
<option value="{@href}" data-value="{{{$link}}}"><xsl:value-of select="$name"/></option>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="not(@href)">
|
<xsl:if test="not(@href)">
|
||||||
<xsl:variable name="dir">
|
<xsl:variable name="dir">
|
||||||
|
|
@ -494,7 +499,7 @@
|
||||||
<xsl:variable name="files">
|
<xsl:variable name="files">
|
||||||
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$dir"/></xsl:if><xsl:value-of select="@dir"/><xsl:value-of select="."/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$dir"/></xsl:if><xsl:value-of select="@dir"/><xsl:value-of select="."/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{$files}" data-value="{$link}"><xsl:value-of select="$name"/></option>
|
<option value="{$files}" data-value="{{{$link}}}"><xsl:value-of select="$name"/></option>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
|
||||||
|
|
@ -456,7 +456,7 @@ Component.getComponentParms = function(element)
|
||||||
sParms = element.getAttribute("data-value");
|
sParms = element.getAttribute("data-value");
|
||||||
if (sParms) {
|
if (sParms) {
|
||||||
try {
|
try {
|
||||||
parms = eval("({" + sParms + "})"); // jshint ignore:line
|
parms = eval("(" + sParms + ")"); // jshint ignore:line
|
||||||
/*
|
/*
|
||||||
* We can no longer invoke removeAttribute() because some components (eg, Panel) need
|
* We can no longer invoke removeAttribute() because some components (eg, Panel) need
|
||||||
* to run their initXXX() code more than once, to avoid initialization-order dependencies.
|
* to run their initXXX() code more than once, to avoid initialization-order dependencies.
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ var cMachines = 0;
|
||||||
var fAsync = true;
|
var fAsync = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loadXML(sFile, idMachine, sStateFile, fResolve, display, done)
|
* loadXML(sFile, idMachine, sParms, fResolve, display, done)
|
||||||
*
|
*
|
||||||
* This is the preferred way to load all XML and XSL files. It uses loadResource()
|
* This is the preferred way to load all XML and XSL files. It uses loadResource()
|
||||||
* to load them as strings, which parseXML() can massage before parsing/transforming them.
|
* to load them as strings, which parseXML() can massage before parsing/transforming them.
|
||||||
|
|
@ -81,12 +81,12 @@ var fAsync = true;
|
||||||
*
|
*
|
||||||
* @param {string} sXMLFile
|
* @param {string} sXMLFile
|
||||||
* @param {string|null|undefined} idMachine
|
* @param {string|null|undefined} idMachine
|
||||||
* @param {string|null|undefined} sStateFile
|
* @param {string|null|undefined} sParms
|
||||||
* @param {boolean} fResolve is true to resolve any "ref" attributes
|
* @param {boolean} fResolve is true to resolve any "ref" attributes
|
||||||
* @param {function(string)} display
|
* @param {function(string)} display
|
||||||
* @param {function(string,Object)} done (string contains the unparsed XML string data, and Object contains a parsed XML object)
|
* @param {function(string,Object)} done (string contains the unparsed XML string data, and Object contains a parsed XML object)
|
||||||
*/
|
*/
|
||||||
function loadXML(sXMLFile, idMachine, sStateFile, fResolve, display, done)
|
function loadXML(sXMLFile, idMachine, sParms, fResolve, display, done)
|
||||||
{
|
{
|
||||||
var doneLoadXML = function(sURLName, sXML, nErrorCode) {
|
var doneLoadXML = function(sURLName, sXML, nErrorCode) {
|
||||||
if (nErrorCode) {
|
if (nErrorCode) {
|
||||||
|
|
@ -94,14 +94,14 @@ function loadXML(sXMLFile, idMachine, sStateFile, fResolve, display, done)
|
||||||
done(sXML, null);
|
done(sXML, null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
parseXML(sXML, sXMLFile, idMachine, sStateFile, fResolve, display, done);
|
parseXML(sXML, sXMLFile, idMachine, sParms, fResolve, display, done);
|
||||||
};
|
};
|
||||||
display("Loading " + sXMLFile + "...");
|
display("Loading " + sXMLFile + "...");
|
||||||
web.loadResource(sXMLFile, fAsync, null, null, doneLoadXML);
|
web.loadResource(sXMLFile, fAsync, null, null, doneLoadXML);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* parseXML(sXML, sXMLFile, idMachine, sStateFile, fResolve, display, done)
|
* parseXML(sXML, sXMLFile, idMachine, sParms, fResolve, display, done)
|
||||||
*
|
*
|
||||||
* Generates an XML document from an XML string. This function also provides a work-around for XSLT's
|
* Generates an XML document from an XML string. This function also provides a work-around for XSLT's
|
||||||
* lack of support for the document() function (at least on some browsers), by replacing every reference
|
* lack of support for the document() function (at least on some browsers), by replacing every reference
|
||||||
|
|
@ -110,12 +110,12 @@ function loadXML(sXMLFile, idMachine, sStateFile, fResolve, display, done)
|
||||||
* @param {string} sXML
|
* @param {string} sXML
|
||||||
* @param {string|null} sXMLFile
|
* @param {string|null} sXMLFile
|
||||||
* @param {string|null|undefined} idMachine
|
* @param {string|null|undefined} idMachine
|
||||||
* @param {string|null|undefined} sStateFile
|
* @param {string|null|undefined} sParms
|
||||||
* @param {boolean} fResolve is true to resolve any "ref" attributes; default is false
|
* @param {boolean} fResolve is true to resolve any "ref" attributes; default is false
|
||||||
* @param {function(string)} display
|
* @param {function(string)} display
|
||||||
* @param {function(string,Object)} done (string contains the unparsed XML string data, and Object contains a parsed XML object)
|
* @param {function(string,Object)} done (string contains the unparsed XML string data, and Object contains a parsed XML object)
|
||||||
*/
|
*/
|
||||||
function parseXML(sXML, sXMLFile, idMachine, sStateFile, fResolve, display, done)
|
function parseXML(sXML, sXMLFile, idMachine, sParms, fResolve, display, done)
|
||||||
{
|
{
|
||||||
var buildXML = function(sXML, sError) {
|
var buildXML = function(sXML, sError) {
|
||||||
if (sError) {
|
if (sError) {
|
||||||
|
|
@ -125,7 +125,20 @@ function parseXML(sXML, sXMLFile, idMachine, sStateFile, fResolve, display, done
|
||||||
if (idMachine) {
|
if (idMachine) {
|
||||||
var sURL = sXMLFile;
|
var sURL = sXMLFile;
|
||||||
if (sURL && sURL.indexOf('/') < 0) sURL = window.location.pathname + sURL;
|
if (sURL && sURL.indexOf('/') < 0) sURL = window.location.pathname + sURL;
|
||||||
sXML = sXML.replace(/(<machine[^>]*\sid=)(['"]).*?\2/, "$1$2" + idMachine + "$2" + (sStateFile? " state=$2" + sStateFile + "$2" : "") + (sURL? " url=$2" + sURL + "$2" : ""));
|
/*
|
||||||
|
* We embed the URL to the XML file both as a separate "xml" attribute for easy access from the
|
||||||
|
* XSL file and as part of the "parms" attribute for easy access from JavaScript.
|
||||||
|
*/
|
||||||
|
if (!sParms) {
|
||||||
|
sParms = '{';
|
||||||
|
} else if (sParms.substr(0, 1) == '{') {
|
||||||
|
sParms = sParms.slice(0, -1);
|
||||||
|
if (sParms.length > 1) sParms += ',';
|
||||||
|
} else { // backward compatibility: sParms is actually sStateFile
|
||||||
|
sParms = '{state:"' + sParms + '",';
|
||||||
|
}
|
||||||
|
sParms += 'url:"' + sURL + '"}';
|
||||||
|
sXML = sXML.replace(/(<machine[^>]*\sid=)(['"]).*?\2/, "$1$2" + idMachine + "$2" + (sParms? " parms='" + sParms + "'" : "") + (sURL? ' url="' + sURL + '"' : ''));
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Non-COMPILED kludge to replace the version number template in the XSL file (which we assume we're reading,
|
* Non-COMPILED kludge to replace the version number template in the XSL file (which we assume we're reading,
|
||||||
|
|
@ -281,7 +294,7 @@ function resolveXML(sXML, display, done)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sStateFile)
|
* embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sParms)
|
||||||
*
|
*
|
||||||
* This allows to you embed a machine on a web page, by transforming the machine XML into HTML.
|
* This allows to you embed a machine on a web page, by transforming the machine XML into HTML.
|
||||||
*
|
*
|
||||||
|
|
@ -290,10 +303,10 @@ function resolveXML(sXML, display, done)
|
||||||
* @param {string} idElement
|
* @param {string} idElement
|
||||||
* @param {string} sXMLFile
|
* @param {string} sXMLFile
|
||||||
* @param {string} sXSLFile
|
* @param {string} sXSLFile
|
||||||
* @param {string} [sStateFile]
|
* @param {string} [sParms]
|
||||||
* @return {boolean} true if successful, false if error
|
* @return {boolean} true if successful, false if error
|
||||||
*/
|
*/
|
||||||
function embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sStateFile)
|
function embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sParms)
|
||||||
{
|
{
|
||||||
var eMachine, eWarning, fSuccess = true;
|
var eMachine, eWarning, fSuccess = true;
|
||||||
|
|
||||||
|
|
@ -439,9 +452,9 @@ function embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sStateFile
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (sXMLFile.charAt(0) != '<') {
|
if (sXMLFile.charAt(0) != '<') {
|
||||||
loadXML(sXMLFile, idElement, sStateFile, true, displayMessage, loadXSL);
|
loadXML(sXMLFile, idElement, sParms, true, displayMessage, loadXSL);
|
||||||
} else {
|
} else {
|
||||||
parseXML(sXMLFile, null, idElement, sStateFile, false, displayMessage, loadXSL);
|
parseXML(sXMLFile, null, idElement, sParms, false, displayMessage, loadXSL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
displayError("missing machine element: " + idElement);
|
displayError("missing machine element: " + idElement);
|
||||||
|
|
@ -467,18 +480,18 @@ function embedC1P(idElement, sXMLFile, sXSLFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* embedPC(idElement, sXMLFile, sXSLFile, sStateFile)
|
* embedPC(idElement, sXMLFile, sXSLFile, sParms)
|
||||||
*
|
*
|
||||||
* @param {string} idElement
|
* @param {string} idElement
|
||||||
* @param {string} sXMLFile
|
* @param {string} sXMLFile
|
||||||
* @param {string} sXSLFile
|
* @param {string} sXSLFile
|
||||||
* @param {string} [sStateFile]
|
* @param {string} [sParms]
|
||||||
* @return {boolean} true if successful, false if error
|
* @return {boolean} true if successful, false if error
|
||||||
*/
|
*/
|
||||||
function embedPC(idElement, sXMLFile, sXSLFile, sStateFile)
|
function embedPC(idElement, sXMLFile, sXSLFile, sParms)
|
||||||
{
|
{
|
||||||
if (fAsync) web.enablePageEvents(false);
|
if (fAsync) web.enablePageEvents(false);
|
||||||
return embedMachine("PCjs", APPVERSION, idElement, sXMLFile, sXSLFile, sStateFile);
|
return embedMachine("PCjs", APPVERSION, idElement, sXMLFile, sXSLFile, sParms);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@ Browse our collection of PC-related magazines.
|
||||||
[<img src="http://archive.pcjs.org/pubs/pc/magazines/msj/MSJ-1986-10/thumbs/MSJ-1986-10 1.jpeg" width="200" height="260" alt= "Microsoft Systems Journal"/>](msj/)
|
[<img src="http://archive.pcjs.org/pubs/pc/magazines/msj/MSJ-1986-10/thumbs/MSJ-1986-10 1.jpeg" width="200" height="260" alt= "Microsoft Systems Journal"/>](msj/)
|
||||||
[<img src="http://archive.pcjs.org/pubs/pc/magazines/pctj/PCTJ-1983-07/thumbs/PCTJ-1983-07 1.jpeg" width="200" height="260" alt= "PC Tech Journal"/>](pctj/)
|
[<img src="http://archive.pcjs.org/pubs/pc/magazines/pctj/PCTJ-1983-07/thumbs/PCTJ-1983-07 1.jpeg" width="200" height="260" alt= "PC Tech Journal"/>](pctj/)
|
||||||
|
|
||||||
We also have an assortment of selected articles:
|
From [PC Tech Journal](/pubs/pc/magazines/pctj/), we also have all the [Microsoft Languages NewsLetters](/disks/pc/tools/microsoft/).
|
||||||
|
|
||||||
|
And we have an assortment of selected articles:
|
||||||
|
|
||||||
- [Exploring the EGA](http://archive.pcjs.org/pubs/pc/magazines/pcmag/PCMAG-1986-08/PCMAG-1986-08-Exploring_The_EGA.pdf) by Charles Petzold, PC Magazine, August 1986
|
- [Exploring the EGA](http://archive.pcjs.org/pubs/pc/magazines/pcmag/PCMAG-1986-08/PCMAG-1986-08-Exploring_The_EGA.pdf) by Charles Petzold, PC Magazine, August 1986
|
||||||
- [Software Sprites](http://archive.pcjs.org/pubs/pc/magazines/pctj/PCTJ-1986-08/PCTJ-1986-08-Software_Sprites.pdf) by Michael Abrash and Dan Illowsky, PC Tech Journal, August, 1986
|
- [Software Sprites](http://archive.pcjs.org/pubs/pc/magazines/pctj/PCTJ-1986-08/PCTJ-1986-08-Software_Sprites.pdf) by Michael Abrash and Dan Illowsky, PC Tech Journal, August, 1986
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ function da(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=nu
|
||||||
function ha(a){if(fa)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){v("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function z(a){!fa&&a?(fa=!0,ea&&ia("init")):fa=a}function ia(a){x[a]&&ha(x[a])}ga("onload",function(){ea=!0;ha(x.init)});ga("onpageshow",function(){ha(x.show)});ga(w("Opera")||w("iOS")?"onunload":"onbeforeunload",function(){ha(x.exit)});
|
function ha(a){if(fa)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){v("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function z(a){!fa&&a?(fa=!0,ea&&ia("init")):fa=a}function ia(a){x[a]&&ha(x[a])}ga("onload",function(){ea=!0;ha(x.init)});ga("onpageshow",function(){ha(x.show)});ga(w("Opera")||w("iOS")?"onunload":"onbeforeunload",function(){ha(x.exit)});
|
||||||
function A(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.rb=this.id.substr(0,b),this.qb=this.id.substr(b+1)):this.qb=this.id;this[a]=c;this.C={Za:!1,Ba:!1,jb:!1,M:!1,Ca:!1};this.cb=null;this.C.Ca=!1;this.H={};this.u=null;this.la=d||0;B[B.length]=this}var ja=void 0;
|
function A(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.rb=this.id.substr(0,b),this.qb=this.id.substr(b+1)):this.qb=this.id;this[a]=c;this.C={Za:!1,Ba:!1,jb:!1,M:!1,Ca:!1};this.cb=null;this.C.Ca=!1;this.H={};this.u=null;this.la=d||0;B[B.length]=this}var ja=void 0;
|
||||||
if(window){ja||(ja=window.location.search.substr(1));for(var ka,la=/\+/g,ma=/([^&=]+)=?([^&]*)/g;ka=ma.exec(ja);)ka[1].replace(la," "),ka[2].replace(la," ")}function na(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function C(a){var b;b||(b=A);a.prototype=na(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var B=[];
|
if(window){ja||(ja=window.location.search.substr(1));for(var ka,la=/\+/g,ma=/([^&=]+)=?([^&]*)/g;ka=ma.exec(ja);)ka[1].replace(la," "),ka[2].replace(la," ")}function na(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function C(a){var b;b||(b=A);a.prototype=na(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var B=[];
|
||||||
function oa(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<B.length;c++)if(B[c].id===a)return B[c]}return null}function D(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){v(c.message+" ("+a+")")}return b}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);
|
function oa(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<B.length;c++)if(B[c].id===a)return B[c]}return null}function D(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){v(c.message+" ("+a+")")}return b}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);
|
||||||
function E(a,b){for(var c=F(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var e=c[d].childNodes,g=0;g<e.length;g++){var h=e[g];if(h.nodeType===window.document.ELEMENT_NODE){var k=h.getAttribute("class");if(k)for(var l=k.split(" "),m=0;m<l.length;m++)switch(k=l[m],k){case "c1pjs-binding":(k=D(h))&&k.binding&&a.T(k.type,k.binding,h),m=l.length}}}}
|
function E(a,b){for(var c=F(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var e=c[d].childNodes,g=0;g<e.length;g++){var h=e[g];if(h.nodeType===window.document.ELEMENT_NODE){var k=h.getAttribute("class");if(k)for(var l=k.split(" "),m=0;m<l.length;m++)switch(k=l[m],k){case "c1pjs-binding":(k=D(h))&&k.binding&&a.T(k.type,k.binding,h),m=l.length}}}}
|
||||||
function F(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
function F(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
A.prototype={constructor:A,parent:null,toString:function(){return this.name?this.name:this.id||this.type},T:function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.gb=this.H[b]=c,c.value="",this.l=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
A.prototype={constructor:A,parent:null,toString:function(){return this.name?this.name:this.id||this.type},T:function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.gb=this.H[b]=c,c.value="",this.l=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||||
|
|
@ -156,8 +156,8 @@ Z.prototype.start=function(){for(var a in this.Y)if("cpu"!=a)for(var b=0;b<this.
|
||||||
function qb(a){var b=null,c;for(c in a.Y)for(var d=0;d<a.Y[c].length;d++){var e=a.Y[c][d];if(e){if(!K(e)){K(e,function(a){return function(){qb(a)}}(a));return}"cpu"==c?b=e:e.ha&&e.ha(!0,a)}}a.X();a.l("C1Pjs v1.20.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>");b&&b.ha(!0,a)}
|
function qb(a){var b=null,c;for(c in a.Y)for(var d=0;d<a.Y[c].length;d++){var e=a.Y[c][d];if(e){if(!K(e)){K(e,function(a){return function(){qb(a)}}(a));return}"cpu"==c?b=e:e.ha&&e.ha(!0,a)}}a.X();a.l("C1Pjs v1.20.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>");b&&b.ha(!0,a)}
|
||||||
y(function(){for(var a=F(window.document,"c1pjs","computer"),b=0;b<a.length;b++){for(var c=a[b],d=D(c),e,g={},h,k=0,l=0,m=0;m<d.modules.length;m++){var r=d.modules[m];if(!m){if("cpu"!=r.type)break;k=r.start;l=r.end;h=Array(l+1-k);for(e=k;e<h.length;e++)h[e]=0}if(e=oa(r.refID,d.id)){var I=r.type;void 0===g[I]&&(g[I]=[]);g[I].push(e);e.ba&&void 0!==r.start&&e.ba(h,r.start,r.end,g.cpu[0])}else{v('no component for <module refid="'+r.refID+'">');return}}if(void 0===h){v('<module type="cpu"> definition must appear first in the <computer> specification');
|
y(function(){for(var a=F(window.document,"c1pjs","computer"),b=0;b<a.length;b++){for(var c=a[b],d=D(c),e,g={},h,k=0,l=0,m=0;m<d.modules.length;m++){var r=d.modules[m];if(!m){if("cpu"!=r.type)break;k=r.start;l=r.end;h=Array(l+1-k);for(e=k;e<h.length;e++)h[e]=0}if(e=oa(r.refID,d.id)){var I=r.type;void 0===g[I]&&(g[I]=[]);g[I].push(e);e.ba&&void 0!==r.start&&e.ba(h,r.start,r.end,g.cpu[0])}else{v('no component for <module refid="'+r.refID+'">');return}}if(void 0===h){v('<module type="cpu"> definition must appear first in the <computer> specification');
|
||||||
break}if(e=oa("debugger",d.id))g["debugger"]=[e],e.ba&&e.ba(h,k,l,g.cpu[0]);k=new Z(d,g);if(l=oa("panel",d.id))if(g.panel=[l],l.gb){e=d.id;d=void 0;g=[];e&&(e=0<(d=e.indexOf("."))?e.substr(0,d+1):"");for(d=0;d<B.length;d++)m=B[d],e&&m.id.indexOf(e)||g.push(m);d=g;for(g=0;g<d.length;g++)e=d[g],e!=l&&(e.$a=l.$a,e.l=l.l,e.gb=l.gb)}E(k,c);qb(k)}});var rb=0;function sb(a,b,c,d,e,g){e("Loading "+a+"...");u(a,null,function(h,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),g(k,null)):tb(k,a,b,c,d,e,g)})}
|
break}if(e=oa("debugger",d.id))g["debugger"]=[e],e.ba&&e.ba(h,k,l,g.cpu[0]);k=new Z(d,g);if(l=oa("panel",d.id))if(g.panel=[l],l.gb){e=d.id;d=void 0;g=[];e&&(e=0<(d=e.indexOf("."))?e.substr(0,d+1):"");for(d=0;d<B.length;d++)m=B[d],e&&m.id.indexOf(e)||g.push(m);d=g;for(g=0;g<d.length;g++)e=d[g],e!=l&&(e.$a=l.$a,e.l=l.l,e.gb=l.gb)}E(k,c);qb(k)}});var rb=0;function sb(a,b,c,d,e,g){e("Loading "+a+"...");u(a,null,function(h,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),g(k,null)):tb(k,a,b,c,d,e,g)})}
|
||||||
function tb(a,b,c,d,e,g,h){function k(a,g){if(g)h(g,null);else{if(c){var k=b;k&&0>k.indexOf("/")&&(k=window.location.pathname+k);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" state=$2"+d+"$2":"")+(k?" url=$2"+k+"$2":""))}k=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(k=new window.ActiveXObject("Microsoft.XMLDOM"),k.async=!1,k.loadXML(a)):k=(new window.DOMParser).parseFromString(a,"text/xml")}catch(I){k=
|
function tb(a,b,c,d,e,g,h){function k(a,g){if(g)h(g,null);else{if(c){var k=b;k&&0>k.indexOf("/")&&(k=window.location.pathname+k);d?"{"==d.substr(0,1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{";d+='url:"'+k+'"}';a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(k?' url="'+k+'"':""))}k=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(k=new window.ActiveXObject("Microsoft.XMLDOM"),
|
||||||
null,a=I.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);h(a,k)}}a?e?ub(a,g,k):k(a,null):h("no data"+(b?" for file: "+b:""),null)}
|
k.async=!1,k.loadXML(a)):k=(new window.DOMParser).parseFromString(a,"text/xml")}catch(I){k=null,a=I.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);h(a,k)}}a?e?ub(a,g,k):k(a,null):h("no data"+(b?" for file: "+b:""),null)}
|
||||||
function ub(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");u(e,null,function(g,h,k){if(k||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(g=d[3])if(k=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,r=/( [a-z]+=)(['"])(.*?)\2/g;m=r.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(h=h.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/,
|
function ub(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");u(e,null,function(g,h,k){if(k||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(g=d[3])if(k=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,r=/( [a-z]+=)(['"])(.*?)\2/g;m=r.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(h=h.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||||
"");a=a.replace(d[0],h);ub(a,b,c)}})}else c(a,null)}
|
"");a=a.replace(d[0],h);ub(a,b,c)}})}else c(a,null)}
|
||||||
function vb(a,b,c){function d(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ba(a))}function e(a){d("Error: "+a);k&&(--rb||z(!0));k=!1}var g,h,k=!0;rb++;try{if(g=window.document.getElementById(a)){c||(c="/versions/c1pjs/1.20.4/components.xsl");var l=function(h,k){if(k){var l=function(h,l){if(l)if(l)if(d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=k.transformNode(l);m?(g.outerHTML=m,--rb||z(!0)):e("transformNodeToObject failed")}else window.document.implementation&&
|
function vb(a,b,c){function d(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ba(a))}function e(a){d("Error: "+a);k&&(--rb||z(!0));k=!1}var g,h,k=!0;rb++;try{if(g=window.document.getElementById(a)){c||(c="/versions/c1pjs/1.20.4/components.xsl");var l=function(h,k){if(k){var l=function(h,l){if(l)if(l)if(d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=k.transformNode(l);m?(g.outerHTML=m,--rb||z(!0)):e("transformNodeToObject failed")}else window.document.implementation&&
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ function t(a){window&&window.alert(a)}function u(a){if(window){var b=window?wind
|
||||||
function z(a){if(w)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){t("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function A(a){!w&&a?(w=!0,ca&&da("init")):w=a}function da(a){v[a]&&z(v[a])}x("onload",function(){ca=!0;z(v.init)});x("onpageshow",function(){z(v.show)});x(u("Opera")||u("iOS")?"onunload":"onbeforeunload",function(){z(v.exit)});
|
function z(a){if(w)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){t("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function A(a){!w&&a?(w=!0,ca&&da("init")):w=a}function da(a){v[a]&&z(v[a])}x("onload",function(){ca=!0;z(v.init)});x("onpageshow",function(){z(v.show)});x(u("Opera")||u("iOS")?"onunload":"onbeforeunload",function(){z(v.exit)});
|
||||||
function B(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.Da=this.id.substr(0,b),this.Ca=this.id.substr(b+1)):this.Ca=this.id;this[a]=c;this.u={va:!1,pa:!1,Aa:!1,H:!1,qa:!1};this.xa=null;this.u.qa=!1;this.A={};C[C.length]=this}var ea=void 0;if(window){ea||(ea=window.location.search.substr(1));for(var fa,ga=/\+/g,ha=/([^&=]+)=?([^&]*)/g;fa=ha.exec(ea);)fa[1].replace(ga," "),fa[2].replace(ga," ")}
|
function B(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.Da=this.id.substr(0,b),this.Ca=this.id.substr(b+1)):this.Ca=this.id;this[a]=c;this.u={va:!1,pa:!1,Aa:!1,H:!1,qa:!1};this.xa=null;this.u.qa=!1;this.A={};C[C.length]=this}var ea=void 0;if(window){ea||(ea=window.location.search.substr(1));for(var fa,ga=/\+/g,ha=/([^&=]+)=?([^&]*)/g;fa=ha.exec(ea);)fa[1].replace(ga," "),fa[2].replace(ga," ")}
|
||||||
function ia(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function E(a){var b;b||(b=B);a.prototype=ia(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var C=[];function F(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<C.length;c++)if(C[c].id===a)return C[c]}return null}
|
function ia(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function E(a){var b;b||(b=B);a.prototype=ia(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var C=[];function F(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<C.length;c++)if(C[c].id===a)return C[c]}return null}
|
||||||
function G(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){t(c.message+" ("+a+")")}return b}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);
|
function G(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){t(c.message+" ("+a+")")}return b}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);
|
||||||
function H(a,b){for(var c=I(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var f=c[d].childNodes,g=0;g<f.length;g++){var k=f[g];if(k.nodeType===window.document.ELEMENT_NODE){var h=k.getAttribute("class");if(h)for(var l=h.split(" "),m=0;m<l.length;m++)switch(h=l[m],h){case "c1pjs-binding":(h=G(k))&&h.binding&&a.J(h.type,h.binding,k),m=l.length}}}}
|
function H(a,b){for(var c=I(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var f=c[d].childNodes,g=0;g<f.length;g++){var k=f[g];if(k.nodeType===window.document.ELEMENT_NODE){var h=k.getAttribute("class");if(h)for(var l=h.split(" "),m=0;m<l.length;m++)switch(h=l[m],h){case "c1pjs-binding":(h=G(k))&&h.binding&&a.J(h.type,h.binding,k),m=l.length}}}}
|
||||||
function I(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var f=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)f.test(a[b].className)&&c.push(a[b]);return c}
|
function I(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var f=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)f.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
B.prototype={constructor:B,parent:null,toString:function(){return this.name?this.name:this.id||this.type},J:function(a,b,c){switch(b){case "clear":return this.A[b]||(this.A[b]=c,c.onclick=function(a){return function(){a.A.print&&(a.A.print.value="")}}(this)),!0;case "print":return this.A[b]||(this.ya=this.A[b]=c,c.value="",this.F=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
B.prototype={constructor:B,parent:null,toString:function(){return this.name?this.name:this.id||this.type},J:function(a,b,c){switch(b){case "clear":return this.A[b]||(this.A[b]=c,c.onclick=function(a){return function(){a.A.print&&(a.A.print.value="")}}(this)),!0;case "print":return this.A[b]||(this.ya=this.A[b]=c,c.value="",this.F=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||||
|
|
@ -117,8 +117,8 @@ Y.prototype.reset=function(a){var b=null,c;for(c in this.M)for(var d=0;d<this.M[
|
||||||
Y.prototype.J=function(a,b,c){switch(b){case "reset":return this.A[b]=c,c.onclick=function(a){return function(){a.reset()}}(this),!0}return!1};function L(a,b){return a.M[b]?a.M[b][0]:null}function Ta(a){var b=null,c;for(c in a.M)for(var d=0;d<a.M[c].length;d++){var f=a.M[c][d];if(f){if(!J(f)){J(f,function(a){return function(){Ta(a)}}(a));return}"cpu"==c?b=f:f.$&&f.$(!0,a)}}a.N();a.F("C1Pjs v1.20.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>");b&&b.$(!0,a)}
|
Y.prototype.J=function(a,b,c){switch(b){case "reset":return this.A[b]=c,c.onclick=function(a){return function(){a.reset()}}(this),!0}return!1};function L(a,b){return a.M[b]?a.M[b][0]:null}function Ta(a){var b=null,c;for(c in a.M)for(var d=0;d<a.M[c].length;d++){var f=a.M[c][d];if(f){if(!J(f)){J(f,function(a){return function(){Ta(a)}}(a));return}"cpu"==c?b=f:f.$&&f.$(!0,a)}}a.N();a.F("C1Pjs v1.20.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>");b&&b.$(!0,a)}
|
||||||
y(function(){for(var a=I(window.document,"c1pjs","computer"),b=0;b<a.length;b++){for(var c=a[b],d=G(c),f,g={},k,h=0,l=0,m=0;m<d.modules.length;m++){var p=d.modules[m];if(!m){if("cpu"!=p.type)break;h=p.start;l=p.end;k=Array(l+1-h);for(f=h;f<k.length;f++)k[f]=0}if(f=F(p.refID,d.id)){var D=p.type;void 0===g[D]&&(g[D]=[]);g[D].push(f);f.X&&void 0!==p.start&&f.X(k,p.start,p.end,g.cpu[0])}else{t('no component for <module refid="'+p.refID+'">');return}}if(void 0===k){t('<module type="cpu"> definition must appear first in the <computer> specification');
|
y(function(){for(var a=I(window.document,"c1pjs","computer"),b=0;b<a.length;b++){for(var c=a[b],d=G(c),f,g={},k,h=0,l=0,m=0;m<d.modules.length;m++){var p=d.modules[m];if(!m){if("cpu"!=p.type)break;h=p.start;l=p.end;k=Array(l+1-h);for(f=h;f<k.length;f++)k[f]=0}if(f=F(p.refID,d.id)){var D=p.type;void 0===g[D]&&(g[D]=[]);g[D].push(f);f.X&&void 0!==p.start&&f.X(k,p.start,p.end,g.cpu[0])}else{t('no component for <module refid="'+p.refID+'">');return}}if(void 0===k){t('<module type="cpu"> definition must appear first in the <computer> specification');
|
||||||
break}if(f=F("debugger",d.id))g["debugger"]=[f],f.X&&f.X(k,h,l,g.cpu[0]);h=new Y(d,g);if(l=F("panel",d.id))if(g.panel=[l],l.ya){f=d.id;d=void 0;g=[];f&&(f=0<(d=f.indexOf("."))?f.substr(0,d+1):"");for(d=0;d<C.length;d++)m=C[d],f&&m.id.indexOf(f)||g.push(m);d=g;for(g=0;g<d.length;g++)f=d[g],f!=l&&(f.wa=l.wa,f.F=l.F,f.ya=l.ya)}H(h,c);Ta(h)}});var Z=0;function Ua(a,b,c,d,f,g){f("Loading "+a+"...");r(a,null,function(k,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),g(h,null)):Va(h,a,b,c,d,f,g)})}
|
break}if(f=F("debugger",d.id))g["debugger"]=[f],f.X&&f.X(k,h,l,g.cpu[0]);h=new Y(d,g);if(l=F("panel",d.id))if(g.panel=[l],l.ya){f=d.id;d=void 0;g=[];f&&(f=0<(d=f.indexOf("."))?f.substr(0,d+1):"");for(d=0;d<C.length;d++)m=C[d],f&&m.id.indexOf(f)||g.push(m);d=g;for(g=0;g<d.length;g++)f=d[g],f!=l&&(f.wa=l.wa,f.F=l.F,f.ya=l.ya)}H(h,c);Ta(h)}});var Z=0;function Ua(a,b,c,d,f,g){f("Loading "+a+"...");r(a,null,function(k,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),g(h,null)):Va(h,a,b,c,d,f,g)})}
|
||||||
function Va(a,b,c,d,f,g,k){function h(a,g){if(g)k(g,null);else{if(c){var h=b;h&&0>h.indexOf("/")&&(h=window.location.pathname+h);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" state=$2"+d+"$2":"")+(h?" url=$2"+h+"$2":""))}h=null;if("<"==a.charAt(0))try{f||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(D){h=
|
function Va(a,b,c,d,f,g,k){function h(a,g){if(g)k(g,null);else{if(c){var h=b;h&&0>h.indexOf("/")&&(h=window.location.pathname+h);d?"{"==d.substr(0,1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{";d+='url:"'+h+'"}';a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}h=null;if("<"==a.charAt(0))try{f||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),
|
||||||
null,a=D.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);k(a,h)}}a?f?Wa(a,g,h):h(a,null):k("no data"+(b?" for file: "+b:""),null)}
|
h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(D){h=null,a=D.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);k(a,h)}}a?f?Wa(a,g,h):h(a,null):k("no data"+(b?" for file: "+b:""),null)}
|
||||||
function Wa(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var f=d[2];b("Loading "+f+"...");r(f,null,function(g,k,h){if(h||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(g=d[3])if(h=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(k=k.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+f);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/,
|
function Wa(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var f=d[2];b("Loading "+f+"...");r(f,null,function(g,k,h){if(h||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(g=d[3])if(h=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(k=k.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+f);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||||
"");a=a.replace(d[0],k);Wa(a,b,c)}})}else c(a,null)}
|
"");a=a.replace(d[0],k);Wa(a,b,c)}})}else c(a,null)}
|
||||||
function Xa(a,b,c){function d(a){if(void 0===k){var b=g&&I(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=ba(a))}function f(a){d("Error: "+a);h&&(--Z||A(!0));h=!1}var g,k,h=!0;Z++;try{if(g=window.document.getElementById(a)){c||(c="/versions/c1pjs/1.20.4/components.xsl");var l=function(h,k){if(k){var l=function(h,l){if(l)if(l)if(d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=k.transformNode(l);m?(g.outerHTML=m,--Z||A(!0)):f("transformNodeToObject failed")}else window.document.implementation&&
|
function Xa(a,b,c){function d(a){if(void 0===k){var b=g&&I(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=ba(a))}function f(a){d("Error: "+a);h&&(--Z||A(!0));h=!1}var g,k,h=!0;Z++;try{if(g=window.document.getElementById(a)){c||(c="/versions/c1pjs/1.20.4/components.xsl");var l=function(h,k){if(k){var l=function(h,l){if(l)if(l)if(d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=k.transformNode(l);m?(g.outerHTML=m,--Z||A(!0)):f("transformNodeToObject failed")}else window.document.implementation&&
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<div class="{$APPCLASS}-container" style="{$border}{$style}">
|
<div class="{$APPCLASS}-container" style="{$border}{$style}">
|
||||||
<xsl:if test="$class != '' and $component != 'machine'">
|
<xsl:if test="$class != '' and $component != 'machine'">
|
||||||
<div class="{$APPCLASS}-{$class}-object" data-value="id:'{$id}',name:'{$name}'{$parms}"></div>
|
<div class="{$APPCLASS}-{$class}-object" data-value="{{id:'{$id}',name:'{$name}'{$parms}}}"></div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="control">
|
<xsl:if test="control">
|
||||||
<div class="{$APPCLASS}-controls">
|
<div class="{$APPCLASS}-controls">
|
||||||
|
|
@ -269,27 +269,27 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@type = 'button'">
|
<xsl:when test="@type = 'button'">
|
||||||
<button class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></button>
|
<button class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></button>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'list'">
|
<xsl:when test="@type = 'list'">
|
||||||
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}">
|
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}">
|
||||||
<xsl:apply-templates select="item" mode="component"/>
|
<xsl:apply-templates select="item" mode="component"/>
|
||||||
</select>
|
</select>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'text'">
|
<xsl:when test="@type = 'text'">
|
||||||
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" value="" autocapitalize="off" autocorrect="off"/>
|
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" value="" autocapitalize="off" autocorrect="off"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'submit'">
|
<xsl:when test="@type = 'submit'">
|
||||||
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{$type},{$binding}" value="{.}"/>
|
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}" value="{.}"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'textarea'">
|
<xsl:when test="@type = 'textarea'">
|
||||||
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" readonly="readonly"></textarea>
|
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" readonly="readonly"></textarea>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'heading'">
|
<xsl:when test="@type = 'heading'">
|
||||||
<div><xsl:value-of select="."/></div>
|
<div><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'file'">
|
<xsl:when test="@type = 'file'">
|
||||||
<form class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}">
|
<form class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}">
|
||||||
<fieldset class="{$APPCLASS}-fieldset">
|
<fieldset class="{$APPCLASS}-fieldset">
|
||||||
<input type="file"/>
|
<input type="file"/>
|
||||||
<input type="submit" value="Mount" disabled="true"/>
|
<input type="submit" value="Mount" disabled="true"/>
|
||||||
|
|
@ -303,7 +303,7 @@
|
||||||
<div style="clear:both"></div><br/>
|
<div style="clear:both"></div><br/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<div class="{$APPCLASS}-binding{$subclass}" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></div>
|
<div class="{$APPCLASS}-binding{$subclass}" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="@label">
|
<xsl:if test="@label">
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,12 @@
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
<xsl:with-param name="component" select="'machine'"/>
|
<xsl:with-param name="component" select="'machine'"/>
|
||||||
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
|
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
|
||||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
<xsl:with-param name="parms">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$machineState != ''">state:"<xsl:value-of select="$machineState"/>"</xsl:when>
|
||||||
|
<xsl:otherwise><xsl:value-of select="@parms"/></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:with-param>
|
||||||
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
|
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -107,9 +112,9 @@
|
||||||
<xsl:otherwise><xsl:value-of select="$component"/></xsl:otherwise>
|
<xsl:otherwise><xsl:value-of select="$component"/></xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="componentURL">
|
<xsl:variable name="machineParms">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$component = 'machine'">url:'<xsl:value-of select="$url"/>'</xsl:when>
|
<xsl:when test="$component = 'machine'"><xsl:value-of select="$parms"/></xsl:when>
|
||||||
<xsl:otherwise/>
|
<xsl:otherwise/>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
@ -191,7 +196,7 @@
|
||||||
<xsl:variable name="componentClass">
|
<xsl:variable name="componentClass">
|
||||||
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
|
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}" data-value="{$componentURL}">
|
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}" data-value="{$machineParms}">
|
||||||
<xsl:if test="$component = 'machine'">
|
<xsl:if test="$component = 'machine'">
|
||||||
<xsl:apply-templates select="name" mode="machine"/>
|
<xsl:apply-templates select="name" mode="machine"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
@ -206,7 +211,7 @@
|
||||||
<xsl:apply-templates select="menu" mode="component"/>
|
<xsl:apply-templates select="menu" mode="component"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="$class != '' and $component != 'machine'">
|
<xsl:if test="$class != '' and $component != 'machine'">
|
||||||
<div class="{$APPCLASS}-{$class}-object" data-value="id:'{$id}',name:'{$name}'{$comment}{$parms}"> </div>
|
<div class="{$APPCLASS}-{$class}-object" data-value="{{id:'{$id}',name:'{$name}'{$comment}{$parms}}}"> </div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="control">
|
<xsl:if test="control">
|
||||||
<div class="{$APPCLASS}-controls">
|
<div class="{$APPCLASS}-controls">
|
||||||
|
|
@ -354,30 +359,30 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@type = 'canvas'">
|
<xsl:when test="@type = 'canvas'">
|
||||||
<canvas class="{$APPCLASS}-binding {$APPCLASS}-canvas" width="{@width}" height="{@height}" style="-webkit-user-select:none;{$border}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></canvas>
|
<canvas class="{$APPCLASS}-binding {$APPCLASS}-canvas" width="{@width}" height="{@height}" style="-webkit-user-select:none;{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></canvas>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'button'">
|
<xsl:when test="@type = 'button'">
|
||||||
<button class="{$APPCLASS}-binding" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></button>
|
<button class="{$APPCLASS}-binding" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></button>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'list'">
|
<xsl:when test="@type = 'list'">
|
||||||
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}">
|
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}">
|
||||||
<xsl:apply-templates select="disk|app|manifest" mode="component"/>
|
<xsl:apply-templates select="disk|app|manifest" mode="component"/>
|
||||||
</select>
|
</select>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'text'">
|
<xsl:when test="@type = 'text'">
|
||||||
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" value="{.}" autocapitalize="off" autocorrect="off"/>
|
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" value="{.}" autocapitalize="off" autocorrect="off"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'submit'">
|
<xsl:when test="@type = 'submit'">
|
||||||
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{$type},{$binding}" value="{.}"/>
|
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}" value="{.}"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'textarea'">
|
<xsl:when test="@type = 'textarea'">
|
||||||
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" readonly="readonly"> </textarea>
|
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" readonly="readonly"> </textarea>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'heading'">
|
<xsl:when test="@type = 'heading'">
|
||||||
<div><xsl:value-of select="."/></div>
|
<div><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'file'">
|
<xsl:when test="@type = 'file'">
|
||||||
<form class="{$APPCLASS}-binding" data-value="{$type},{$binding}">
|
<form class="{$APPCLASS}-binding" data-value="{{{$type},{$binding}}}">
|
||||||
<fieldset class="{$APPCLASS}-fieldset">
|
<fieldset class="{$APPCLASS}-fieldset">
|
||||||
<input type="file"/>
|
<input type="file"/>
|
||||||
<input type="submit" value="Mount" disabled="true"/>
|
<input type="submit" value="Mount" disabled="true"/>
|
||||||
|
|
@ -385,7 +390,7 @@
|
||||||
</form>
|
</form>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'led'">
|
<xsl:when test="@type = 'led'">
|
||||||
<div class="{$APPCLASS}-binding {$APPCLASS}-{@type}" data-value="{$type},{$binding}"><xsl:value-of select="."/></div>
|
<div class="{$APPCLASS}-binding {$APPCLASS}-{@type}" data-value="{{{$type},{$binding}}}"><xsl:value-of select="."/></div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'separator'">
|
<xsl:when test="@type = 'separator'">
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
@ -397,7 +402,7 @@
|
||||||
<div style="clear:both"> </div>
|
<div style="clear:both"> </div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<div class="{$APPCLASS}-binding{$subClass} {$APPCLASS}-{@type}" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></div>
|
<div class="{$APPCLASS}-binding{$subClass} {$APPCLASS}-{@type}" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="@label">
|
<xsl:if test="@label">
|
||||||
|
|
@ -423,7 +428,7 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{@path}" data-value="{$desc}"><xsl:if test="name"><xsl:value-of select="name"/></xsl:if><xsl:if test="not(name)"><xsl:value-of select="."/></xsl:if></option>
|
<option value="{@path}" data-value="{{{$desc}}}"><xsl:if test="name"><xsl:value-of select="name"/></xsl:if><xsl:if test="not(name)"><xsl:value-of select="."/></xsl:if></option>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="app[@ref]" mode="component">
|
<xsl:template match="app[@ref]" mode="component">
|
||||||
|
|
@ -446,7 +451,7 @@
|
||||||
<xsl:variable name="files">
|
<xsl:variable name="files">
|
||||||
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$path"/></xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$path"/></xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{$files}" data-value="{$desc}"><xsl:value-of select="@name"/></option>
|
<option value="{$files}" data-value="{{{$desc}}}"><xsl:value-of select="@name"/></option>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="manifest[@ref]" mode="component">
|
<xsl:template match="manifest[@ref]" mode="component">
|
||||||
|
|
@ -483,7 +488,7 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:if test="@href">
|
<xsl:if test="@href">
|
||||||
<option value="{@href}" data-value="{$link}"><xsl:value-of select="$name"/></option>
|
<option value="{@href}" data-value="{{{$link}}}"><xsl:value-of select="$name"/></option>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="not(@href)">
|
<xsl:if test="not(@href)">
|
||||||
<xsl:variable name="dir">
|
<xsl:variable name="dir">
|
||||||
|
|
@ -492,7 +497,7 @@
|
||||||
<xsl:variable name="files">
|
<xsl:variable name="files">
|
||||||
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$dir"/></xsl:if><xsl:value-of select="@dir"/><xsl:value-of select="."/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$dir"/></xsl:if><xsl:value-of select="@dir"/><xsl:value-of select="."/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<option value="{$files}" data-value="{$link}"><xsl:value-of select="$name"/></option>
|
<option value="{$files}" data-value="{{{$link}}}"><xsl:value-of select="$name"/></option>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue