From d4ca949e8f071aa8f796d7f2ba8524ac333b5fdd Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Sat, 19 Jul 2014 23:24:52 +0100 Subject: [PATCH] The remainder of the editor inputs now get filled. --- resources/report/js/plugin.js | 9 +++++++++ resources/report/report.html | 12 ++++++------ src/gui/handler.cpp | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/resources/report/js/plugin.js b/resources/report/js/plugin.js index 4b07ca40..725b06e4 100644 --- a/resources/report/js/plugin.js +++ b/resources/report/js/plugin.js @@ -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) { diff --git a/resources/report/report.html b/resources/report/report.html index 473a56f6..10334c97 100644 --- a/resources/report/report.html +++ b/resources/report/report.html @@ -154,12 +154,12 @@
- -
- -
- - + +
+ +
+ +
Load After diff --git a/src/gui/handler.cpp b/src/gui/handler.cpp index b705936e..52ca0e1a 100644 --- a/src/gui/handler.cpp +++ b/src/gui/handler.cpp @@ -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();