mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Added <tr> elements back into row templates.
I had hoped removing them would be a workaround for my Vulcanize, but that's not the case, and having them simplifies the JS slightly.
This commit is contained in:
@@ -4,12 +4,15 @@
|
||||
<link rel="import" href="../bower_components/core-icons/core-icons.html">
|
||||
|
||||
<template id="fileRow">
|
||||
<tr>
|
||||
<td><input class="name" type="text" required></td>
|
||||
<td><input class="display" type="text"></td>
|
||||
<td><input class="condition" type="text"></td>
|
||||
<td><paper-icon-button class="delete" icon="delete"></paper-icon-button></td>
|
||||
</tr>
|
||||
</template>
|
||||
<template id="messageRow">
|
||||
<tr>
|
||||
<td><select class="type">
|
||||
<option value="say">Note</option>
|
||||
<option value="warn">Warning</option>
|
||||
@@ -23,8 +26,10 @@
|
||||
</select>
|
||||
</td>
|
||||
<td><paper-icon-button class="delete" icon="delete"></paper-icon-button></td>
|
||||
</tr>
|
||||
</template>
|
||||
<template id="tagRow">
|
||||
<tr>
|
||||
<td><select class="type">
|
||||
<option value="add">Add</option>
|
||||
<option value="remove">Remove</option>
|
||||
@@ -33,21 +38,27 @@
|
||||
<td><input class="name" type="text" required></td>
|
||||
<td><input class="condition" type="text"></td>
|
||||
<td><paper-icon-button class="delete" icon="delete"></paper-icon-button></td>
|
||||
</tr>
|
||||
</template>
|
||||
<template id="dirtyInfoRow">
|
||||
<tr>
|
||||
<td><input class="crc" type="text" maxlength="8" minlength="8" pattern="[0-9A-Fa-f]{8}" required></td>
|
||||
<td><input class="itm" type="number" min="0" step="1" value="0"></td>
|
||||
<td><input class="udr" type="number" min="0" step="1" value="0"></td>
|
||||
<td><input class="nav" type="number" min="0" step="1" value="0"></td>
|
||||
<td><input class="util" type="text" required></td>
|
||||
<td><paper-icon-button class="delete" icon="delete"></paper-icon-button></td>
|
||||
</tr>
|
||||
</template>
|
||||
<template id="locationRow">
|
||||
<tr>
|
||||
<td><input class="link" type="text" required></td>
|
||||
<td><input class="ver" type="text"></td>
|
||||
<td><paper-icon-button class="delete" icon="delete"></paper-icon-button></td>
|
||||
</tr>
|
||||
</template>
|
||||
<template id="gameRow">
|
||||
<tr>
|
||||
<td><input class="name" type="text" required></td>
|
||||
<td>
|
||||
<select class="type">
|
||||
@@ -61,6 +72,7 @@
|
||||
<td><input class="path" type="text"></td>
|
||||
<td><input class="registry" type="text"></td>
|
||||
<td><paper-icon-button class="delete" icon="delete"></paper-icon-button></td>
|
||||
</tr>
|
||||
</template>
|
||||
<style>
|
||||
table[is=editable-table] td:last-child {
|
||||
@@ -237,10 +249,8 @@ td paper-icon-button.hidden {
|
||||
} else {
|
||||
content = document.getElementById(rowTemplateId).content;
|
||||
}
|
||||
var rowContent = document.importNode(content, true);
|
||||
var row = document.importNode(content, true);
|
||||
|
||||
var row = document.createElement('tr');
|
||||
row.appendChild(rowContent);
|
||||
table.tBodies[0].insertBefore(row, evt.currentTarget);
|
||||
row = evt.currentTarget.previousElementSibling;
|
||||
|
||||
@@ -258,10 +268,8 @@ td paper-icon-button.hidden {
|
||||
} else {
|
||||
content = document.getElementById(rowTemplateId).content;
|
||||
}
|
||||
var rowContent = document.importNode(content, true);
|
||||
var row = document.importNode(content, true);
|
||||
|
||||
var row = document.createElement('tr');
|
||||
row.appendChild(rowContent);
|
||||
var tbody = this.tBodies[0];
|
||||
tbody.insertBefore(row, tbody.lastElementChild);
|
||||
row = tbody.lastElementChild.previousElementSibling;
|
||||
|
||||
Reference in New Issue
Block a user