From 8c85ed8ce5798433b436fd9ede97ee452a851df4 Mon Sep 17 00:00:00 2001 From: Salandora Date: Wed, 16 Dec 2015 12:28:41 +0100 Subject: [PATCH] Fix for system menu not getting properly reloaded after entries changed. Plus added a missing semicolon. --- src/octoprint/static/js/app/viewmodels/system.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/system.js b/src/octoprint/static/js/app/viewmodels/system.js index 63b916c6..7973a6cf 100644 --- a/src/octoprint/static/js/app/viewmodels/system.js +++ b/src/octoprint/static/js/app/viewmodels/system.js @@ -88,7 +88,13 @@ $(function() { self.onUserLoggedOut = function() { self.lastCommandResponse = undefined; self.systemActions([]); - } + }; + + self.onEventSettingsUpdated = function() { + if (self.loginState.isAdmin()) { + self.requestData(); + } + }; } // view model class, parameters for constructor, container to bind to