Merge pull request #437 from andyipod1437/develop

Able to turn off and on the date display the clock module.
This commit is contained in:
Michael Teeuw 2016-09-11 21:16:07 +02:00 committed by GitHub
commit 864e3c7a50
3 changed files with 13 additions and 2 deletions

View File

@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included).
- Added CII Badge (we are compliant with the CII Best Practices)
- Add support for doing http basic auth when loading calendars
- Add the abilty to turn off and on the date display in the Clock Module
### Fixed
- Fix typo in installer.

View File

@ -66,6 +66,13 @@ The following properties can be configured:
<br><b>Default value:</b> <code>false</code>
</td>
</tr>
<tr>
<td><code>showDate</code></td>
<td>Turn off or on the Date section.<br>
<br><b>Possible values:</b> <code>true</code> or <code>false</code>
<br><b>Default value:</b> <code>true</code>
</td>
</tr>
<tr>
<td><code>displayType</code></td>
<td>Display a digital clock, analog clock, or both together.<br>
@ -109,4 +116,4 @@ The following properties can be configured:
</td>
</tr>
</tbody>
</table>
</table>

View File

@ -15,6 +15,7 @@ Module.register("clock",{
showPeriod: true,
showPeriodUpper: false,
clockBold: false,
showDate: true,
/* specific to the analog clock */
analogSize: '200px',
@ -85,7 +86,9 @@ Module.register("clock",{
timeString = moment().format("h:mm");
}
}
if(this.config.showDate){
dateWrapper.innerHTML = moment().format("dddd, LL");
}
timeWrapper.innerHTML = timeString;
secondsWrapper.innerHTML = moment().format("ss");
if (this.config.showPeriodUpper) {
@ -224,4 +227,4 @@ Module.register("clock",{
// Return the wrapper to the dom.
return wrapper;
}
});
});