This commit is contained in:
Vitor de Miranda Henrique
2016-12-09 13:13:04 -08:00
parent b4132f489c
commit c45f4133e0
2 changed files with 3 additions and 2 deletions

View File

@@ -79,6 +79,7 @@ $(function() {
}
self.handleIO = function(data, event){
alert(data.pin + " " + data.value);
$.ajax({
type: "GET",
dataType: "json",

View File

@@ -32,9 +32,9 @@
<th></th>
</tr>
</table>
<h4 data-bind="html: io1Label "> </h4>
<button type="submit" data-bind="click: handleIO.bind($data, 'io1', 'on') , enable: settings.settings.plugins.enclosure.io1Enable && isConnected()" class="btn">Turn on</button>
<p data-bind="html: settings.settings.plugins.enclosure.io1Label"></p>
<button type="submit" data-bind="click: handleIO.bind($data, 'io1', 'on')" class="btn">Turn on</button>
<button type="submit" data-bind="click: handleIO.bind($data, 'io1', 'off'), enable: settings.settings.plugins.enclosure.io1Enable && isConnected()" class="btn">Turn off</button>