mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Implemented priority display in edit mode.
Hovering over a plugin in the sidebar will replace its name with its priority value.
This commit is contained in:
@@ -146,7 +146,7 @@ nav a {
|
||||
padding: 0 0.5em;
|
||||
white-space:nowrap;
|
||||
}
|
||||
#pluginsNav li span {
|
||||
#pluginsNav li > span {
|
||||
display: inline-block;
|
||||
width: 1.2em;
|
||||
}
|
||||
@@ -440,4 +440,14 @@ td input {
|
||||
border-collapse: collapse;
|
||||
border: 1px black solid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#pluginsNav .priority {
|
||||
display: none;
|
||||
}
|
||||
#pluginsNav.editMode li:hover .priority {
|
||||
display: inline;
|
||||
}
|
||||
#pluginsNav.editMode li:hover .name {
|
||||
display: none;
|
||||
}
|
||||
@@ -311,6 +311,9 @@ function showEditor(sectionId) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable priority hover in plugins list. */
|
||||
document.getElementById('pluginsNav').classList.toggle('editMode', true);
|
||||
|
||||
/* Finally, show editor. */
|
||||
section.classList.toggle('flip');
|
||||
}
|
||||
@@ -439,8 +442,9 @@ function processURLParams() {
|
||||
pluginsNav.appendChild(clone);
|
||||
clone = pluginsNav.lastElementChild;
|
||||
|
||||
clone.getElementsByTagName('a')[0].textContent = data.plugins[i].name;
|
||||
clone.getElementsByClassName('name')[0].textContent = data.plugins[i].name;
|
||||
clone.getElementsByTagName('a')[0].href = '#' + data.plugins[i].name.replace(/\s+/g, '');
|
||||
clone.getElementsByClassName('priority')[0].textContent = 'Priority: 500, Global: ✓'; // Or '✗'.
|
||||
|
||||
if (data.plugins[i].isDummy) {
|
||||
clone.getElementsByClassName('dummyPlugin')[0].className += ' fa fa-eye-slash';
|
||||
|
||||
@@ -68,7 +68,10 @@
|
||||
<span class="dummyPlugin" title="Dummy Plugin"></span>
|
||||
<span class="loadsBSA" title="Loads BSA"></span>
|
||||
<span class="hasUserEdits" title="Has User Metadata"></span>
|
||||
<a href=""></a>
|
||||
<a href="">
|
||||
<span class="name"></span>
|
||||
<span class="priority"></span>
|
||||
</a>
|
||||
</template>
|
||||
<template id="pluginSection">
|
||||
<section id="" data-active="">
|
||||
|
||||
Reference in New Issue
Block a user