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
426ecaed
Commit
426ecaed
authored
Jan 08, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user db speech recognition options
parent
3e3b855c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
6 deletions
+74
-6
85-users.sql
Databases/createdb/85-users.sql
+2
-0
.htaccess
Web/htdocs/gui/.htaccess
+7
-0
settings.php
Web/htdocs/gui/footjs/settings.php
+7
-5
offline.appcache
Web/htdocs/gui/offline.appcache
+1
-1
settings.php
Web/htdocs/gui/pages/settings.php
+29
-0
foot.php
Web/htdocs/gui/parts/foot.php
+28
-0
No files found.
Databases/createdb/85-users.sql
0 → 100644
View file @
426ecaed
ALTER
TABLE
`users`
ADD
`slide`
TINYINT
(
1
)
NOT
NULL
DEFAULT
'0'
,
ADD
`webspeech`
ENUM
(
'no'
,
'touch'
,
'continuous'
)
NOT
NULL
DEFAULT
'touch'
;
ALTER
TABLE
`users`
ADD
`speechlang`
ENUM
(
'en-US'
,
'en-GB'
,
'it-IT'
,
'it-CH'
)
NOT
NULL
DEFAULT
'en-US'
;
Web/htdocs/gui/.htaccess
View file @
426ecaed
...
...
@@ -3,6 +3,13 @@ FallbackResource /domotika/gui/index.php
Order
Deny,Allow
Deny
from
all
</
Files
>
<
Files
offline.appcache
>
Order
Allow,Deny
Allow
from
all
ExpiresActive
On
ExpiresDefault
"access"
</
Files
>
<
FilesMatch
"^(index|install)\.php$"
>
Order
Allow,Deny
...
...
Web/htdocs/gui/footjs/settings.php
View file @
426ecaed
...
...
@@ -10,15 +10,17 @@ var updateUser = function(r) {
$
(
"#desktophome"
).
val
(
r
.
data
.
desktop_homepath
);
$
(
"#mobilehome"
).
val
(
r
.
data
.
mobile_homepath
);
if
(
r
.
data
.
tts
==
1
)
{
$
(
'#tts-switch'
).
bootstrapSwitch
(
'setState'
,
true
);
//$("#tts").attr('checked', true);
}
else
{
$
(
'#tts-switch'
).
bootstrapSwitch
(
'setState'
,
false
);
//$("#tts").attr('checked', false);
}
$
(
"#userform"
).
show
();
if
(
r
.
data
.
slide
==
1
)
$
(
'#slide'
).
bootstrapSwitch
(
'setState'
,
true
);
else
$
(
'#slide'
).
bootstrapSwitch
(
'setState'
,
false
);
$
(
"#lang"
).
val
(
r
.
data
.
language
);
$
(
"#webspeech"
).
val
(
r
.
data
.
webspeech
);
$
(
"#speechlang"
).
val
(
r
.
data
.
speechlang
);
$
(
"#userform"
).
show
();
};
...
...
Web/htdocs/gui/offline.appcache
View file @
426ecaed
CACHE MANIFEST
#
1388875360
#
rev 1388875361
/resources/img/logo_icon.png
NETWORK:
*
Web/htdocs/gui/pages/settings.php
View file @
426ecaed
...
...
@@ -62,6 +62,35 @@
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"slide"
class=
"col-lg-2 control-label"
>
Sliding GUI:
</label>
<div
class=
"col-lg-3"
>
<div
class=
"make-switch switch-mini"
id=
"slide-switch"
data-on-label=
"YES"
data-off-label=
"NO"
>
<input
id=
"slide"
type=
"radio"
name=
"slide"
/>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"lang"
class=
"col-lg-2 control-label"
>
Web Speech rec.:
</label>
<div
class=
"col-lg-3"
>
<select
name=
"webspeech"
id=
"webspeech"
class=
"form-control"
>
<option
value=
"no"
>
no
</option>
<option
value=
"touch"
>
touch
</option>
<option
value=
"continuous"
>
continuous
</option>
</select>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"lang"
class=
"col-lg-2 control-label"
>
Speech lang:
</label>
<div
class=
"col-lg-3"
>
<select
name=
"speechlang"
id=
"speechlang"
class=
"form-control"
>
<option
value=
"en-US"
>
US English
</option>
<option
value=
"en-GB"
>
UK English
</option>
<option
value=
"it-IT"
>
IT Italiano
</option>
<option
value=
"it-CH"
>
CH Italiano
</option>
</select>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"mobilehome"
class=
"col-lg-2 control-label"
></label>
<div
class=
"col-lg-3"
>
...
...
Web/htdocs/gui/parts/foot.php
View file @
426ecaed
...
...
@@ -25,6 +25,7 @@
<script src="/resources/EventSource/eventsource.js"></script>
*/
?>
<script
src=
"
<?=
$BASEGUIPATH
;
?>
/js/combined.min.js"
></script>
<!-- <script src="//cdnjs.cloudflare.com/ajax/libs/annyang/1.0.0/annyang.min.js"></script> -->
<script>
//document.documentElement.requestFullscreen();
...
...
@@ -41,12 +42,17 @@
function
tmpPopover
(
el
,
cont
,
placement
,
timeout
)
{
console
.
debug
(
cont
);
//el.popover("destroy");
el
.
popover
({
placement
:
placement
,
content
:
cont
,
delay
:
{
show
:
100
,
hide
:
timeout
},
container
:
el
,
trigger
:
"manual"
});
console
.
debug
(
el
.
popover
);
el
.
popover
(
"show"
);
el
.
find
(
".popover-content"
).
html
(
cont
);
setTimeout
(
function
(){
el
.
popover
(
"destroy"
)},
timeout
);
}
...
...
@@ -80,6 +86,24 @@
$
.
post
(
"/rest/v1.2/actions/speech_text/json"
,
spobj
.
serialize
(),
speechResult
);
}
/*
// Test SpeechAPI
function setSpeechText(terms)
{
$("#speech [name=text]").val(terms);
$("#speechsm [name=text]").val(terms);
console.debug("SpeechRecognized: "+terms)
sendSpeech($("#speech"));
}
var commands = {
'domotica *terms': setSpeechText
};
annyang.init(commands);
annyang.setLanguage('it-IT')
annyang.start();
*/
var
popupFader
=
function
(
ftype
,
title
,
message
,
timeout
){
if
(
typeof
(
timeout
)
===
'undefined'
)
timeout
=
1500
;
$
(
"#alertTitle"
).
text
(
title
);
...
...
@@ -407,6 +431,10 @@
function
(
r
){
console
.
debug
(
r
);
console
.
debug
(
"getok"
);
//if('vibrate' in navigator) {
// // ... vibrate for a second
// navigator.vibrate(1000);
//}
if
(
r
.
data
==
'SLOGGEDOUT'
)
{
location
.
reload
();
...
...
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