From 03ceb6541b2099638a2c482d6d1aa32afc5bd0f1 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Thu, 14 Aug 2014 11:48:13 +0100 Subject: [PATCH] Finished JS side of editor saving/UI refresh. --- resources/report/js/custom.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/resources/report/js/custom.js b/resources/report/js/custom.js index 6de2b0d0..240e0159 100644 --- a/resources/report/js/custom.js +++ b/resources/report/js/custom.js @@ -205,6 +205,11 @@ var pluginCardProto = Object.create(HTMLElement.prototype, { } } } + /* Update the userlist values. This doesn't affect priority, + which will need to be set in the callback. */ + loot.game.plugins[i].userlist = plugin.userlist; + + break; } } return plugin; @@ -238,7 +243,20 @@ var pluginCardProto = Object.create(HTMLElement.prototype, { ] }); loot.query(request).then(function(result){ + for (var i = 0; i < loot.game.plugins.length; ++i) { + if (loot.game.plugins[i].id == this.id) { + loot.game.plugins[i].userlist.priority = result.userlist.priority; + + loot.game.plugins[i].modPriority = result.modPriority; + loot.game.plugins[i].isGlobalPriority = result.isGlobalPriority; + loot.game.plugins[i].messages = result.messages; + loot.game.plugins[i].tags = result.tags; + loot.game.plugins[i].isDirty = result.isDirty; + + break; + } + } }).catch(processCefError);