Fix Merge

This commit is contained in:
Michael Teeuw 2017-03-17 14:16:35 +01:00
commit 15b19925f2
3 changed files with 13 additions and 3 deletions

View File

@ -50,6 +50,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added console warning on startup when deprecated config options are used - Added console warning on startup when deprecated config options are used
- Add option to display temperature unit label to the current weather module - Add option to display temperature unit label to the current weather module
- Added ability to disable wrapping of news items - 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 ### Fixed
- Update .gitignore to not ignore default modules folder. - Update .gitignore to not ignore default modules folder.

View File

@ -65,6 +65,7 @@ The following properties can be configured:
| `showDescription` | Display the description of an item. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false` | `showDescription` | Display the description of an item. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
| `wrapTitle` | Wrap the title of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true` | `wrapTitle` | Wrap the title of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
| `wrapDescription` | Wrap the description of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true` | `wrapDescription` | Wrap the description of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
| `hideLoading` | Hide module instead of showing LOADING status. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
| `reloadInterval` | How often does the content needs to be fetched? (Milliseconds) <br><br> **Possible values:** `1000` - `86400000` <br> **Default value:** `300000` (5 minutes) | `reloadInterval` | How often does the content needs to be fetched? (Milliseconds) <br><br> **Possible values:** `1000` - `86400000` <br> **Default value:** `300000` (5 minutes)
| `updateInterval` | How often do you want to display a new headline? (Milliseconds) <br><br> **Possible values:**`1000` - `60000` <br> **Default value:** `10000` (10 seconds) | `updateInterval` | How often do you want to display a new headline? (Milliseconds) <br><br> **Possible values:**`1000` - `60000` <br> **Default value:** `10000` (10 seconds)
| `animationSpeed` | Speed of the update animation. (Milliseconds) <br><br> **Possible values:**`0` - `5000` <br> **Default value:** `2500` (2.5 seconds) | `animationSpeed` | Speed of the update animation. (Milliseconds) <br><br> **Possible values:**`0` - `5000` <br> **Default value:** `2500` (2.5 seconds)

View File

@ -23,6 +23,7 @@ Module.register("newsfeed",{
showDescription: false, showDescription: false,
wrapTitle: true, wrapTitle: true,
wrapDescription: true, wrapDescription: true,
hideLoading: false,
reloadInterval: 5 * 60 * 1000, // every 5 minutes reloadInterval: 5 * 60 * 1000, // every 5 minutes
updateInterval: 10 * 1000, updateInterval: 10 * 1000,
animationSpeed: 2.5 * 1000, animationSpeed: 2.5 * 1000,
@ -182,11 +183,17 @@ Module.register("newsfeed",{
wrapper.appendChild(fullArticle); wrapper.appendChild(fullArticle);
} }
if (this.config.hideLoading) {
this.show();
}
} else { } else {
wrapper.innerHTML = this.translate("LOADING"); if (this.config.hideLoading) {
wrapper.className = "small dimmed"; this.hide();
} else {
wrapper.innerHTML = this.translate("LOADING");
wrapper.className = "small dimmed";
}
} }
return wrapper; return wrapper;