-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
162 lines (161 loc) · 9.22 KB
/
index.html
File metadata and controls
162 lines (161 loc) · 9.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en"><head>
<title>NetworkCabinetSimulator</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="VisualParser.js"></script>
<script type="text/javascript" src="ItemClasses.js"></script>
<script type="text/javascript" src="ItemClasses/VisualMap.js"></script>
<script type="text/javascript" src="ItemClasses/VisualLocation.js"></script>
<script type="text/javascript" src="ItemClasses/VisualCable.js"></script>
<script type="text/javascript" src="ItemClasses/VisualRack.js"></script>
<script type="text/javascript" src="ItemClasses/VisualFrame.js"></script>
<script type="text/javascript" src="ItemClasses/VisualSocket.js"></script>
<script type="text/javascript" src="ItemClasses/VisualLineMap.js"></script>
<script type="text/javascript" src="ItemClasses/VisualLine.js"></script>
<script type="text/javascript" src="ItemClasses/VisualPatch.js"></script>
<script type="text/javascript" src="ItemClasses/VisualInventory.js"></script>
<script type="text/javascript" src="ItemClasses/VisualFrameTemplate.js"></script>
<script type="text/javascript" src="ItemClasses/VisualConnectorBank.js"></script>
<script type="text/javascript" src="ItemClasses/VisualConnectorTemplate.js"></script>
<script type="text/javascript" src="ItemClasses/VisualRenderer.js"></script>
<script type="text/javascript" src="ItemRenderer.js"></script>
<script type="text/javascript" src="hwparser.js"></script>
<script type="text/javascript" src="routeparser.js"></script>
<script type="text/javascript" src="invparser.js"></script>
<script type="text/javascript" src="VisualEditor.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="init.js"></script>
<link rel="stylesheet" href="main.css" />
</head><body>
<template id="tree_item_tpl">
<li class="tree_item">
<input type="checkbox" class="treetoggle" checked />
<span class="tree_item_name"><span class="tool_buttons"></span></span>
</li>
</template>
<template id="item_propsheet">
<div class="infoblock">
<span class="item_badge" ></span>
<input class="item_title" readonly/><br />
<span>ID: <code id="item_id"></code> </span><button id="id_button">Change...</button>
<div class="item_properties"></div>
</div>
</template>
<template id="hwelement_props">
<tr>
<td><select id="hwelement_id"></select></td>
<td><label for="hw_x">X </label><input size="3" id="hw_x" type="number" /><label for="hw_y">Y </label><input size="3" id="hw_y" type="number" /></td>
<td><button title="Move up" id="hw_moveup">▲</button><button title="Move down" id="hw_movedn">▼</button><button title="Insert below" id="hw_insup">⩠</button><button title="Insert above" id="hw_insdn">⩢</button><button title="Remove" id="hw_remove">🗑️</button></td>
</tr>
</template>
<template id="hwelement_ctr">
<tr>
<td>Counter</td>
<td><input size="3" id="hw_value" min="-2" type="number" /></td>
<td><button title="Move up" id="hw_moveup">▲</button><button title="Move down" id="hw_movedn">▼</button><button title="Insert below" id="hw_insup">⩠</button><button title="Insert above" id="hw_insdn">⩢</button><button title="Remove" id="hw_remove">🗑️</button></td>
</tr>
</template>
<template id="hwelement_tpl">
<tr>
<td>Port template</td>
<td><input id="hw_value" /></td>
<td><button title="Move up" id="hw_moveup">▲</button><button title="Move down" id="hw_movedn">▼</button><button title="Insert below" id="hw_insup">⩠</button><button title="Insert above" id="hw_insdn">⩢</button><button title="Remove" id="hw_remove">🗑️</button></td>
</tr>
</template>
<dialog id="new_line_dialog" onclose="VisualEditor.createLineResult();">
<form id="new_line_frm" method="dialog">
<label for="linename">Line name:</label><input name="linename" id="linename" type="text" placeholder="Line name here" />
<button onclick="VisualEditor.dialogs.newLine.close(document.getElementById('linename').value);">Create line</button>
</form>
</dialog>
<dialog id="cancellable_dialog">
<form id="cancellable_frm" method="dialog">
<label id="prompt" for="cancellable_input">Input value:</label><input name="cancellable_input" id="cancellable_input" type="text" placeholder="" /><br /><span id="err_msg"><span id="err_text"></span><br /></span>
<button id="button" >OK</button><button onclick="VisualEditor.dialogs.cancellable.close('');">Cancel</button>
</form>
</dialog>
<dialog id="new_item_dialog"">
<form id="new_item_frm" method="dialog">
<label id="prompt" for="itemname">Item name:</label><input name="itemname" id="itemname" type="text" placeholder="Item name here" />
<button id="button" onclick="VisualEditor.dialogs.newItem.close(document.getElementById('itemname').value);">Create item</button>
</form>
</dialog>
<dialog id="add_frame_dialog" onclose="VisualEditor.addFrameResult()">
<form method="dialog">
<label for="slot">Add to slot: </label><input id="slot" type="number" /> <input id="override" type="checkbox" /><label for="override">Force slot number and rearrange as needed</label>
<h2>Select frame:</h2>
<div class="framelistcontainer">
<ul id="framelist"></ul></div>
<input type="hidden" id="rackref" />
<button onclick="VisualEditor.dialogs.addFrame.close('ok');">OK</button>
<button onclick="VisualEditor.dialogs.addFrame.close('cancel');">Cancel</button>
</form>
</dialog>
<dialog id="add_hw_element_dialog">
<form method="dialog">
<label for="hw_element_option_component">Element: </label><input checked value="component" type="radio" id="hw_element_option_component" name="hw_new_element_type" />
<select id="hw_element_listbox"></select><br />
<label for="hw_element_option_counter">Counter: </label><input value="counter" type="radio" id="hw_element_option_counter" name="hw_new_element_type" /><input id="hw_element_counter_value" min="-2" type="number" /><br />
<label for="hw_element_option_tpl">Port ID template: </label><input value="template" type="radio" id="hw_element_option_template" name="hw_new_element_type" /><input id="hw_element_template_value" />
<button onclick="VisualEditor.dialogs.addHwElement.close(document.getElementById('hw_element_listbox').value);">OK</button>
<button onclick="VisualEditor.dialogs.addHwElement.close('');">Cancel</button>
</form>
</dialog>
<div id="main">
<div id="leftpane">
<div id="toolbar_tools">
<button title="Load" id="bbb">▶️</button>
<button title="Save" id="bbb2">💾</button>
<button title="Select items" class="mode_button" data-mode="pointer" id="mode_pointer" onclick="VisualEditor.setEditorModeHandler(event)">⇖</button>
<button title="Move or extend links" class="mode_button" data-mode="wire" id="mode_rewire" onclick="VisualEditor.setEditorModeHandler(event)">⫯</button>
<button title="Create new links" class="mode_button" data-mode="link" id="mode_link" onclick="VisualEditor.setEditorModeHandler(event)">+</button>
<button title="Create a new line" disabled id="add_line" onclick="VisualEditor.createLine();">L</button>
<button title="Add a new rack unit" disabled id="add_frame" onclick="VisualEditor.showAddFrameDlg();">F</button>
<button title="Create a new location" disabled id="add_location" onclick="">🏢</button>
<button title="Display and modify source code" class="mode_button" data-mode="code" id="mode_code" onclick="VisualEditor.setEditorModeHandler(event)">🧑💻</button>
<button title="Edit hardware components" class="mode_button" data-mode="inventory" id="mode_inventory" onclick="VisualEditor.setEditorModeHandler(event)">🧰</button>
<datalist id="zoom_markers">
<option value="25"></option>
<option value="50"></option>
<option value="100"></option>
<option value="200"></option>
<option value="300"></option>
<option value="400"></option>
<option value="500"></option>
</datalist>
<input type="range" list="zoom_markers" value="100" max="500" min="25" id="zoom_slider"/><span id="zoom_lvl">100%</span>
</div>
<div class="displayer">
<canvas id="graphdisplay" width = "2024" height="2024" style="width:100%;height:100%;border: 1px solid black;position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
<canvas id="selection_display" width = "2024" height="2024" style="width:100%;height:100%;border: 1px solid black;position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
<div id="controls">
<h2 id="current_obj"></h2>
<textarea id="aaa"></textarea>
<textarea id="ccc"></textarea>
<textarea id="ddd"></textarea>
</div>
<div id="hwstudio">
<h2>Frames</h2><h2>Banks</h2><h2>Connectors</h2>
<ul id="hw_framelist" class="hw_comp_list"></ul>
<ul id="hw_banklist" class="hw_comp_list"></ul>
<ul id="hw_connlist" class="hw_comp_list"></ul>
<div id="hw_display_container"><canvas id="hw_display" width="640" height="72"></canvas></div>
<div id="hwstudio_box">
<table id="hwstudio_elements"></table>
<div id="hwstudio_element_props"></div>
</div>
</div>
</div>
</div>
<div class="hresize"></div>
<div id="rightpane">
<div id="object_info"></div>
<div class="vresize"></div>
<ul id="object_tree"></ul>
</div>
</div>
<script>
InitEditor();
</script>
</body></html>