finish env template
This commit is contained in:
parent
f0418bc0ed
commit
6fb9235b1b
|
@ -54,6 +54,13 @@ def helpHandle(scriptPath):
|
|||
tabcontrol_css = url_for('static', filename='tabcontrol.css'),
|
||||
tabcontrol_js = url_for('static', filename='tabcontrol.js'),
|
||||
converter_js = url_for('static', filename='converter.js'))
|
||||
elif scriptPath == 'env':
|
||||
return render_template("help/env.html",
|
||||
tabcontrol_css = url_for('static', filename='tabcontrol.css'),
|
||||
tabcontrol_js = url_for('static', filename='tabcontrol.js'),
|
||||
env_js = url_for('static', filename='env.js'),
|
||||
env_css = url_for('static', filename='env.css'),
|
||||
database_data = ss.envDatabaseList)
|
||||
else:
|
||||
abort(404)
|
||||
|
||||
|
|
|
@ -7,3 +7,20 @@ class HamburgerItem(object):
|
|||
def __init__(self, name, path):
|
||||
self.name = name
|
||||
self.path = path
|
||||
|
||||
envDatabaseList = (
|
||||
{"name": "Attribute",
|
||||
"queryKey": "attr",
|
||||
"data": (("index", "0", "(Integer) Attribute index"),
|
||||
("name", "Floor", "(String) Attribute name"),
|
||||
("category_index", "0", "(Integer) The category index of this attribute"),
|
||||
("category_name", "3DXML", "(String) The category name of this attribute"),
|
||||
("flags", "44", "(Integer) Attribute flags"),
|
||||
("param_index", "85", "(Integer) Corresponding parameter index"),
|
||||
("compatible_classid", "41", "(Integer) Compatible class id"),
|
||||
("default_id", "1;NULL", "(String) Default value"))},
|
||||
{"name": "Message",
|
||||
"queryKey": "msg",
|
||||
"data": (("index", "0", "(Integer) Message index"),
|
||||
("name", "OnClick", "(String) Message name"))}
|
||||
)
|
||||
|
|
17
SuperScriptViewer/static/env.css
Normal file
17
SuperScriptViewer/static/env.css
Normal file
|
@ -0,0 +1,17 @@
|
|||
table.envOutput {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
table.envOutput tr:nth-child(odd) {
|
||||
background:gray;
|
||||
}
|
||||
|
||||
table.envOutput tr:nth-child(2n) {
|
||||
background:white;
|
||||
}
|
||||
|
||||
table.envOutput tr:nth-child(1) td {
|
||||
background: blue;
|
||||
color: white;
|
||||
border: 1px solid black;
|
||||
}
|
3
SuperScriptViewer/static/env.js
Normal file
3
SuperScriptViewer/static/env.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
function doQuery(fieldIndex, queryTag) {
|
||||
;
|
||||
}
|
|
@ -117,35 +117,3 @@ function queryInfo(obj) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sidePanelSwitcher(target) {
|
||||
// 0->property; 1->display; 2->tools
|
||||
//disable all
|
||||
$("#sidepanel-properties").hide();
|
||||
$("#sidepanel-display").hide();
|
||||
$("#sidepanel-tools").hide();
|
||||
$(".tabitem").each(function () {
|
||||
$(this).removeClass("tabitem-activated").addClass("tabitem-deactivated");
|
||||
});
|
||||
|
||||
switch (target) {
|
||||
case 0:
|
||||
$("#sidepanel-properties").show();
|
||||
$(".tabitem1").each(function () {
|
||||
$(this).removeClass("tabitem-deactivated").addClass("tabitem-activated");
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
$("#sidepanel-display").show();
|
||||
$(".tabitem2").each(function () {
|
||||
$(this).removeClass("tabitem-deactivated").addClass("tabitem-activated");
|
||||
});
|
||||
break;
|
||||
case 2:
|
||||
$("#sidepanel-tools").show();
|
||||
$(".tabitem3").each(function () {
|
||||
$(this).removeClass("tabitem-deactivated").addClass("tabitem-activated");
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,11 +17,7 @@
|
|||
</ul>
|
||||
<h2>Environment database query</h2>
|
||||
<ul>
|
||||
<li><a href="/help/env-attr">Attribute query</a>: The page which can query attribute environment.</li>
|
||||
<li><a href="/help/env-msg">Message query</a>: The page which can query message environment.</li>
|
||||
<li><a href="/help/env-op">Operation query</a>: The page which can query operation(param converter) environment.</li>
|
||||
<li><a href="/help/env-param">Parameter query</a>: The page which can query parameter environment.</li>
|
||||
<li><a href="/help/env-plugin">Plugin query</a>: The page which can query plugin environment.</li>
|
||||
<li><a href="/help/env">Environment data query</a>: The page which can query environment data.</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
|
|
59
SuperScriptViewer/templates/help/env.html
Normal file
59
SuperScriptViewer/templates/help/env.html
Normal file
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Help - Environment data query</title>
|
||||
<link rel="stylesheet" href="{{tabcontrol_css}}">
|
||||
<link rel="stylesheet" href="{{env_css}}">
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.min.js"></script>
|
||||
<script src="{{tabcontrol_js}}"></script>
|
||||
<script src="{{env_js}}"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Environment data query</h1>
|
||||
<p>This page can query environment data.</p>
|
||||
<br />
|
||||
|
||||
|
||||
<div style="display: flex; flex-flow: row; height: 30px; width: 100%; margin: 0; padding: 0; border-bottom: 1px solid black;">
|
||||
{% for item in database_data %}
|
||||
<div id="tabnavigation_1_{{ loop.index }}" class="tabnavigation_1 tabitem-deactivated" style="height: 100%; padding-left: 20px; padding-right: 20px;" onclick="tabControlSwitcher(1, {{ loop.index }});"><b>{{ item.name }}</b></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% for item in database_data %}
|
||||
<div id="tabpanel_1_{{ loop.index }}" class="tabpanel_1" style="display: none;">
|
||||
<p>Query field:</p>
|
||||
<table id="queryTable_{{ loop.index }}" border="1" cellspacing="0" cellpadding="5" style="margin: 10px;">
|
||||
<tr>
|
||||
<td><b>Use this</b></td>
|
||||
<td><b>Field name</b></td>
|
||||
<td style="width: 150px;"><b>Value</b></td>
|
||||
<td><b>Example</b></td>
|
||||
<td><b>Description</b></td>
|
||||
</tr>
|
||||
|
||||
{% for innerItem in item.data %}
|
||||
<tr>
|
||||
<td><input type="checkbox" value="1"></input></td>
|
||||
<td>{{ innerItem[0]|e }}</td>
|
||||
<td><input type="text"></input></td>
|
||||
<td>{{ innerItem[1]|e }}</td>
|
||||
<td>{{ innerItem[2]|e }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<button style="padding: 5px;" onclick="doQuery({{ loop.index }}, "{{ item.queryKey }}");">Query</button>
|
||||
<p>Query result:</p>
|
||||
|
||||
<table class="envOutput" cellspacing="0" cellpadding="5" style="margin: 10px;">
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user