The remainder of the editor inputs now get filled.

This commit is contained in:
WrinklyNinja
2014-07-19 23:24:52 +01:00
parent 87c783e351
commit d4ca949e8f
3 changed files with 16 additions and 6 deletions
+9
View File
@@ -173,6 +173,15 @@ function Plugin(obj) {
card.shadowRoot.querySelector('#editor .crc').textContent = this.crc;
}
/* Fill in the editor input values. */
if (this.userlist && !this.userlist.enabled) {
card.shadowRoot.querySelector('#enableEdits').checked = false;
} else {
card.shadowRoot.querySelector('#enableEdits').checked = true;
}
card.shadowRoot.querySelector('#globalPriority').value = this.globalPriority;
card.shadowRoot.querySelector('#priorityValue').value = this.modPriority;
/* Fill in editor table data. */
var tables = card.shadowRoot.getElementsByTagName('table');
for (var i = 0; i < tables.length; ++i) {
+6 -6
View File
@@ -154,12 +154,12 @@
<span class="version"></span>
<span class="crc"></span>
<div>
<input type="checkbox" id="editorEnableEdits">
<label for="editorEnableEdits">Enable Edits</label><br>
<input type="checkbox" id="editorGlobalPriority">
<label for="editorGlobalPriority" title="Global priorities are compared against all other plugins. Normal priorities are compared against only conflicting plugins.">Global Priority</label><br>
<label for="editorPriorityValue">Priority Value</label>
<input id="editorPriorityValue" type="number" max="999999" min="-999999" step="1">
<input type="checkbox" id="enableEdits">
<label for="enableEdits">Enable Edits</label><br>
<input type="checkbox" id="globalPriority">
<label for="globalPriority" title="Global priorities are compared against all other plugins. Normal priorities are compared against only conflicting plugins.">Global Priority</label><br>
<label for="priorityValue">Priority Value</label>
<input id="priorityValue" type="number" max="999999" min="-999999" step="1">
</div>
<div id="tableTabs">
<span class="selected" data-for="loadAfter">Load After</span>
+1
View File
@@ -260,6 +260,7 @@ namespace loot {
if (!ulistPlugin.HasNameOnly()) {
// Now add the masterlist metadata to the pluginNode.
pluginNode["userlist"]["enabled"] = ulistPlugin.Enabled();
pluginNode["userlist"]["modPriority"] = modulo(ulistPlugin.Priority(), max_priority);
pluginNode["userlist"]["isGlobalPriority"] = (abs(ulistPlugin.Priority()) >= max_priority);
pluginNode["userlist"]["after"] = ulistPlugin.LoadAfter();