Commit 671c04f3 authored by nextime's avatar nextime

Wow, duplicated domotika.js include!

parent 137c951b
<? <?
$GUIDEBUG=FALSE; $GUIDEBUG=FALSE;
//$GUIDEBUG=TRUE;
$BASEGUIPATH=str_replace("/index.php","",$_SERVER['PHP_SELF']); $BASEGUIPATH=str_replace("/index.php","",$_SERVER['PHP_SELF']);
$FSPATH=realpath(dirname(__FILE__)."/.."); $FSPATH=realpath(dirname(__FILE__)."/..");
......
This diff is collapsed.
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
function sendSpeech(spobj) function sendSpeech(spobj)
{ {
console.debug(spobj.serialize());
$.post("/rest/v1.2/actions/speech_text/json", spobj.serialize(), speechResult ); $.post("/rest/v1.2/actions/speech_text/json", spobj.serialize(), speechResult );
} }
...@@ -84,6 +85,7 @@ ...@@ -84,6 +85,7 @@
function setSpeechText(terms) function setSpeechText(terms)
{ {
// XXX Sistema sta cosa!
$("#speech [name=text]").val(terms); $("#speech [name=text]").val(terms);
$("#speechsm [name=text]").val(terms); $("#speechsm [name=text]").val(terms);
console.debug("SpeechRecognized: "+terms) console.debug("SpeechRecognized: "+terms)
...@@ -231,18 +233,22 @@ ...@@ -231,18 +233,22 @@
$('#speech').bind('webkitspeechchange',function(event) { $('#speech').bind('webkitspeechchange',function(event) {
event.preventDefault(); event.preventDefault();
console.debug("AAAA");
sendSpeech($("#speech")); sendSpeech($("#speech"));
}); });
$('#speechsm').bind('webkitspeechchange',function(event) { $('#speechsm').bind('webkitspeechchange',function(event) {
event.preventDefault(); event.preventDefault();
sendSpeech($("#speech")); console.debug("BBBBB");
sendSpeech($("#speechsm"));
}); });
$("#speech").keypress(function(event) { $("#speech").keypress(function(event) {
var keycode = (event.keyCode ? event.keyCode : event.which); var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == 13) { if(keycode == 13) {
event.preventDefault(); event.preventDefault();
console.debug("CCCC");
console.debug($("#speech"));
sendSpeech($("#speech")); sendSpeech($("#speech"));
} }
}); });
...@@ -436,11 +442,11 @@ ...@@ -436,11 +442,11 @@
setInterval(function(i){ setInterval(function(i){
console.debug("setinterval"); //console.debug("setinterval");
$.get("/rest/v1.2/keepalive/json", $.get("/rest/v1.2/keepalive/json",
function(r){ function(r){
console.debug(r); //console.debug(r);
console.debug("getok"); //console.debug("getok");
//if('vibrate' in navigator) { //if('vibrate' in navigator) {
// // ... vibrate for a second // // ... vibrate for a second
// navigator.vibrate(1000); // navigator.vibrate(1000);
......
...@@ -29,5 +29,4 @@ ...@@ -29,5 +29,4 @@
<script src="<?=$BASEGUIPATH;?>/js/domotika.js"></script> <script src="<?=$BASEGUIPATH;?>/js/domotika.js"></script>
<? } else { ?> <? } else { ?>
<script src="<?=$BASEGUIPATH;?>/js/combined.min.js"></script> <script src="<?=$BASEGUIPATH;?>/js/combined.min.js"></script>
<script src="<?=$BASEGUIPATH;?>/js/domotika.js"></script>
<? } ?> <? } ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment