Add feature to show date standard using the config for issue #48
This commit is contained in:
parent
1e8e7daa60
commit
5f46a40cf5
|
|
@ -9,6 +9,7 @@
|
||||||
username = password # Add users for Domoboard here. In this case login with username "username" and password "password"
|
username = password # Add users for Domoboard here. In this case login with username "username" and password "password"
|
||||||
[[domoboard]]
|
[[domoboard]]
|
||||||
time = False # True/False: show time in top bar
|
time = False # True/False: show time in top bar
|
||||||
|
date = False # True/False: show date in top bar
|
||||||
google_maps_api_key = X # Google Maps Embed API key
|
google_maps_api_key = X # Google Maps Embed API key
|
||||||
|
|
||||||
# Add Navbar items here. The key is the navbar link name. The first value is the URI name, second value can be any font awesome logo to be displayed.
|
# Add Navbar items here. The key is the navbar link name. The first value is the URI name, second value can be any font awesome logo to be displayed.
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ def configValueExists(value):
|
||||||
|
|
||||||
def validateConfigFormat(config):
|
def validateConfigFormat(config):
|
||||||
requiredSettings = {"general_settings/server": ["url", "flask_url", "user", "password", "secret_key"],
|
requiredSettings = {"general_settings/server": ["url", "flask_url", "user", "password", "secret_key"],
|
||||||
"general_settings/domoboard": ["time"],
|
"general_settings/domoboard": ["time", "date"],
|
||||||
"navbar/menu": [None] }
|
"navbar/menu": [None] }
|
||||||
for sect, fields in requiredSettings.iteritems():
|
for sect, fields in requiredSettings.iteritems():
|
||||||
section = sect.split('/')
|
section = sect.split('/')
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@
|
||||||
|
|
||||||
$('#time-part').html(momentNow.format('HH:mm'));
|
$('#time-part').html(momentNow.format('HH:mm'));
|
||||||
}, 100);
|
}, 100);
|
||||||
|
{% if configValues["domoboard"].get("date") == "True" %}
|
||||||
|
$('#date-part').removeClass('hide_date');
|
||||||
|
$('#date-part').addClass('show_date');
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
$( "#date-part" ).click(function() {
|
$( "#date-part" ).click(function() {
|
||||||
$('#date-part').removeClass('show_date');
|
$('#date-part').removeClass('show_date');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue