allViewModels -> self.allViewModels

This commit is contained in:
Gina Häußge 2017-07-26 16:32:05 +02:00
parent 60cacb9447
commit 375480c707
2 changed files with 4 additions and 1 deletions

View file

@ -1000,10 +1000,13 @@ function setOnViewModelsIf(allViewModels, key, value, condition) {
}
function callViewModels(allViewModels, method, callback) {
if (!allViewModels) return;
callViewModelsIf(allViewModels, method, undefined, callback);
}
function callViewModelsIf(allViewModels, method, condition, callback) {
if (!allViewModels) return;
if (condition == undefined || !_.isFunction(condition)) {
condition = function() { return true; };
}

View file

@ -193,7 +193,7 @@ $(function() {
if (!self.finishing && self.isDialogActive()
&& hasDataChanged(self.settingsViewModel.getLocalData(), self.settingsViewModel.lastReceivedSettings)) {
var preventSettingsRefreshDialog = false;
callViewModels(allViewModels, "onWizardPreventSettingsRefreshDialog", function(method) {
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
//