Commit 5ad97ed1 authored by Christoffer Ackelman's avatar Christoffer Ackelman

JS: Move common functionality to a library file.

parent 0ea10baa
This diff is collapsed.
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
</div> </div>
<canvas id="flowcanvas" width="1200" height="800"></canvas> <canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=pwr.js></script> <script src=pwr.js></script>
<script src=cli.js></script>
<script src=ev.js></script> <script src=ev.js></script>
<hr> <hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address> <address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
"use strict"; "use strict";
/** Start Cli **/
function CliTable(command, qualifier) {
this.command = command;
this.qualifier = qualifier;
}
var CliC = {
SUCCESS: 1,
SYNTAX_ERROR: 2,
UNKNOWN_COMMAND: 4,
QUALNOTFOUND: 6,
VERB_VECT_SIZE: 5,
STATE_INIT: 0,
STATE_VERB: 1,
STATE_QUAL: 2,
STATE_QUALVALUE: 3,
STATE_SPACE: 4,
STATE_EQUAL: 5,
STATE_ERROR: 6,
STATE_QUOTE_VERB: 7,
STATE_QUOTE_QUALVALUE: 8,
STATE_QUALVALUE_EXACT: 9,
STATE_VERB_EXACT: 10,
TAB: ' ',
SPACE: ' '
};
var MhC = { var MhC = {
eEvent_Ack: 1, eEvent_Ack: 1,
eEvent_Block: 2, eEvent_Block: 2,
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<body> <body>
<canvas id="flowcanvas" width="1200" height="800"></canvas> <canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=pwr.js></script> <script src=pwr.js></script>
<script src=cli.js></script>
<script src=ge.js></script> <script src=ge.js></script>
<hr> <hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address> <address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
This diff is collapsed.
.annotate { .annotate {
color: #366ED4; color: #366ED4;
font-style: italic; font-style: italic;
} }
.toolbar { .toolbar {
border-left: 1px solid #aaa; border-left: 1px solid #aaa;
margin-top: 10px; margin-top: 10px;
margin: 0 0 0 0; margin: 0 0 0 0;
font-size: 0; font-size: 0;
} }
.toolbar-item { .toolbar-item {
display: inline-block; display: inline-block;
padding: 0.0em 0.0em; padding: 0.0em 0.0em;
background: #fff; background: #fff;
margin: 0 0 0 0; margin: 0 0 0 0;
border: 0px solid #aaa; border: 0px solid #aaa;
border-left: none; border-left: none;
color: blue; color: blue;
font-size: 16px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
vertical-align: top; vertical-align: top;
} }
.toolbar-item.selected { .toolbar-item.selected {
background-color: #ccc; background-color: #ccc;
color: black; color: black;
font-weight: bold; font-weight: bold;
} }
.menu-wrapper { .menu-wrapper {
display: inline-block; display: inline-block;
font-size: 16px; font-size: 16px;
} }
.menu-button { .menu-button {
padding-right: 2.5em; padding-right: 2.5em;
position: relative; position: relative;
} }
.menu-button::after { .menu-button::after {
content: " "; content: " ";
border-left: 0.4em solid transparent; border-left: 0.4em solid transparent;
border-right: 0.4em solid transparent; border-right: 0.4em solid transparent;
border-top: 0.4em solid black; border-top: 0.4em solid black;
position: absolute; position: absolute;
right: 1em; right: 1em;
top: 1.1em; top: 1.1em;
} }
.leftmenu-button { .leftmenu-button {
width:100%; width: 100%;
} }
.login-frame { .login-frame {
background-color: #ddeeff; background-color: #ddeeff;
padding: 10px; padding: 10px;
display: block; display: block;
overflow: hidden; overflow: hidden;
} }
.login-field { .login-field {
width:100%; width: 100%;
} }
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
</div> </div>
<canvas id="flowcanvas" width="1200" height="800"></canvas> <canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=pwr.js></script> <script src=pwr.js></script>
<script src=cli.js></script>
<script src=xtt.js></script> <script src=xtt.js></script>
<hr> <hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address> <address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment