diff --git a/CHANGELOG.md b/CHANGELOG.md index c32e4b0c..1001eef6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added console warning on startup when deprecated config options are used - Add option to display temperature unit label to the current weather module - Added ability to disable wrapping of news items +- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION`, `UPDATE_NOTIFICATION_MODULE`, `UPDATE_INFO` to Norwegian translations (`nn` and `nb`). +- Added hideLoading option for News Feed module ### Fixed - Update .gitignore to not ignore default modules folder. diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 7758bb10..9f7b2e7d 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -65,6 +65,7 @@ The following properties can be configured: | `showDescription` | Display the description of an item.

**Possible values:** `true` or `false`
**Default value:** `false` | `wrapTitle` | Wrap the title of the item to multiple lines.

**Possible values:** `true` or `false`
**Default value:** `true` | `wrapDescription` | Wrap the description of the item to multiple lines.

**Possible values:** `true` or `false`
**Default value:** `true` +| `hideLoading` | Hide module instead of showing LOADING status.

**Possible values:** `true` or `false`
**Default value:** `false` | `reloadInterval` | How often does the content needs to be fetched? (Milliseconds)

**Possible values:** `1000` - `86400000`
**Default value:** `300000` (5 minutes) | `updateInterval` | How often do you want to display a new headline? (Milliseconds)

**Possible values:**`1000` - `60000`
**Default value:** `10000` (10 seconds) | `animationSpeed` | Speed of the update animation. (Milliseconds)

**Possible values:**`0` - `5000`
**Default value:** `2500` (2.5 seconds) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 738b3130..5094355e 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -23,6 +23,7 @@ Module.register("newsfeed",{ showDescription: false, wrapTitle: true, wrapDescription: true, + hideLoading: false, reloadInterval: 5 * 60 * 1000, // every 5 minutes updateInterval: 10 * 1000, animationSpeed: 2.5 * 1000, @@ -182,11 +183,17 @@ Module.register("newsfeed",{ wrapper.appendChild(fullArticle); } - + if (this.config.hideLoading) { + this.show(); + } } else { - wrapper.innerHTML = this.translate("LOADING"); - wrapper.className = "small dimmed"; + if (this.config.hideLoading) { + this.hide(); + } else { + wrapper.innerHTML = this.translate("LOADING"); + wrapper.className = "small dimmed"; + } } return wrapper;