mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed unregistered element usage.
Also moved my includes after Polymer init, as they'll probably be polymerised shortly.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
<link rel="import" href="../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="../bower_components/paper-input/paper-input.html">
|
||||
|
||||
<template id="fileRow">
|
||||
<tr>
|
||||
<td><input class="name" type="text" required></td>
|
||||
@@ -54,18 +57,18 @@
|
||||
</template>
|
||||
<template id="gameRow">
|
||||
<tr>
|
||||
<td><input class="name" type="text" required></td>
|
||||
<td><paper-input class="name" type="text" required></paper-input></td>
|
||||
<td>
|
||||
<select class="type">
|
||||
<!-- Game <option> elements go here. -->
|
||||
</select>
|
||||
</td>
|
||||
<td><input class="folder" type="text" required></td>
|
||||
<td><input class="master" type="text"></td>
|
||||
<td><input class="repo" type="text"></td>
|
||||
<td><input class="branch" type="text"></td>
|
||||
<td><input class="path" type="text"></td>
|
||||
<td><input class="registry" type="text"></td>
|
||||
<td><paper-input class="folder" type="text" required></paper-input></td>
|
||||
<td><paper-input class="master" type="text"></paper-input></td>
|
||||
<td><paper-input class="repo" type="text"></paper-input></td>
|
||||
<td><paper-input class="branch" type="text"></paper-input></td>
|
||||
<td><paper-input class="path" type="text"></paper-input></td>
|
||||
<td><paper-input class="registry" type="text"></paper-input></td>
|
||||
<td class="fa fa-trash-o fa-fw"></td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -136,7 +139,7 @@ var EditableTableProto = Object.create(HTMLTableElement.prototype, {
|
||||
if (trash.length > 0 && (!writableOnly || !trash[0].classList.contains('hidden'))) {
|
||||
var rowData = {};
|
||||
|
||||
var inputs = rows[i].getElementsByTagName('input');
|
||||
var inputs = rows[i].querySelectorAll('input, paper-input');
|
||||
for (var j = 0; j < inputs.length; ++j) {
|
||||
rowData[inputs[j].className] = inputs[j].value;
|
||||
}
|
||||
@@ -172,17 +175,25 @@ var EditableTableProto = Object.create(HTMLTableElement.prototype, {
|
||||
trash.classList.toggle('hidden', readOnly);
|
||||
}
|
||||
|
||||
var inputs = row.getElementsByTagName('input');
|
||||
var inputs = row.querySelectorAll('input, paper-input');
|
||||
for (var i = 0; i < inputs.length; ++i) {
|
||||
if (classMask) {
|
||||
for (var j = 0; j < classMask.length; ++j) {
|
||||
if (inputs[i].classList.contains(classMask[j])) {
|
||||
inputs[i].readOnly = readOnly;
|
||||
if (inputs[i].tagName == 'PAPER-INPUT') {
|
||||
inputs[i].readonly = readOnly;
|
||||
} else {
|
||||
inputs[i].readOnly = readOnly;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
inputs[i].readOnly = readOnly;
|
||||
if (inputs[i].tagName == 'PAPER-INPUT') {
|
||||
inputs[i].disabled = readOnly;
|
||||
} else {
|
||||
inputs[i].readOnly = readOnly;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +265,12 @@ var EditableTableProto = Object.create(HTMLTableElement.prototype, {
|
||||
for (var key in tableData) {
|
||||
var elems = row.getElementsByClassName(key);
|
||||
if (tableData[key] != undefined && elems.length == 1) {
|
||||
elems[0].value = tableData[key];
|
||||
/*if (elems[0].tagName == 'PAPER-INPUT') {
|
||||
elems[0].inputValue = tableData[key];
|
||||
elems[0].commit();
|
||||
} else {
|
||||
*/ elems[0].value = tableData[key];
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<!--
|
||||
|
||||
<loot-dialog> is an extension of <paper-dialog> that
|
||||
|
||||
-->
|
||||
|
||||
<link rel="import" href="../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="bower_components/paper-dialog/paper-dialog.html">
|
||||
|
||||
@@ -4,20 +4,22 @@
|
||||
<title>LOOT</title>
|
||||
<link rel="stylesheet" href="css/style.css" />
|
||||
<link rel="stylesheet" href="css/font-awesome.min.css" />
|
||||
|
||||
<script src="bower_components/platform/platform.js"></script>
|
||||
<link rel="import" href="bower_components/polymer/polymer.html">
|
||||
|
||||
<link rel="import" href="html/message-dialog.html">
|
||||
<link rel="import" href="html/plugin-li.html">
|
||||
<link rel="import" href="html/plugin-card.html">
|
||||
<link rel="import" href="html/editable-table.html">
|
||||
|
||||
<script src="bower_components/platform/platform.js"></script>
|
||||
<link rel="import" href="bower_components/polymer/polymer.html">
|
||||
|
||||
<link rel="import" href="bower_components/core-toolbar/core-toolbar.html">
|
||||
<link rel="import" href="bower_components/core-icon/core-icon.html">
|
||||
<link rel="import" href="bower_components/core-icons/core-icons.html">
|
||||
<link rel="import" href="bower_components/core-tooltip/core-tooltip.html">
|
||||
<link rel="import" href="bower_components/core-drawer-panel/core-drawer-panel.html">
|
||||
<link rel="import" href="bower_components/core-menu/core-menu.html">
|
||||
<link rel="import" href="bower_components/core-menu/core-submenu.html">
|
||||
|
||||
<link rel="import" href="bower_components/paper-menu-button/paper-menu-button.html">
|
||||
<link rel="import" href="bower_components/paper-item/paper-item.html">
|
||||
@@ -216,10 +218,10 @@ along with LOOT. If not, see <http://www.gnu.org/licenses/>.
|
||||
<!-- Language <option> elements go here. -->
|
||||
</paper-dropdown-menu>
|
||||
</div>
|
||||
<paper-tooltip label="The output is logged to the LOOTDebugLog.txt file." center horizontal layout>
|
||||
<core-tooltip label="The output is logged to the LOOTDebugLog.txt file." center horizontal layout>
|
||||
<paper-checkbox id="enableDebugLogging"></paper-checkbox>
|
||||
<div>Enable debug logging</div>
|
||||
</paper-tooltip>
|
||||
</core-tooltip>
|
||||
<div center horizontal layout>
|
||||
<paper-checkbox id="updateMasterlist"></paper-checkbox>
|
||||
<div>Update masterlist before sorting</div>
|
||||
|
||||
Reference in New Issue
Block a user