# HG changeset patch # User Michiel Broek # Date 1547902704 -3600 # Node ID fd1d7225ca6e4b540d3ff4bf66874ec36f74eade # Parent 77bbfdaa22e956fbd121d1afef6f1ffd6ea72461 Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons. diff -r 77bbfdaa22e9 -r fd1d7225ca6e config.status --- a/config.status Sat Jan 19 12:12:12 2019 +0100 +++ b/config.status Sat Jan 19 13:58:24 2019 +0100 @@ -619,9 +619,9 @@ S["CFLAGS"]="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline -I/usr/include/libxml2 -I/usr/include/u"\ "uid" S["CC"]="gcc" -S["CYEARS"]="2016-2018" -S["COPYRIGHT"]="Copyright (C) 2016-2018 Michiel Broek, All Rights Reserved" -S["VERSION"]="0.0.3" +S["CYEARS"]="2016-2019" +S["COPYRIGHT"]="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved" +S["VERSION"]="0.0.4" S["PACKAGE"]="bms" S["SUBDIRS"]="bmsd doc tools www" S["target_alias"]="" @@ -709,8 +709,8 @@ D["PACKAGE_STRING"]=" \"\"" D["PACKAGE_BUGREPORT"]=" \"\"" D["PACKAGE_URL"]=" \"\"" -D["VERSION"]=" \"0.0.3\"" -D["COPYRIGHT"]=" \"Copyright (C) 2016-2018 Michiel Broek, All Rights Reserved\"" +D["VERSION"]=" \"0.0.4\"" +D["COPYRIGHT"]=" \"Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved\"" D["STDC_HEADERS"]=" 1" D["HAVE_SYS_TYPES_H"]=" 1" D["HAVE_SYS_STAT_H"]=" 1" diff -r 77bbfdaa22e9 -r fd1d7225ca6e configure --- a/configure Sat Jan 19 12:12:12 2019 +0100 +++ b/configure Sat Jan 19 13:58:24 2019 +0100 @@ -2031,9 +2031,9 @@ PACKAGE="bms" -VERSION="0.0.3" -COPYRIGHT="Copyright (C) 2016-2018 Michiel Broek, All Rights Reserved" -CYEARS="2016-2018" +VERSION="0.0.4" +COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved" +CYEARS="2016-2019" diff -r 77bbfdaa22e9 -r fd1d7225ca6e configure.ac --- a/configure.ac Sat Jan 19 12:12:12 2019 +0100 +++ b/configure.ac Sat Jan 19 13:58:24 2019 +0100 @@ -8,9 +8,9 @@ dnl General settings dnl After changeing the version number, run autoconf! PACKAGE="bms" -VERSION="0.0.3" -COPYRIGHT="Copyright (C) 2016-2018 Michiel Broek, All Rights Reserved" -CYEARS="2016-2018" +VERSION="0.0.4" +COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved" +CYEARS="2016-2019" AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(COPYRIGHT) diff -r 77bbfdaa22e9 -r fd1d7225ca6e www/js/mon_fermenter.js --- a/www/js/mon_fermenter.js Sat Jan 19 12:12:12 2019 +0100 +++ b/www/js/mon_fermenter.js Sat Jan 19 13:58:24 2019 +0100 @@ -20,6 +20,26 @@ * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *****************************************************************************/ +function createAbortElements() { + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 440, y: 210 }, + width: 400, + height: 200, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function () { + $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); +} + $(document).ready(function () { @@ -167,6 +187,8 @@ var switchoptions = { height: 68, width: 35, + onLabel:'AAN', + offLabel:'UIT', theme: theme, thumbSize:'50%', orientation: 'vertical' @@ -612,8 +634,12 @@ ppayload = '{"profile":{"command":"start"}}'; newProfile = true; } else if ((record.profile_state == "RUN") || (record.profile_state == "PAUSE")) { - ppayload = '{"profile":{"command":"abort"}}'; - newProfile = true; + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $("#delOk").click(function () { + ppayload = '{"profile":{"command":"abort"}}'; + newProfile = true; + }); } else if (record.profile_state == "DONE") { ppayload = '{"profile":{"command":"done"}}'; newProfile = true; @@ -635,4 +661,5 @@ var url="log_fermentation.php?code=" + record.beercode + "&name=" + record.beername; window.open(url); }); + createAbortElements(); }); diff -r 77bbfdaa22e9 -r fd1d7225ca6e www/mon_fermenter.php --- a/www/mon_fermenter.php Sat Jan 19 12:12:12 2019 +0100 +++ b/www/mon_fermenter.php Sat Jan 19 13:58:24 2019 +0100 @@ -85,6 +85,24 @@ +
+
+ Bevestig profiel afbreken +
+
+
+ Klik "OK" om dit profiel definitief te stoppen. Opnieuw starten begint dan weer bij het begin.
+ Druk "Cancel" om te sluiten zonder dit profiel te stoppen. +
+
+
+ + +
+
+
+
+