diff --git a/.gitignore b/.gitignore
index 9b851b18..5733c750 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,9 @@ jspm_modules
# Visual Studio Code ignoramuses.
.vscode/
+# IDE Code ignoramuses.
+.idea/
+
# Various Windows ignoramuses.
Thumbs.db
ehthumbs.db
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 659dd6ca..df168e3e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added option for new display format in the calendar module with date headers with times/events below.
- Ability to fetch compliments from a remote server
- Add regex filtering to calendar module
+- Customize classes for table
### Changed
- Upgrade to Electron 2.0.0.
diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md
index e63f95b2..ae516a63 100755
--- a/modules/default/calendar/README.md
+++ b/modules/default/calendar/README.md
@@ -34,9 +34,10 @@ The following properties can be configured:
| `maxTitleLength` | The maximum title length.
**Possible values:** `10` - `50`
**Default value:** `25`
| `wrapEvents` | Wrap event titles to multiple lines. Breaks lines at the length defined by `maxTitleLength`.
**Possible values:** `true` or `false`
**Default value:** `false`
| `fetchInterval` | How often does the content needs to be fetched? (Milliseconds)
**Possible values:** `1000` - `86400000`
**Default value:** `300000` (5 minutes)
-| `animationSpeed` | Speed of the update animation. (Milliseconds)
**Possible values:**`0` - `5000`
**Default value:** `2000` (2 seconds)
+| `animationSpeed` | Speed of the update animation. (Milliseconds)
**Possible values:** `0` - `5000`
**Default value:** `2000` (2 seconds)
| `fade` | Fade the future events to black. (Gradient)
**Possible values:** `true` or `false`
**Default value:** `true`
| `fadePoint` | Where to start fade?
**Possible values:** `0` (top of the list) - `1` (bottom of list)
**Default value:** `0.25`
+| `tableClass` | Name of the classes issued from `main.css`.
**Possible values:** xsmall, small, medium, large, xlarge.
**Default value:** _small._
| `calendars` | The list of calendars.
**Possible values:** An array, see _calendar configuration_ below.
**Default value:** _An example calendar._
| `titleReplace` | An object of textual replacements applied to the tile of the event. This allow to remove or replace certains words in the title.
**Example:** `{'Birthday of ' : '', 'foo':'bar'}`
**Default value:** `{ "De verjaardag van ": "", "'s birthday": "" }`
| `displayRepeatingCountTitle` | Show count title for yearly repeating events (e.g. "X. Birthday", "X. Anniversary")
**Possible values:** `true` or `false`
**Default value:** `false`
diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js
index 3f87b9e2..0780fb5c 100755
--- a/modules/default/calendar/calendar.js
+++ b/modules/default/calendar/calendar.js
@@ -32,6 +32,7 @@ Module.register("calendar", {
hideOngoing: false,
colored: false,
coloredSymbolOnly: false,
+ tableClass: "small",
calendars: [
{
symbol: "calendar",
@@ -124,11 +125,11 @@ Module.register("calendar", {
var events = this.createEventList();
var wrapper = document.createElement("table");
- wrapper.className = "small";
+ wrapper.className = this.config.tableClass;
if (events.length === 0) {
wrapper.innerHTML = (this.loaded) ? this.translate("EMPTY") : this.translate("LOADING");
- wrapper.className = "small dimmed";
+ wrapper.className = this.config.tableClass + " dimmed";
return wrapper;
}
@@ -154,7 +155,6 @@ Module.register("calendar", {
}
-
var eventWrapper = document.createElement("tr");
if (this.config.colored && !this.config.coloredSymbolOnly) {
diff --git a/modules/default/weatherforecast/README.md b/modules/default/weatherforecast/README.md
index ccf81b0f..a487734f 100644
--- a/modules/default/weatherforecast/README.md
+++ b/modules/default/weatherforecast/README.md
@@ -35,7 +35,7 @@ The following properties can be configured:
| `maxNumberOfDays` | How many days of forecast to return. Specified by config.js
**Possible values:** `1` - `16`
**Default value:** `7` (7 days)
This value is optional. By default the weatherforecast module will return 7 days.
| `showRainAmount` | Should the predicted rain amount be displayed?
**Possible values:** `true` or `false`
**Default value:** `false`
This value is optional. By default the weatherforecast module will not display the predicted amount of rain.
| `updateInterval` | How often does the content needs to be fetched? (Milliseconds)
**Possible values:** `1000` - `86400000`
**Default value:** `600000` (10 minutes)
-| `animationSpeed` | Speed of the update animation. (Milliseconds)
**Possible values:**`0` - `5000`
**Default value:** `1000` (1 second)
+| `animationSpeed` | Speed of the update animation. (Milliseconds)
**Possible values:** `0` - `5000`
**Default value:** `1000` (1 second)
| `lang` | The language of the days.
**Possible values:** `en`, `nl`, `ru`, etc ...
**Default value:** uses value of _config.language_
| `decimalSymbol` | The decimal symbol to use.
**Possible values:** `.`, `,` or any other symbol.
**Default value:** `.`
| `fade` | Fade the future events to black. (Gradient)
**Possible values:** `true` or `false`
**Default value:** `true`
@@ -47,6 +47,7 @@ The following properties can be configured:
| `forecastEndpoint` | The OpenWeatherMap API endPoint.
**Default value:** `'forecast/daily'`
| `appendLocationNameToHeader` | If set to `true`, the returned location name will be appended to the header of the module, if the header is enabled. This is mainly intresting when using calender based weather.
**Default value:** `true`
| `calendarClass` | The class for the calender module to base the event based weather information on.
**Default value:** `'calendar'`
+| `tableClass` | Name of the classes issued from `main.css`.
**Possible values:** xsmall, small, medium, large, xlarge.
**Default value:** _small._
| `iconTable` | The conversion table to convert the weather conditions to weather-icons.
**Default value:** view table below
`colored` | If set 'colored' to true the min-temp get a blue tone and the max-temp get a red tone.
**Default value:** `'false'`
diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js
index ea34afb9..c16759ef 100644
--- a/modules/default/weatherforecast/weatherforecast.js
+++ b/modules/default/weatherforecast/weatherforecast.js
@@ -36,6 +36,7 @@ Module.register("weatherforecast",{
appendLocationNameToHeader: true,
calendarClass: "calendar",
+ tableClass: "small",
roundTemp: false,
@@ -117,7 +118,7 @@ Module.register("weatherforecast",{
}
var table = document.createElement("table");
- table.className = "small";
+ table.className = this.config.tableClass;
for (var f in this.forecast) {
var forecast = this.forecast[f];