From f468dbf4271204685bdfaef5d433fa4ed9b5b18e Mon Sep 17 00:00:00 2001 From: Andrew Chumchal Date: Sun, 11 Sep 2016 08:04:33 -0700 Subject: [PATCH 1/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e787e90..65239356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. From 747e1a818d36a0c831207d2f9f5f81c336391dd8 Mon Sep 17 00:00:00 2001 From: Andrew Chumchal Date: Sun, 11 Sep 2016 08:14:28 -0700 Subject: [PATCH 2/2] Able to turn off and on the clock module --- modules/default/clock/README.md | 9 ++++++++- modules/default/clock/clock.js | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/default/clock/README.md b/modules/default/clock/README.md index c7ec6bcb..6eca1efb 100644 --- a/modules/default/clock/README.md +++ b/modules/default/clock/README.md @@ -66,6 +66,13 @@ The following properties can be configured:
Default value: false + + showDate + Turn off or on the Date section.
+
Possible values: true or false +
Default value: true + + displayType Display a digital clock, analog clock, or both together.
@@ -109,4 +116,4 @@ The following properties can be configured: - + \ No newline at end of file diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index e3415375..db41d7e0 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -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; } -}); +}); \ No newline at end of file