-
Notifications
You must be signed in to change notification settings - Fork 0
/
diffui.html
399 lines (377 loc) · 25.4 KB
/
diffui.html
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
<!-- Copyright 2024 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<div class="dialogwrapper" style="display:flex">
<div class="mdl-dialog" id="loadingdialog" style="width:400px">
<h4 class="mdl-dialog__title">Schematic Loading...</h4>
<div class="mdl-dialog__content">
<p>
Once loaded, navigation will resume.
</p>
</div>
</div>
</div>
<div class="dialogwrapper">
<div class="mdl-dialog" id="settingsdialog" style="width:360px">
<div class="mdl-dialog__title">
<h4>Settings</h4>
</div>
<div class="mdl-dialog__content">
<div class="mdl-list" style="color:black">
<div class="mdl-list__item" style="color:black; border-bottom:1px solid grey">
<div class="mdl-list__item-primary-content"><span style="font-weight:500">Show zoom controls:</span>
</div>
<div class="mdl-list__item-secondary-action">
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="zoomcontrolcheckbox"
id="zoomcontrolcheckboxlabel">
<input type="checkbox" id="zoomcontrolcheckbox" class="mdl-checkbox__input">
</label>
</div>
</div>
<div class="mdl-list__item">
<div class="mdl-list__item-primary-content"><span style="font-weight:500">Theme:</span></div>
<div class="mdl-list__item-secondary-action themeselect">
<label style="margin-bottom:10px" class="mdl-radio mdl-js-radio mdl-js-ripple-effect"
for="toption-1">
<input type="radio" id="toption-1" class="mdl-radio__button" name="options" value="1">
<span class="mdl-radio__label"><span style="color:goldenrod">Color</span> on <span
style="color:green">White</span></span>
</label>
<label style="margin-bottom:10px" class="mdl-radio mdl-js-radio mdl-js-ripple-effect"
for="toption-2">
<input type="radio" id="toption-2" class="mdl-radio__button" name="options" value="2">
<span class="mdl-radio__label" style="background-color:black;color:white"><span
style="color:yellow">Color</span> on <span style="color:lime">Black</span></span>
</label>
<label style="margin-bottom:10px" class="mdl-radio mdl-js-radio mdl-js-ripple-effect"
for="toption-3">
<input type="radio" id="toption-3" class="mdl-radio__button" name="options" value="3">
<span class="mdl-radio__label">Black on White</span>
</label>
<label style="margin-bottom:10px" class="mdl-radio mdl-js-radio mdl-js-ripple-effect"
for="toption-4">
<input type="radio" id="toption-4" class="mdl-radio__button" name="options" value="4">
<span class="mdl-radio__label" style="background-color:black;color:white">White on
Black</span>
</label>
<label style="margin-bottom:10px" class="mdl-radio mdl-js-radio mdl-js-ripple-effect"
for="toption-5">
<input type="radio" id="toption-5" class="mdl-radio__button" name="options" value="5">
<span class="mdl-radio__label" style="background-color:#EEE8D5;color:white"><span
style="color:#002B36">Solarized</span> <span
style="color:#859900">Light</span></span>
</label>
<label style="margin-bottom:10px" class="mdl-radio mdl-js-radio mdl-js-ripple-effect"
for="toption-6">
<input type="radio" id="toption-6" class="mdl-radio__button" name="options" value="6">
<span class="mdl-radio__label" style="background-color:#002B36;color:white"><span
style="color:#FDF6E3">Solarized</span> <span
style="color:#859900">Dark</span></span>
</label>
</div>
</div>
</div>
</div>
<div class="mdl-dialog__actions">
<button type="button" class="mdl-button mdl-button--raised" id="applysettings">Apply</button>
<button type="button" class="mdl-button" id="closesettings">Close</button>
</div>
</div>
</div>
<div class="dialogwrapper">
<div class="mdl-dialog" id="applydiffsdialog" style="width:300px">
<div class="mdl-dialog__title">
<h4>Apply diff selections</h4>
</div>
<div class="mdl-dialog__content">
<p style="display:none;color:red;font-weight:bold" id="unresolvedWarning"></p>
</div>
<div class="mdl-dialog__actions mdl-dialog__actions--full-width">
<button type="button" class="mdl-button" id="applydiffs">Merge & Submit</button>
<button type="button" class="mdl-button" id="closeapplydiffs">Close</button>
</div>
</div>
</div>
<div id="copy-toast" class="mdl-js-snackbar mdl-snackbar">
<div class="mdl-snackbar__text"></div>
<button class="mdl-snackbar__action" type="button"></button>
</div>
<div class="mdl-layout__container" id="background" style="filter: blur(4px)">
<div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header"
style="overflow-y:hidden">
<header id="mdlheader"
class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600 is-casting-shadow">
<div class="mdl-layout__drawer-button" style="transform: scaleX(-1);">
<svg style="vertical-align:unset" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"
width="28px" height="28px">
<path d="M0 0h24v24H0V0z" fill="none"></path>
<path
d="M3 18h13v-2H3v2zm0-5h10v-2H3v2zm0-7v2h13V6H3zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5L21 15.59z">
</path>
</svg>
</div>
<div class="mdl-layout__header-row" style="padding-left:20px;padding-right:20px">
<span class="mdl-layout-title" id="schematic-title"></span>
<div class="mdl-layout-spacer"></div>
<div style="margin-right:20px;display:none" class="threewayshown">
<button title="submit resolved diffs" id="submitbutton"
class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect">
<span>✓</span>
<span class="mdl-button__ripple-container"><span class="mdl-ripple is-animating"
style="width: 160.392px; height: 160.392px; transform: translate(-50%, -50%) translate(15px, 46px);"></span></span></button>
</div>
<div style="margin-right:20px">
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"
title="change page settings" id="settingsbutton">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="32"
style="fill:black;">
<path d="M0,0h24v24H0V0z" fill="none" />
<path
d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" />
</svg>
</button>
</div>
<div style="margin-right:20px">
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"
title="report feedback" id="feedbackbutton">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="32"
style="fill:black;">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z" />
</svg>
</button>
</div>
<div style="margin-right:20px">
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored" title="print"
id="printbutton">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="32" viewBox="0 0 24 24"
style="fill:black;">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z" />
</svg>
</button>
</div>
<div style="width:1px;height:32px;border-left:1px solid lightgrey">
</div>
<div>
<button title="show changelist" id="diffbutton" style="display:none; margin-left:20px"
class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored">
<img style="width:25px;height:25px;margin-top:-4px">
<span class="mdl-button__ripple-container"><span class="mdl-ripple is-animating"
style="width: 160.392px; height: 160.392px; transform: translate(-50%, -50%) translate(15px, 46px);"></span></span></button>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
mdl-textfield--floating-label" id="expandsearch" style="margin-left:20px">
<label class="mdl-button mdl-js-button mdl-button--icon" for="search-expandable"
id="expandsearchbutton" title="search the schematic">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="32"
style="fill:black;">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
</svg>
</label>
<div class="mdl-textfield__expandable-holder">
<input class="mdl-textfield__input" type="text" id="search-expandable">
</div>
</div>
</div>
<div id="tooltip"
style="position:absolute;opacity:0.8;display:none;width:auto;height:auto;max-height:500px;overflow-y:auto"
class="mdl-card mdl-shadow--16dp ">
<div class="mdl-card__supporting-text mdl-card--border" style="color:black;flex-direction: column;">
<h2 class="mdl-card__title-text"><span style="font-weight:bold" id="tooltiptype"></span>: <span
id="tooltipname"></span>
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"
title="link to this element on this page" id="tooltiplink">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
style="fill:black;padding-bottom:5px;width:25px;height:25px">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" />
</svg>
</button>
</h2>
<h6 class="mdl-card__subtitle-text" style="margin-bottom:0"><span id="tooltipcontext"></span></h6>
</div>
<div class="mdl-card__supporting-text mdl-card--border" id="pndiv">
<h5 style="margin-top:0">Part database link:</h5>
<h6 style="margin-bottom:0"><a href="" id="pnlink" target="_blank" style="color:blue"></a></h6>
</div>
<div class="mdl-card__supporting-text">
<h5 style="margin-top:0">Where it appears:
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"
title="prev instance" id="previnstance">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
style="fill:black;padding-bottom:5px;width:25px;height:25px">
<path d="M0 0h24v24H0z" fill="none" />
<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" />
</svg>
</button>
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"
title="next instance" id="nextinstance">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
style="fill:black;padding-bottom:5px;width:25px;height:25px">
<path d="M0 0h24v24H0z" fill="none" />
<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" />
</svg>
</button>
</h5>
<ul id="tooltiplinks" style="list-style-type:none;color:blue">
</ul>
</div>
</div>
<div id="animationtoolbox" class="mdl-card mdl-shadow--16dp"
style="position:absolute;width:480px;height:calc(100% - 65px);top:64px;right:0; display:none">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Schematic Changelist</h2>
</div>
<div class="mdl-card__supporting-text" style="padding:0;width:100%;overflow-y:auto">
<button class="mdl-button mdl-js-button mdl-button--primary" id="reanimate-button"
style="margin-bottom:16px">
Re-animate selected changes
</button>
<button class="mdl-button mdl-js-button mdl-button--primary" id="highlight-changes-button"
style="margin-bottom:16px">
Highlight all changes
</button>
<div class="mdl-textfield mdl-js-textfield" style="margin-left:16px;margin-right:16px;width:448px">
<input class="mdl-textfield__input" type="text" id="changefilter">
<label class="mdl-textfield__label" for="changefilter">Filter change groups...</label>
</div>
<div style="overflow-y:scroll;overflow-x:hidden;height:calc(100vh - 250px)" id="changetablediv">
<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp"
style="width:480px;color:black;table-layout:fixed" id="changetable">
<thead>
<tr>
<th class="stickyhead" style="width:25px;padding:5px">
<label
class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect mdl-data-table__select"
for="oursall" style="width:25px">
<input type="checkbox" id="oursall" class="mdl-checkbox__input" checked />
</label>
</th>
<th class="mdl-data-table__cell--non-numeric stickyhead">Changes<span
class="threewayshown"> to apply (OURS)</span></th>
<th class="threewayshown stickyhead" style="width:25px;padding:5px">
<label
class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect mdl-data-table__select"
for="theirsall">
<input type="checkbox" id="theirsall" class="mdl-checkbox__input" checked />
</label>
</th>
<th class="threewayshown stickyhead" class="mdl-data-table__cell--non-numeric">
Changes to apply (THEIRS)</th>
</tr>
</thead>
<tbody id="changetablebody" style="bottom:50px;overflow-y:scroll">
<tr>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="searchpane" class="mdl-card mdl-shadow--16dp"
style="display:none;position:absolute;width:360px;height:calc(100vh - 64px);top:64px;right:0; background-color:#263238;overflow-y:scroll">
<div id="morematches" style="margin:5px 10px 5px 10px;padding:8px 16px 8px 16px;">
<span id="morematchescount" style="color:white;"></span>
<button disabled class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"
title="next search page" id="nextresults" style="float:right">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="fill:white;" width="24"
height="32">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"></path>
</svg>
</button>
<div class="mdl-textfield mdl-js-textfield" style="top:-20px;width:40px;display:inline;float:right;"
id="resultpagenumberdiv">
<input class="mdl-textfield__input" type="number" pattern="[0-9]*" id="resultpagenumber"
style="color:white;text-align:center;border-bottom-color:white">
</div>
<button disabled class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"
title="previous search page" id="previousresults" style="float:right">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="fill:white;" width="24"
height="32">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"></path>
</svg>
</button>
</div>
<div style="color:white;list-style-type:none;" id="matchlist">
</div>
</div>
</header>
<div class="demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50" id="pagebar">
<div class="mdl-textfield mdl-js-textfield" id="pagefilterdiv">
<input class="mdl-textfield__input" type="text" id="pagefilter" style="border-bottom:1px solid grey">
<label class="mdl-textfield__label" for="pagefilter" style="color:lightgrey;">filter pages...</label>
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"
style="fill:lightgrey;position:absolute;right:0;bottom:22px">
<path d="M0 0h24v24H0z" fill="none" />
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z" />
</svg>
</div>
<ul class="mdl-list" id="pageul">
<nav id="pagelist" class="mdl-navigation mdl-color--blue-grey-800" style="padding-top:0;width:100%;">
</nav>
</ul>
</div>
<main class="mdl-layout__content mdl-color--grey-100" id="svgWrapper">
<div id="svgLibrary" style="display:none"></div>
<svg style="height:0;position:absolute">
<filter id="highlight" x="-20" y="-20" height="40" width="40">
<feMorphology operator="dilate" radius="20" />
<feComponentTransfer result="highlight">
<feFuncR type="discrete" tableValues="1" />
<feFuncG type="discrete" tableValues="1" />
<feFuncB type="discrete" tableValues="0" />
<feFuncA type="table" tableValues="0 0.5 0.5 0.5 0.5 0.5 0.5 0.5" />
</feComponentTransfer>
<feComposite in="SourceGraphic" in2="highlight" operator="over" />
</filter>
</svg>
<div id="svgPage" style="width:100%;height:100%"></div>
<div id="zoomcontrols" class="mdl-shadow--2dp"
style="display:none;position:absolute;left:0;bottom:0; background-color:white; border-radius: 0 10px 0 0">
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored" title="zoom out"
id="zoomcontrolout">
<svg xmlns="http://www.w3.org/2000/svg" height="32" viewBox="0 0 24 24" width="24"
style="fill:black">
<path d="M0 0h24v24H0V0z" fill="none" />
<path
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z" />
</svg>
</button>
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored" title="zoom to fit page"
id="zoomcontrolfit">
<svg xmlns="http://www.w3.org/2000/svg" height="32" viewBox="0 0 24 24" width="24"
style="fill:black">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z" />
</svg>
</button>
<button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored" title="zoom in"
id="zoomcontrolin">
<svg xmlns="http://www.w3.org/2000/svg" height="32" viewBox="0 0 24 24" width="24"
style="fill:black">
<path d="M0 0h24v24H0V0z" fill="none" />
<path
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
<path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z" />
</svg>
</div>
</button>
</main>
</div>
</div>