From de4554ce5a148d8b6f326f292483369d600f93e1 Mon Sep 17 00:00:00 2001 From: Michael Scherle Date: Fri, 20 Jan 2017 15:19:58 +0100 Subject: frontend: added 4 state for pcs --- .../locationinfo/frontend/doorsign.html | 14 +++++- .../locationinfo/frontend/img/pc_defect.svg | 48 ++++++++++++--------- .../locationinfo/frontend/img/pc_off.svg | 50 ++++++++++++++++++++++ .../locationinfo/frontend/img/pc_off_eink.svg | 50 ++++++++++++++++++++++ 4 files changed, 140 insertions(+), 22 deletions(-) create mode 100644 modules-available/locationinfo/frontend/img/pc_off.svg create mode 100644 modules-available/locationinfo/frontend/img/pc_off_eink.svg (limited to 'modules-available') diff --git a/modules-available/locationinfo/frontend/doorsign.html b/modules-available/locationinfo/frontend/doorsign.html index d95ccbb6..44f7e495 100755 --- a/modules-available/locationinfo/frontend/doorsign.html +++ b/modules-available/locationinfo/frontend/doorsign.html @@ -1166,27 +1166,37 @@ optional: if (imgobj != null) { var img; + // Pc free if (update[i].pcState == "0") { - //add time to prevent caching if (supportSvg) { img = "img/pc_free"; } else { imgobj.style.backgroundColor = "green"; } freePcs++; + // Pc in use } else if (update[i].pcState == "1") { if (supportSvg) { img = "img/pc_used"; } else { imgobj.style.backgroundColor = "red"; } - } else { + // PC off + } else if(update[i].pcState == "2"){ + if (supportSvg) { + img = "img/pc_off"; + } else { + imgobj.style.backgroundColor = "black"; + } + freePcs++; + }else { if (supportSvg) { img = "img/pc_defect"; } else { imgobj.style.backgroundColor = "black"; } } + if (imgobj != null && supportSvg) { if (eInkMode) { img = img + "_eink"; diff --git a/modules-available/locationinfo/frontend/img/pc_defect.svg b/modules-available/locationinfo/frontend/img/pc_defect.svg index 9a98f7b5..219175e2 100644 --- a/modules-available/locationinfo/frontend/img/pc_defect.svg +++ b/modules-available/locationinfo/frontend/img/pc_defect.svg @@ -1,50 +1,58 @@ + viewBox="-184 310.3 241.8 172.7" style="enable-background:new -184 310.3 241.8 172.7;" xml:space="preserve"> - - + + - - + + - + - + - - + + - + - + - + + + + + + diff --git a/modules-available/locationinfo/frontend/img/pc_off.svg b/modules-available/locationinfo/frontend/img/pc_off.svg new file mode 100644 index 00000000..9a98f7b5 --- /dev/null +++ b/modules-available/locationinfo/frontend/img/pc_off.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules-available/locationinfo/frontend/img/pc_off_eink.svg b/modules-available/locationinfo/frontend/img/pc_off_eink.svg new file mode 100644 index 00000000..9a98f7b5 --- /dev/null +++ b/modules-available/locationinfo/frontend/img/pc_off_eink.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-55-g7522