mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 21:24:29 -04:00
Speech rec fixes
This commit is contained in:
parent
43fc67011e
commit
77a1ad6e04
@ -26,6 +26,8 @@ class BotController extends Controller
|
|||||||
|
|
||||||
public function handleMessage($platform)
|
public function handleMessage($platform)
|
||||||
{
|
{
|
||||||
|
abort(404);
|
||||||
|
|
||||||
$input = Input::all();
|
$input = Input::all();
|
||||||
$botUserId = $input['from']['id'];
|
$botUserId = $input['from']['id'];
|
||||||
|
|
||||||
|
@ -189,6 +189,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
// set timeout onDomReady
|
// set timeout onDomReady
|
||||||
setTimeout(delayedFragmentTargetOffset, 500);
|
setTimeout(delayedFragmentTargetOffset, 500);
|
||||||
|
|
||||||
|
@ -175,8 +175,8 @@
|
|||||||
$('#left-menu-toggle').trigger('click');
|
$('#left-menu-toggle').trigger('click');
|
||||||
});
|
});
|
||||||
|
|
||||||
@if (Utils::isNinja())
|
@if (env('SPEECH_ENABLED'))
|
||||||
Mousetrap.bind('r', function(e) {
|
Mousetrap.bind('v', function(e) {
|
||||||
onMicrophoneClick();
|
onMicrophoneClick();
|
||||||
});
|
});
|
||||||
@endif
|
@endif
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<i id="microphone" class="fa fa-microphone form-control-feedback"
|
<i id="microphone" class="fa fa-microphone form-control-feedback"
|
||||||
title="{{ trans('texts.microphone_help') }}"
|
title="Say "new invoice for [client]" or "show me [client]\'s archived payments""
|
||||||
|
data-toggle="tooltip" data-placement="bottom"
|
||||||
onclick="onMicrophoneClick()" aria-hidden="true"></i>
|
onclick="onMicrophoneClick()" aria-hidden="true"></i>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -125,6 +126,7 @@
|
|||||||
recognition.onend = function() {
|
recognition.onend = function() {
|
||||||
recognizing = false;
|
recognizing = false;
|
||||||
$('.fa-microphone').show();
|
$('.fa-microphone').show();
|
||||||
|
$('#search').val('');
|
||||||
if (ignore_onend) {
|
if (ignore_onend) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -140,6 +142,7 @@
|
|||||||
recognition.onend = null;
|
recognition.onend = null;
|
||||||
recognition.stop();
|
recognition.stop();
|
||||||
$('.fa-microphone').hide();
|
$('.fa-microphone').hide();
|
||||||
|
$('#search').val('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (var i = event.resultIndex; i < event.results.length; ++i) {
|
for (var i = event.resultIndex; i < event.results.length; ++i) {
|
||||||
@ -163,7 +166,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onMicrophoneClick() {
|
function onMicrophoneClick() {
|
||||||
//$('#search').val("");
|
//$('#search').val("find david");
|
||||||
//$('#search-form').submit();
|
//$('#search-form').submit();
|
||||||
//return;
|
//return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user