mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
More typo fixes
This commit is contained in:
parent
5c08bde0fa
commit
8f1a212b52
@ -21,7 +21,7 @@
|
|||||||
var prototype = new this();
|
var prototype = new this();
|
||||||
initializing = false;
|
initializing = false;
|
||||||
|
|
||||||
// Make a copy of all prototype properies, to prevent reference issues.
|
// Make a copy of all prototype properties, to prevent reference issues.
|
||||||
for (var name in prototype) {
|
for (var name in prototype) {
|
||||||
prototype[name] = cloneObject(prototype[name]);
|
prototype[name] = cloneObject(prototype[name]);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
var Loader = (function() {
|
var Loader = (function() {
|
||||||
|
|
||||||
/* Create helper valiables */
|
/* Create helper variables */
|
||||||
|
|
||||||
var loadedModuleFiles = [];
|
var loadedModuleFiles = [];
|
||||||
var loadedFiles = [];
|
var loadedFiles = [];
|
||||||
@ -55,7 +55,7 @@ var Loader = (function() {
|
|||||||
module.start();
|
module.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notifiy core of loded modules.
|
// Notify core of loaded modules.
|
||||||
MM.modulesStarted(moduleObjects);
|
MM.modulesStarted(moduleObjects);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -104,7 +104,6 @@ var Loader = (function() {
|
|||||||
config: moduleData.config,
|
config: moduleData.config,
|
||||||
classes: (typeof moduleData.classes !== "undefined") ? moduleData.classes + " " + module : module
|
classes: (typeof moduleData.classes !== "undefined") ? moduleData.classes + " " + module : module
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return moduleFiles;
|
return moduleFiles;
|
||||||
@ -138,7 +137,6 @@ var Loader = (function() {
|
|||||||
afterLoad();
|
afterLoad();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* bootstrapModule(module, mObj)
|
/* bootstrapModule(module, mObj)
|
||||||
@ -164,7 +162,6 @@ var Loader = (function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* loadFile(fileName)
|
/* loadFile(fileName)
|
||||||
@ -210,7 +207,6 @@ var Loader = (function() {
|
|||||||
document.getElementsByTagName("head")[0].appendChild(stylesheet);
|
document.getElementsByTagName("head")[0].appendChild(stylesheet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Public Methods */
|
/* Public Methods */
|
||||||
@ -261,5 +257,4 @@ var Loader = (function() {
|
|||||||
loadFile(module.file(fileName), callback);
|
loadFile(module.file(fileName), callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -23,15 +23,14 @@ var WeatherProvider = Class.extend({
|
|||||||
weatherForecastArray: null,
|
weatherForecastArray: null,
|
||||||
fetchedLocationName: null,
|
fetchedLocationName: null,
|
||||||
|
|
||||||
// The following properties will be set automaticly.
|
// The following properties will be set automatically.
|
||||||
// You do not need to overwrite these properties.
|
// You do not need to overwrite these properties.
|
||||||
config: null,
|
config: null,
|
||||||
delegate: null,
|
delegate: null,
|
||||||
providerIdentifier: null,
|
providerIdentifier: null,
|
||||||
|
|
||||||
|
|
||||||
// Weather Provider Methods
|
// Weather Provider Methods
|
||||||
// All the following methods can be overwrited, although most are good as they are.
|
// All the following methods can be overwritten, although most are good as they are.
|
||||||
|
|
||||||
// Called when a weather provider is initialized.
|
// Called when a weather provider is initialized.
|
||||||
init: function(config) {
|
init: function(config) {
|
||||||
@ -51,13 +50,13 @@ var WeatherProvider = Class.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
// This method should start the API request to fetch the current weather.
|
// This method should start the API request to fetch the current weather.
|
||||||
// This method should definetly be overwritten in the provider.
|
// This method should definitely be overwritten in the provider.
|
||||||
fetchCurrentWeather: function() {
|
fetchCurrentWeather: function() {
|
||||||
Log.warn(`Weather provider: ${this.providerName} does not subclass the fetchCurrentWeather method.`);
|
Log.warn(`Weather provider: ${this.providerName} does not subclass the fetchCurrentWeather method.`);
|
||||||
},
|
},
|
||||||
|
|
||||||
// This method should start the API request to fetch the weather forecast.
|
// This method should start the API request to fetch the weather forecast.
|
||||||
// This method should definetly be overwritten in the provider.
|
// This method should definitely be overwritten in the provider.
|
||||||
fetchWeatherForecast: function() {
|
fetchWeatherForecast: function() {
|
||||||
Log.warn(`Weather provider: ${this.providerName} does not subclass the fetchWeatherForecast method.`);
|
Log.warn(`Weather provider: ${this.providerName} does not subclass the fetchWeatherForecast method.`);
|
||||||
},
|
},
|
||||||
@ -103,7 +102,7 @@ var WeatherProvider = Class.extend({
|
|||||||
this.delegate.updateAvailable(this);
|
this.delegate.updateAvailable(this);
|
||||||
},
|
},
|
||||||
|
|
||||||
// A convinience function to make requests. It returns a promise.
|
// A convenience function to make requests. It returns a promise.
|
||||||
fetchData: function(url, method = "GET", data = null) {
|
fetchData: function(url, method = "GET", data = null) {
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
var request = new XMLHttpRequest();
|
var request = new XMLHttpRequest();
|
||||||
|
@ -82,7 +82,7 @@ Module.register("weatherforecast",{
|
|||||||
getTranslations: function() {
|
getTranslations: function() {
|
||||||
// The translations for the default modules are defined in the core translation files.
|
// The translations for the default modules are defined in the core translation files.
|
||||||
// Therefor we can just return false. Otherwise we should have returned a dictionary.
|
// Therefor we can just return false. Otherwise we should have returned a dictionary.
|
||||||
// If you're trying to build yiur own module including translations, check out the documentation.
|
// If you're trying to build your own module including translations, check out the documentation.
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ Module.register("weatherforecast",{
|
|||||||
|
|
||||||
/* updateWeather(compliments)
|
/* updateWeather(compliments)
|
||||||
* Requests new data from openweather.org.
|
* Requests new data from openweather.org.
|
||||||
* Calls processWeather on succesfull response.
|
* Calls processWeather on successful response.
|
||||||
*/
|
*/
|
||||||
updateWeather: function() {
|
updateWeather: function() {
|
||||||
if (this.config.appid === "") {
|
if (this.config.appid === "") {
|
||||||
|
@ -68,7 +68,7 @@ describe("Calendar module", function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Basic auth backward compatibilty configuration: DEPRECATED", function() {
|
describe("Basic auth backward compatibility configuration: DEPRECATED", function() {
|
||||||
before(function() {
|
before(function() {
|
||||||
serverBasicAuth.listen(8012);
|
serverBasicAuth.listen(8012);
|
||||||
// Set config sample for use in test
|
// Set config sample for use in test
|
||||||
|
@ -16,7 +16,7 @@ var basic = auth.basic(
|
|||||||
|
|
||||||
app.use(auth.connect(basic));
|
app.use(auth.connect(basic));
|
||||||
|
|
||||||
// Set directories availables
|
// Set available directories
|
||||||
var directories = ["/tests/configs"];
|
var directories = ["/tests/configs"];
|
||||||
var directory;
|
var directory;
|
||||||
rootPath = path.resolve(__dirname + "/../../");
|
rootPath = path.resolve(__dirname + "/../../");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user