Sat, 19 Jan 2019 13:58:24 +0100
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
config.status | file | annotate | diff | comparison | revisions | |
configure | file | annotate | diff | comparison | revisions | |
configure.ac | file | annotate | diff | comparison | revisions | |
www/js/mon_fermenter.js | file | annotate | diff | comparison | revisions | |
www/mon_fermenter.php | file | annotate | diff | comparison | revisions |
--- 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"
--- 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"
--- 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)
--- 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(); });
--- 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 @@ </div> <!-- End right side --> </div> + <div id="eventWindow"> + <div> + Bevestig profiel afbreken + </div> + <div> + <div> + Klik "OK" om dit profiel definitief te stoppen. Opnieuw starten begint dan weer bij het begin.<br> + Druk "Cancel" om te sluiten zonder dit profiel te stoppen. + </div> + <div> + <div style="float: right; margin-top: 40px; margin-bottom: 10px;"> + <input type="button" id="delOk" value="OK" style="margin-right: 90px" /> + <input type="button" id="delCancel" value="Cancel" style="margin-right: 80px" /> + </div> + </div> + </div> + </div> + <?php page_footer(); ?>