Merge branch 'develop' into tests

This commit is contained in:
Michael Teeuw 2017-01-17 17:22:37 +01:00 committed by GitHub
commit a82fcce734
4 changed files with 11 additions and 2 deletions

View File

@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Installer: Use init config.js from config.js.sample. - Installer: Use init config.js from config.js.sample.
- Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) - Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565))
- Make mouse events pass through the region fullscreen_above to modules below. - Make mouse events pass through the region fullscreen_above to modules below.
- Scaled the splash screen down to make it a bit more subtle.
### Added ### Added
- Add loaded function to modules, providing an async callback. - Add loaded function to modules, providing an async callback.
@ -19,6 +20,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Afrikaans Translation - Afrikaans Translation
- Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM. - Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM.
- Init tests using mocha. - Init tests using mocha.
- Option to use RegExp in Calendar's titleReplace.
### Fixed ### Fixed
- Update .gitignore to not ignore default modules folder. - Update .gitignore to not ignore default modules folder.

View File

@ -360,7 +360,7 @@ Module.register("calendar", {
/* capFirst(string) /* capFirst(string)
* Capitalize the first letter of a string * Capitalize the first letter of a string
* Eeturn capitalized string * Return capitalized string
*/ */
capFirst: function (string) { capFirst: function (string) {
@ -379,6 +379,13 @@ Module.register("calendar", {
titleTransform: function (title) { titleTransform: function (title) {
for (var needle in this.config.titleReplace) { for (var needle in this.config.titleReplace) {
var replacement = this.config.titleReplace[needle]; var replacement = this.config.titleReplace[needle];
var regParts = needle.match(/^\/(.+)\/([gim]*)$/);
if (regParts) {
// the parsed pattern is a regexp.
needle = new RegExp(regParts[1], regParts[2]);
}
title = title.replace(needle, replacement); title = title.replace(needle, replacement);
} }

View File

@ -12,7 +12,6 @@ var CalendarFetcher = require("./calendarfetcher.js");
module.exports = NodeHelper.create({ module.exports = NodeHelper.create({
// Override start method. // Override start method.
start: function() { start: function() {
var self = this;
var events = []; var events = [];
this.fetchers = []; this.fetchers = [];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 36 KiB