Merge pull request #1599 from rejas/use_getHeader

Use getHeader instead of data.header
This commit is contained in:
Michael Teeuw 2019-03-18 16:04:45 +01:00 committed by GitHub
commit b07c43aa36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -38,6 +38,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Fix null dereference in moduleNeedsUpdate when the module isn't visible - Fix null dereference in moduleNeedsUpdate when the module isn't visible
- Calendar: Fixed event end times by setting default calendarEndTime to "LT" (Local time format). [#1479] - Calendar: Fixed event end times by setting default calendarEndTime to "LT" (Local time format). [#1479]
- Calendar: Fixed missing calendar fetchers after server process restarts [#1589](https://github.com/MichMich/MagicMirror/issues/1589) - Calendar: Fixed missing calendar fetchers after server process restarts [#1589](https://github.com/MichMich/MagicMirror/issues/1589)
- Use getHeader instead of data.header when creating the DOM so overwriting the function also propagates into it
### New weather module ### New weather module
- Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499). - Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499).

View File

@ -39,9 +39,9 @@ var MM = (function() {
dom.opacity = 0; dom.opacity = 0;
wrapper.appendChild(dom); wrapper.appendChild(dom);
if (typeof module.data.header !== "undefined" && module.data.header !== "") { if (typeof module.getHeader() !== "undefined" && module.getHeader() !== "") {
var moduleHeader = document.createElement("header"); var moduleHeader = document.createElement("header");
moduleHeader.innerHTML = module.data.header; moduleHeader.innerHTML = module.getHeader();
moduleHeader.className = "module-header"; moduleHeader.className = "module-header";
dom.appendChild(moduleHeader); dom.appendChild(moduleHeader);
} }

View File

@ -212,7 +212,7 @@ var Module = Class.extend({
/* setData(data) /* setData(data)
* Set the module data. * Set the module data.
* *
* argument data obejct - Module data. * argument data object - Module data.
*/ */
setData: function (data) { setData: function (data) {
this.data = data; this.data = data;
@ -226,7 +226,7 @@ var Module = Class.extend({
/* setConfig(config) /* setConfig(config)
* Set the module config and combine it with the module defaults. * Set the module config and combine it with the module defaults.
* *
* argument config obejct - Module config. * argument config object - Module config.
*/ */
setConfig: function (config) { setConfig: function (config) {
this.config = Object.assign({}, this.defaults, config); this.config = Object.assign({}, this.defaults, config);

View File

@ -273,7 +273,7 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri
/* isFullDayEvent(event) /* isFullDayEvent(event)
* Checks if an event is a fullday event. * Checks if an event is a fullday event.
* *
* argument event obejct - The event object to check. * argument event object - The event object to check.
* *
* return bool - The event is a fullday event. * return bool - The event is a fullday event.
*/ */