From 62e4e13f5af24774049dadd8f622ad878cf1edae Mon Sep 17 00:00:00 2001 From: "LAPTOP-KAUR\\race2" Date: Wed, 8 Feb 2017 02:33:03 +0200 Subject: [PATCH 1/3] case correction; added changelog.md entry --- CHANGELOG.md | 2 ++ translations/et.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ae626a6..eaf47b55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add `chai-as-promised` npm module to devDependencies - Basic set of tests for clock module - Run e2e test in Travis +- Estonian Translation. + ### Fixed - Update .gitignore to not ignore default modules folder. diff --git a/translations/et.json b/translations/et.json index 89b31556..2597ed7b 100644 --- a/translations/et.json +++ b/translations/et.json @@ -8,7 +8,7 @@ "EMPTY": "Pole tulevasi sündmuseid.", "N": "Põhi", - "NNE": "PõhiKirre", + "NNE": "Põhikirre", "NE": "Kirre", "ENE": "Idakirre", "E": "Ida", From cbafaf5d5614e255e6a0babf7966e262fcc612bc Mon Sep 17 00:00:00 2001 From: "LAPTOP-KAUR\\race2" Date: Wed, 8 Feb 2017 02:35:09 +0200 Subject: [PATCH 2/3] compliments,js handles remoteFile without default daytimes defined --- CHANGELOG.md | 1 + modules/default/compliments/compliments.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaf47b55..b61657d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Add `anytime` group for Compliments module. +- Compliments module can use remoteFile without default daytime arrays defined - Installer: Use init config.js from config.js.sample. - Switched out `rrule` package for `rrule-alt` and fixes in `ical.js` in order to fix calendar issues. ([#565](https://github.com/MichMich/MagicMirror/issues/565)) - Make mouse events pass through the region fullscreen_above to modules below. diff --git a/modules/default/compliments/compliments.js b/modules/default/compliments/compliments.js index 3cbad1a6..ad3b9e77 100644 --- a/modules/default/compliments/compliments.js +++ b/modules/default/compliments/compliments.js @@ -107,6 +107,8 @@ Module.register("compliments",{ compliments = this.config.compliments.evening; } + if (typeof compliments === 'undefined' ) compliments = new Array(); + if ( this.currentWeatherType in this.config.compliments) { compliments.push.apply(compliments, this.config.compliments[this.currentWeatherType]); } From 90f60f95f77236c2b58e34350781a400fa3ec411 Mon Sep 17 00:00:00 2001 From: "LAPTOP-KAUR\\race2" Date: Wed, 8 Feb 2017 19:29:52 +0200 Subject: [PATCH 3/3] formating fix so that grunt passes --- modules/default/compliments/compliments.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/default/compliments/compliments.js b/modules/default/compliments/compliments.js index ad3b9e77..b9f2011e 100644 --- a/modules/default/compliments/compliments.js +++ b/modules/default/compliments/compliments.js @@ -6,8 +6,7 @@ * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ - -Module.register("compliments",{ +Module.register("compliments", { // Module config defaults. defaults: { @@ -97,7 +96,7 @@ Module.register("compliments",{ */ complimentArray: function() { var hour = moment().hour(); - var compliments = null; + var compliments = null; if (hour >= 3 && hour < 12) { compliments = this.config.compliments.morning; @@ -107,9 +106,11 @@ Module.register("compliments",{ compliments = this.config.compliments.evening; } - if (typeof compliments === 'undefined' ) compliments = new Array(); + if (typeof compliments === "undefined") { + compliments = new Array(); + } - if ( this.currentWeatherType in this.config.compliments) { + if (this.currentWeatherType in this.config.compliments) { compliments.push.apply(compliments, this.config.compliments[this.currentWeatherType]); } @@ -126,7 +127,7 @@ Module.register("compliments",{ var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); xobj.open("GET", this.file(this.config.remoteFile), true); - xobj.onreadystatechange = function () { + xobj.onreadystatechange = function() { if (xobj.readyState == 4 && xobj.status == "200") { callback(xobj.responseText); } @@ -192,4 +193,4 @@ Module.register("compliments",{ } }, -}); +}); \ No newline at end of file