Skip to content

Commit dcb08a0

Browse files
committed
Version 2.0: Added editable fields and manual entry mode
Added ablility to edit the fields before printing, tidied up interface, and added a manaul entry mode.
1 parent d6c3fd0 commit dcb08a0

File tree

4 files changed

+241
-156
lines changed

4 files changed

+241
-156
lines changed

Extension/main.html

Lines changed: 72 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,48 @@
88
background: #f9f9f9;
99
padding: 1px;
1010
}
11-
11+
1212
.title {
1313
text-align: center;
1414
font-size: 1.9em;
1515
color: #d89200;
1616
}
17-
17+
1818
h2, h3, h4 {
1919
text-align: center;
2020
}
21-
21+
2222
.datafield {
2323
font-size: 1.2em;
2424
}
25-
25+
2626
.datatable {
2727
font-size: 1.2em;
2828
border: 1px solid black;
2929
border-collapse: collapse;
3030
}
31-
31+
3232
.datatable thead {
3333
font-weight: 800;
3434
}
35-
35+
3636
.datatable tr {
3737
border: 1px solid black;
3838
}
39-
39+
4040
.datatable td {
4141
border: 1px solid black;
4242
}
43-
43+
44+
.input-field {
45+
text-align: center;
46+
border: 1px solid #aaaaaa;
47+
}
48+
49+
.input-field .btn-add-row {
50+
border: none;
51+
}
52+
4453
.btn {
4554
width: 100%;
4655
padding: 3px;
@@ -50,15 +59,34 @@
5059
border: 2px solid black;
5160
border-radius: 7.5px;
5261
}
53-
62+
5463
.btn:hover {
5564
background: #333333;
5665
color: #ffffff;
5766
}
58-
67+
5968
.btn:active {
6069
background: #888888;
6170
}
71+
72+
.btn:disabled {
73+
background: #eeeeee;
74+
color: #aaaaaa;
75+
}
76+
77+
input {
78+
width: 100%;
79+
}
80+
81+
table {
82+
width: 100%;
83+
}
84+
85+
.btn-add-row {
86+
width: 100%;
87+
padding: 0.2px;
88+
margin: 0;
89+
}
6290
</style>
6391
</head>
6492
<body>
@@ -68,36 +96,41 @@ <h4>An automatic web parser and packing list printer using a Raspberry Pi and a
6896
<h3><span id='done-msg'>Not connected - press Send Data above</span></h3>
6997
<hr>
7098
<h4 id="more-info"></h4>
71-
<button class="btn" id='run-button'>Print</button>
72-
<hr>
73-
<span id="main-data">
74-
<h2>Data Gathered</h2>
75-
<h3>Address</h3>
76-
<p class="datafield" id="address">
77-
78-
</p>
79-
<h3>Shipping Paid</h3>
80-
<p class="datafield" id="shipping">
81-
82-
</p>
83-
<h3>Total Paid</h3>
84-
<p class="datafield" id="total">
85-
86-
</p>
87-
<h3>Items Purchased</h3>
88-
<table class="datatable">
89-
<thead>
99+
<button class="btn" id='run-button'>Print</button>
100+
<hr>
101+
<span id="main-data">
102+
<h2>Data Gathered</h2>
103+
<h3>Address</h3>
104+
<!--<table>
105+
<tbody id="address">
106+
107+
</tbody>
90108
<tr>
91-
<th>Desc</th>
92-
<th>Price</th>
93-
<th>QTY</th>
94-
<th>SKU</th>
109+
<td class="input-field">
110+
<button class="btn-add-row" id="address-row-btn">Add row</button>
111+
</td>
95112
</tr>
96-
</thead>
97-
<tbody id="items">
98-
</tbody>
99-
</table>
100-
<hr>
101-
</span>
113+
</table>-->
114+
<textarea id="address" rows="4" cols="60"> </textarea>
115+
<h3>Shipping Paid</h3>
116+
<input type="text" class="datafield input-field" id="shipping" />
117+
<h3>Total Paid (not including shipping)</h3>
118+
<input type="text" class="datafield input-field" id="total" />
119+
<h3>Items Purchased</h3>
120+
<table class="datatable">
121+
<thead>
122+
<tr>
123+
<th>Description</th>
124+
<th>Price (Total)</th>
125+
<th>QTY</th>
126+
<th>SKU</th>
127+
</tr>
128+
</thead>
129+
<tbody id="items">
130+
</tbody>
131+
</table>
132+
<button class="btn-add-row" id="items-row-btn">Add row</button>
133+
<hr>
134+
</span>
102135
</body>
103136
</html>

0 commit comments

Comments
 (0)