Termostatic radiator head Preparation #Feature
This commit is contained in:
		@@ -85,5 +85,23 @@
 | 
			
		||||
	$partial = new Partial('footer');
 | 
			
		||||
	$partial->render();
 | 
			
		||||
	?>
 | 
			
		||||
	<script>
 | 
			
		||||
		$(document).on('keyup mouseup', '#value_control', function(event) { 					
 | 
			
		||||
			$.ajax({
 | 
			
		||||
				url: 'ajax',
 | 
			
		||||
				type: 'POST',
 | 
			
		||||
				//TODO: GET Attribute from ID
 | 
			
		||||
				data: { subDevice_id : '46', action : 'set', value: this.value},
 | 
			
		||||
				success: function(msg){
 | 
			
		||||
					console.log("message");
 | 
			
		||||
					console.log(msg);
 | 
			
		||||
				},
 | 
			
		||||
				error: function (request, status, error) {
 | 
			
		||||
					console.log('0');
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			console.log(this.value);
 | 
			
		||||
		});	
 | 
			
		||||
	</script>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,7 @@ function ajaxPostSimple(path, params, reload = false) {
 | 
			
		||||
        type: 'POST',
 | 
			
		||||
        data: params,
 | 
			
		||||
        success: function(msg){
 | 
			
		||||
            console.log("message");
 | 
			
		||||
            console.log(msg);
 | 
			
		||||
            if (reload){
 | 
			
		||||
                location.reload();
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,17 @@ if ($SUBDEVICE['type'] == 'on/off') {
 | 
			
		||||
						<h5 unselectable="on" class="fa">&#x<?php echo $DEVICE['icon'] ?></h5>
 | 
			
		||||
					</div>
 | 
			
		||||
					<div class="col">
 | 
			
		||||
					<?php if ($SUBDEVICE['type'] == 'temp_cont') { ?>
 | 
			
		||||
						<input type="number" step="5" class="device-button-value text-right" id="value_control" value="<?php echo $SUBDEVICE['lastRecort']['value'] ?>"><?php echo $SUBDEVICE['unit']?>
 | 
			
		||||
						<style>
 | 
			
		||||
							input.device-button-value.text-right {
 | 
			
		||||
    							width: inherit;
 | 
			
		||||
							}
 | 
			
		||||
						</style>
 | 
			
		||||
					
 | 
			
		||||
					<?php } else { ?>
 | 
			
		||||
						<h5 unselectable="on" class="device-button-value text-right" title="<?php echo $SUBDEVICE['lastRecort']['time']; ?>"><?php echo $SUBDEVICE['lastRecort']['value'] . $SUBDEVICE['unit']?></h5>
 | 
			
		||||
					<?php } ?>	
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="row">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user