mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Filters now hide sidebar entries too.
Also started to partially implement the conflicting plugins filter.
This commit is contained in:
@@ -131,7 +131,11 @@ function toggleMessages(evt) {
|
||||
}
|
||||
function togglePlugins(evt) {
|
||||
var sections = document.getElementById('main').children;
|
||||
var entries = document.getElementById('pluginsNav').children;
|
||||
var hiddenNo = parseInt(document.getElementById('hiddenPluginNo').textContent, 10);
|
||||
if (sections.length - 2 != entries.length) {
|
||||
throw "Error: Number of plugins in sidebar doesn't match number of plugins in main area!";
|
||||
}
|
||||
// Start at 3rd section to skip summary and general messages.
|
||||
for (var i = 2; i < sections.length; ++i) {
|
||||
var isMessageless = true;
|
||||
@@ -146,10 +150,12 @@ function togglePlugins(evt) {
|
||||
if (sections[i].className.indexOf('hidden') == -1) {
|
||||
hiddenNo++;
|
||||
hideElement(sections[i]);
|
||||
hideElement(entries[i]);
|
||||
}
|
||||
} else if (sections[i].className.indexOf('hidden') !== -1) {
|
||||
hiddenNo--;
|
||||
showElement(sections[i]);
|
||||
showElement(entries[i]);
|
||||
}
|
||||
}
|
||||
document.getElementById('hiddenPluginNo').textContent = hiddenNo;
|
||||
@@ -189,6 +195,10 @@ function showMessageDialog(title, text) {
|
||||
}
|
||||
function showMessageBox(type, title, text) {
|
||||
|
||||
}
|
||||
function getConflictingPlugins(filename) {
|
||||
/* This would be a C++ function interface, but using a dummy function to test the UI. */
|
||||
return ['Skyrim.esm', 'Unofficial Skyrim Patch.esp', 'Wyrmstooth.esp', 'RaceMenu.esp', 'Run For Your Lives.esp'];
|
||||
}
|
||||
function redatePlugins() {
|
||||
showMessageDialog('Redate Plugins', 'This feature is provided so that modders using the Creation Kit may set the load order it uses. A side-effect is that any subscribed Steam Workshop mods will be re-downloaded by Steam. Do you wish to continue?');
|
||||
@@ -459,6 +469,7 @@ function setupEventHandlers() {
|
||||
document.getElementById('hideInactivePluginMessages').addEventListener('click', toggleMessages, false);
|
||||
document.getElementById('hideAllPluginMessages').addEventListener('click', toggleMessages, false);
|
||||
document.getElementById('hideMessagelessPlugins').addEventListener('click', togglePlugins, false);
|
||||
document.getElementById('showOnlyConflicts').addEventListener('click', togglePlugins, false);
|
||||
/* Set up handlers for buttons. */
|
||||
elements = document.querySelectorAll('[data-action]');
|
||||
for (var i = 0; i < elements.length; ++i) {
|
||||
|
||||
@@ -222,8 +222,8 @@
|
||||
<label for="hideAllPluginMessages">Hide all plugin messages</label><br>
|
||||
<input type="checkbox" id="hideMessagelessPlugins" />
|
||||
<label for="hideMessagelessPlugins">Hide messageless plugins</label><br>
|
||||
<input type="checkbox" class="showOnlyConflicts">
|
||||
<label for="editorShowOnlyConflicts">Show only conflicts for </label>
|
||||
<input type="checkbox" id="showOnlyConflicts">
|
||||
<label for="showOnlyConflicts">Show only conflicts for </label>
|
||||
<input type="text" class="conflictsPlugin">
|
||||
<div>
|
||||
<span>Hidden plugins</span>: <span id="hiddenPluginNo">0</span> / <span id="totalPluginNo"></span>
|
||||
|
||||
Reference in New Issue
Block a user