diff -r 2987e5bb830d -r 26c6f8e5d58e www/js/mon_fermenter.js --- a/www/js/mon_fermenter.js Mon Mar 25 20:47:25 2019 +0100 +++ b/www/js/mon_fermenter.js Wed Mar 27 12:50:57 2019 +0100 @@ -334,7 +334,9 @@ { name: 'stage', type: 'string' }, { name: 'beeruuid', type: 'string' }, { name: 'yeast_lo', type: 'float' }, - { name: 'yeast_hi', type: 'float' } + { name: 'yeast_hi', type: 'float' }, + { name: 'webcam_url', type: 'string' }, + { name: 'webcam_light', type: 'int' } ], id: 'record', url: url @@ -467,6 +469,11 @@ $("#Profile2").hide(); $("#status_profile").html(''); } + if (record.online && (record.webcam_url != "")) { + $("#Camera").show(); + } else { + $("#Camera").hide(); + } yl = record.yeast_lo; yh = record.yeast_hi; @@ -675,5 +682,10 @@ var url="log_fermentation.php?code=" + record.beercode + "&name=" + record.beername; window.open(url); }); + $("#Camera").jqxButton({ template: "primary", width: '150px', theme: theme }); + $("#Camera").click(function () { + var url=record.webcam_url; + window.open(url); + }); createAbortElements(); });