mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Game and language lists are now populated.
Also added currently read-only game table in settings dialog.
This commit is contained in:
@@ -281,45 +281,20 @@ section h1 {
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
|
||||
/* Old CSS */
|
||||
|
||||
.button {
|
||||
display:inline-table;
|
||||
cursor:pointer;
|
||||
padding:0.5em;
|
||||
text-decoration:none;
|
||||
transition:background 0.2s;
|
||||
}
|
||||
.button.current {
|
||||
background: #ccc;
|
||||
}
|
||||
#summary, #plugins {
|
||||
padding:1em;
|
||||
}
|
||||
#summary > table {
|
||||
border-collapse:separate;
|
||||
border-spacing:0;
|
||||
}
|
||||
td {
|
||||
#summary td {
|
||||
padding:0.5em;
|
||||
line-height:1.5;
|
||||
text-align:right;
|
||||
padding-left:3em;
|
||||
}
|
||||
table td:first-child {
|
||||
#summary table td:first-child {
|
||||
text-align:left;
|
||||
padding-left:0;
|
||||
}
|
||||
table:not(:last-child) {
|
||||
margin-right: 3em;
|
||||
}
|
||||
#noChanges {
|
||||
font-weight:bold;
|
||||
font-size:12pt;
|
||||
text-align:center;
|
||||
margin:1em;
|
||||
}
|
||||
input[type='checkbox'] {
|
||||
position:relative;
|
||||
top:0.15em;
|
||||
@@ -327,18 +302,10 @@ input[type='checkbox'] {
|
||||
}
|
||||
ul {
|
||||
margin-top:0.5em;
|
||||
margin-bottom:0;
|
||||
list-style:none;
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
|
||||
#plugins > ul > li, #summary > div {
|
||||
background:white;
|
||||
overflow:hidden;
|
||||
margin:1em;
|
||||
box-shadow:0 0 3px 0px rgba(0,0,0,0.5);
|
||||
padding:1em;
|
||||
}
|
||||
.mod {
|
||||
font-size:1.3em;
|
||||
}
|
||||
@@ -357,9 +324,6 @@ ul {
|
||||
.hidden {
|
||||
display:none;
|
||||
}
|
||||
#summary > div {
|
||||
float:left;
|
||||
}
|
||||
#summary li, li > ul > li {
|
||||
padding:0.5em 1em;
|
||||
list-style:disc inside;
|
||||
@@ -374,8 +338,7 @@ ul {
|
||||
.warn{
|
||||
background:#FFDD55;
|
||||
}
|
||||
h2 {
|
||||
font-weight: normal;
|
||||
margin:0;
|
||||
display:block;
|
||||
|
||||
#settings td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
@@ -376,6 +376,45 @@ function processURLParams() {
|
||||
}
|
||||
}
|
||||
|
||||
/* Now fill game lists/table. */
|
||||
var gameSelect = document.getElementById('defaultGameSelect');
|
||||
var gameMenu = document.getElementById('gameMenu');
|
||||
var gameTable = document.getElementById('gameTable');
|
||||
for (var i = 0; i < data.games.length; ++i) {
|
||||
var option = document.createElement('option');
|
||||
option.value = data.games[i].folder;
|
||||
option.textContent = data.games[i].name;
|
||||
gameSelect.appendChild(option);
|
||||
|
||||
var li = document.createElement('li');
|
||||
li.setAttribute('data-action', 'change-game');
|
||||
li.setAttribute('data-target', data.games[i].folder);
|
||||
li.textContent = data.games[i].name;
|
||||
gameMenu.appendChild(li);
|
||||
|
||||
var content = document.getElementById('gameRow').content;
|
||||
var clone = document.importNode(content, true);
|
||||
gameTable.appendChild(clone);
|
||||
clone = gameTable.lastElementChild;
|
||||
clone.children[0].textContent = data.games[i].name;
|
||||
clone.children[1].textContent = data.games[i].type;
|
||||
clone.children[2].textContent = data.games[i].folder;
|
||||
clone.children[3].textContent = data.games[i].masterFile;
|
||||
clone.children[4].textContent = data.games[i].url;
|
||||
clone.children[5].textContent = data.games[i].branch;
|
||||
clone.children[6].textContent = data.games[i].path;
|
||||
clone.children[7].textContent = data.games[i].registryKey;
|
||||
}
|
||||
|
||||
/* Now fill in language options. */
|
||||
var langSelect = document.getElementById('languageSelect');
|
||||
for (var i = 0; i < data.languages.length; ++i) {
|
||||
var option = document.createElement('option');
|
||||
option.value = data.languages[i];
|
||||
option.textContent = data.languages[i];
|
||||
langSelect.appendChild(option);
|
||||
}
|
||||
|
||||
/* Now initialise the rest of the report. */
|
||||
setupEventHandlers();
|
||||
if (isStorageSupported()) {
|
||||
|
||||
@@ -9,6 +9,17 @@
|
||||
<script src="js/require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<template id="gameRow">
|
||||
<tr>
|
||||
<td>Name
|
||||
<td>Base Game
|
||||
<td>LOOT Folder
|
||||
<td>Master File
|
||||
<td>Masterlist Repository URL
|
||||
<td>Masterlist Repository Branch
|
||||
<td>Install Path
|
||||
<td>Install Path Registry Key
|
||||
</template>
|
||||
<template id="pluginNav">
|
||||
<li><a href=""></a>
|
||||
</template>
|
||||
@@ -53,6 +64,8 @@
|
||||
<template id="editorPanel">
|
||||
<div id="editor">
|
||||
<h1></h1>
|
||||
<div class="crc"></div>
|
||||
<div class="version"></div>
|
||||
<label for="editorEnableEdits">Enable Edits</label>
|
||||
<input type="checkbox" id="editorEnableEdits">
|
||||
<label for="editorPriorityValue">Priority</label>
|
||||
@@ -197,6 +210,12 @@ along with LOOT. If not, see <http://www.gnu.org/licenses/>.
|
||||
<option value="3">High</option>
|
||||
</select>
|
||||
<!-- Need to add an editable multi-column game list here. -->
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Name<th>Base Game<th>LOOT Folder<th>Master File<th>Masterlist Repository URL<th>Masterlist Repository Branch<th>Install Path<th>Install Path Registry Key
|
||||
<tbody id="gameTable">
|
||||
<!-- Game rows go here. -->
|
||||
</table>
|
||||
<p>Language and game changes will be applied after LOOT is restarted.
|
||||
<hr>
|
||||
<button>Apply</button>
|
||||
|
||||
@@ -955,4 +955,56 @@ var data = {
|
||||
"content": "Warning: The load order displayed in the Details tab was not applied as sorting was canceled."
|
||||
}
|
||||
],
|
||||
"games": [
|
||||
{
|
||||
"name": "TES IV: Oblivion",
|
||||
"type": "Oblivion",
|
||||
"folder": "Oblivion",
|
||||
"masterFile": "Oblivion.esm",
|
||||
"url": "https://github.com/loot/oblivion.git",
|
||||
"branch": "master",
|
||||
"path": "C:\\Oblivion",
|
||||
"registryKey": "Software\\Bethesda Softworks\\Oblivion\\Installed Path",
|
||||
},
|
||||
{
|
||||
"name": "TES V: Skyrim",
|
||||
"type": "Skyrim",
|
||||
"folder": "Skyrim",
|
||||
"masterFile": "Skyrim.esm",
|
||||
"url": "https://github.com/loot/skyrim.git",
|
||||
"branch": "master",
|
||||
"path": "C:\\Skyrim",
|
||||
"registryKey": "Software\\Bethesda Softworks\\Skyrim\\Installed Path",
|
||||
},
|
||||
{
|
||||
"name": "Fallout 3",
|
||||
"type": "Fallout3",
|
||||
"folder": "Fallout3",
|
||||
"masterFile": "Fallout3.esm",
|
||||
"url": "https://github.com/loot/fallout3.git",
|
||||
"branch": "master",
|
||||
"path": "C:\\Fallout3",
|
||||
"registryKey": "Software\\Bethesda Softworks\\Fallout3\\Installed Path",
|
||||
},
|
||||
{
|
||||
"name": "Fallout: New Vegas",
|
||||
"type": "FalloutNV",
|
||||
"folder": "FalloutNV",
|
||||
"masterFile": "FalloutNV.esm",
|
||||
"url": "https://github.com/loot/falloutnv.git",
|
||||
"branch": "master",
|
||||
"path": "C:\\FalloutNV",
|
||||
"registryKey": "Software\\Bethesda Softworks\\FalloutNV\\Installed Path",
|
||||
},
|
||||
],
|
||||
"languages": [
|
||||
"None Specified",
|
||||
"English",
|
||||
"Español",
|
||||
"Русский",
|
||||
"Français",
|
||||
"简体中文",
|
||||
"Polski",
|
||||
"Português do Brasil",
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user