diff --git a/src/octoprint/plugins/corewizard/static/js/corewizard.js b/src/octoprint/plugins/corewizard/static/js/corewizard.js index 1c8f41b7d..5f3dfa7d0 100644 --- a/src/octoprint/plugins/corewizard/static/js/corewizard.js +++ b/src/octoprint/plugins/corewizard/static/js/corewizard.js @@ -170,10 +170,6 @@ $(function() { return false; }; - self.onWizardPreventSettingsRefreshDialog = function() { - return self.active; - }; - self.onWizardDetails = function(response) { self.required = response && response.corewizard && response.corewizard.details && response.corewizard.details.onlinecheck && response.corewizard.details.onlinecheck.required; }; @@ -252,10 +248,6 @@ $(function() { return false; }; - self.onWizardPreventSettingsRefreshDialog = function() { - return self.active; - }; - self.onWizardDetails = function(response) { self.required = response && response.corewizard && response.corewizard.details && response.corewizard.details.pluginblacklist && response.corewizard.details.pluginblacklist.required; }; diff --git a/src/octoprint/plugins/tracking/static/js/usage.js b/src/octoprint/plugins/tracking/static/js/usage.js index 1a8517313..b8867d1a8 100644 --- a/src/octoprint/plugins/tracking/static/js/usage.js +++ b/src/octoprint/plugins/tracking/static/js/usage.js @@ -44,10 +44,6 @@ $(function() { return false; }; - self.onWizardPreventSettingsRefreshDialog = function() { - return self.active(); - }; - self.onWizardDetails = function(response) { self.required = response && response.tracking && response.tracking.required; }; diff --git a/src/octoprint/static/js/app/viewmodels/wizard.js b/src/octoprint/static/js/app/viewmodels/wizard.js index 45226d65a..1dbecc2aa 100644 --- a/src/octoprint/static/js/app/viewmodels/wizard.js +++ b/src/octoprint/static/js/app/viewmodels/wizard.js @@ -193,30 +193,7 @@ $(function() { }; self.onSettingsPreventRefresh = function() { - if (!self.finishing && self.isDialogActive() - && hasDataChanged(self.settingsViewModel.getLocalData(), self.settingsViewModel.lastReceivedSettings)) { - var preventSettingsRefreshDialog = false; - callViewModels(self.allViewModels, "onWizardPreventSettingsRefreshDialog", function(method) { - // if any of our methods returns that it wants to prevent the dialog - // we'll need to set preventSettingsRefreshDialog to true - // - // order is important here - the method call needs to happen - // first, or it won't happen after the flag has been - // set once due to the || making further evaluation unnecessary - // then - preventSettingsRefreshDialog = (method() === true) || preventSettingsRefreshDialog; - }); - - // we have local changes, show update dialog - if (preventSettingsRefreshDialog) { - return false; - } else { - self.settingsViewModel.settingsUpdatedDialog.modal("show"); - return true; - } - } - - return false; + return self.isDialogActive(); } }