mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 12:12:20 +00:00
Merge pull request #1599 from rejas/use_getHeader
Use getHeader instead of data.header
This commit is contained in:
commit
b07c43aa36
@ -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).
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user