Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
671c04f3
Commit
671c04f3
authored
Jan 15, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wow, duplicated domotika.js include!
parent
137c951b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
common.php
Web/htdocs/gui/includes/common.php
+1
-0
combined.min.js
Web/htdocs/gui/js/combined.min.js
+11
-5
domotika.js
Web/htdocs/gui/js/domotika.js
+10
-4
foot.php
Web/htdocs/gui/parts/foot.php
+0
-1
No files found.
Web/htdocs/gui/includes/common.php
View file @
671c04f3
<?
<?
$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__
)
.
"/.."
);
...
...
Web/htdocs/gui/js/combined.min.js
View file @
671c04f3
This diff is collapsed.
Click to expand it.
Web/htdocs/gui/js/domotika.js
View file @
671c04f3
...
@@ -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);
...
...
Web/htdocs/gui/parts/foot.php
View file @
671c04f3
...
@@ -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>
<?
}
?>
<?
}
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment