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:
WrinklyNinja
2014-07-12 15:22:15 +01:00
parent 02c2d123db
commit 5da89be08b
3 changed files with 20 additions and 3 deletions
+11 -1
View File
@@ -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;
}
+5 -1
View File
@@ -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';
+4 -1
View File
@@ -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="">