mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 17:04:45 -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)
|
||||
{
|
||||
abort(404);
|
||||
|
||||
$input = Input::all();
|
||||
$botUserId = $input['from']['id'];
|
||||
|
||||
|
@ -189,6 +189,8 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
// set timeout onDomReady
|
||||
setTimeout(delayedFragmentTargetOffset, 500);
|
||||
|
||||
|
@ -175,8 +175,8 @@
|
||||
$('#left-menu-toggle').trigger('click');
|
||||
});
|
||||
|
||||
@if (Utils::isNinja())
|
||||
Mousetrap.bind('r', function(e) {
|
||||
@if (env('SPEECH_ENABLED'))
|
||||
Mousetrap.bind('v', function(e) {
|
||||
onMicrophoneClick();
|
||||
});
|
||||
@endif
|
||||
|
@ -1,5 +1,6 @@
|
||||
<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>
|
||||
|
||||
<style type="text/css">
|
||||
@ -125,6 +126,7 @@
|
||||
recognition.onend = function() {
|
||||
recognizing = false;
|
||||
$('.fa-microphone').show();
|
||||
$('#search').val('');
|
||||
if (ignore_onend) {
|
||||
return;
|
||||
}
|
||||
@ -140,6 +142,7 @@
|
||||
recognition.onend = null;
|
||||
recognition.stop();
|
||||
$('.fa-microphone').hide();
|
||||
$('#search').val('');
|
||||
return;
|
||||
}
|
||||
for (var i = event.resultIndex; i < event.results.length; ++i) {
|
||||
@ -163,7 +166,7 @@
|
||||
}
|
||||
|
||||
function onMicrophoneClick() {
|
||||
//$('#search').val("");
|
||||
//$('#search').val("find david");
|
||||
//$('#search-form').submit();
|
||||
//return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user