mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Fix Merge Conflicts
This commit is contained in:
commit
91ca3939b3
@ -53,6 +53,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Updated Norwegian translation.
|
||||
- Added hideLoading option for News Feed module
|
||||
- Added configurable dateFormat to clock module.
|
||||
- Added multiple calendar icon support.
|
||||
|
||||
### Fixed
|
||||
- Update .gitignore to not ignore default modules folder.
|
||||
|
@ -72,7 +72,7 @@ config: {
|
||||
| Option | Description
|
||||
| --------------------- | -----------
|
||||
| `url` | The url of the calendar .ical. This property is required. <br><br> **Possible values:** Any public accessble .ical calendar.
|
||||
| `symbol` | The symbol to show in front of an event. This property is optional. <br><br> **Possible values:** See [Font Awesome](http://fontawesome.io/icons/) website.
|
||||
| `symbol` | The symbol to show in front of an event. This property is optional. <br><br> **Possible values:** See [Font Awesome](http://fontawesome.io/icons/) website. To have multiple symbols you can define them in an array e.g. `["calendar", "plane"]`
|
||||
| `color` | The font color of an event from this calendar. This property should be set if the config is set to colored: true. <br><br> **Possible values:** HEX, RGB or RGBA values (#efefef, rgb(242,242,242), rgba(242,242,242,0.5)).
|
||||
| `repeatingCountTitle` | The count title for yearly repating events in this calendar. <br><br> **Example:** `'Birthday'`
|
||||
| `maximumEntries` | The maximum number of events shown. Overrides global setting. **Possible values:** `0` - `100`
|
||||
|
@ -138,10 +138,20 @@ Module.register("calendar", {
|
||||
|
||||
if (this.config.displaySymbol) {
|
||||
var symbolWrapper = document.createElement("td");
|
||||
symbolWrapper.className = "symbol";
|
||||
symbolWrapper.className = "symbol align-right";
|
||||
var symbols = this.symbolsForUrl(event.url);
|
||||
if(typeof symbols === "string") {
|
||||
symbols = [symbols];
|
||||
}
|
||||
|
||||
for(var i = 0; i < symbols.length; i++) {
|
||||
var symbol = document.createElement("span");
|
||||
symbol.className = "fa fa-" + this.symbolForUrl(event.url);
|
||||
symbol.className = "fa fa-" + symbols[i];
|
||||
if(i > 0){
|
||||
symbol.style.paddingLeft = "5px";
|
||||
}
|
||||
symbolWrapper.appendChild(symbol);
|
||||
}
|
||||
eventWrapper.appendChild(symbolWrapper);
|
||||
}
|
||||
|
||||
@ -331,14 +341,14 @@ Module.register("calendar", {
|
||||
});
|
||||
},
|
||||
|
||||
/* symbolForUrl(url)
|
||||
* Retrieves the symbol for a specific url.
|
||||
/* symbolsForUrl(url)
|
||||
* Retrieves the symbols for a specific url.
|
||||
*
|
||||
* argument url string - Url to look for.
|
||||
*
|
||||
* return string - The Symbol
|
||||
* return string/array - The Symbols
|
||||
*/
|
||||
symbolForUrl: function (url) {
|
||||
symbolsForUrl: function (url) {
|
||||
return this.getCalendarProperty(url, "symbol", this.config.defaultSymbol);
|
||||
},
|
||||
|
||||
@ -376,7 +386,7 @@ Module.register("calendar", {
|
||||
getCalendarProperty: function (url, property, defaultValue) {
|
||||
for (var c in this.config.calendars) {
|
||||
var calendar = this.config.calendars[c];
|
||||
if (calendar.url === url && typeof calendar[property] === "string") {
|
||||
if (calendar.url === url && calendar.hasOwnProperty(property)) {
|
||||
return calendar[property];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user