diff options
Diffstat (limited to 'src/components/HMI/app/view/sdl/TTSPopUp.js')
-rw-r--r-- | src/components/HMI/app/view/sdl/TTSPopUp.js | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/components/HMI/app/view/sdl/TTSPopUp.js b/src/components/HMI/app/view/sdl/TTSPopUp.js index 4fc0c7669..ae45786f5 100644 --- a/src/components/HMI/app/view/sdl/TTSPopUp.js +++ b/src/components/HMI/app/view/sdl/TTSPopUp.js @@ -45,7 +45,9 @@ SDL.TTSPopUp = Em.ContainerView.create( { 'popUp', 'message', 'okButton', - 'timerText' + 'timerText', + 'checkBoxLabel', + 'checkBox' ], requestId: null, @@ -86,6 +88,25 @@ SDL.TTSPopUp = Em.ContainerView.create( { disabledBinding: 'parentView.buttons' }), + checkBoxLabel: SDL.Label.extend({ + + elementId: 'checkBoxLabel', + + classNames: 'checkBoxLabel', + + content: 'Send response' + }), + + checkBox: Em.Checkbox.extend( { + + elementId: 'checkBoxTTS', + + classNames: 'checkBoxTTS', + + checked: true + + }), + timerText: SDL.Label.extend({ elementId: 'timerText', @@ -95,10 +116,11 @@ SDL.TTSPopUp = Em.ContainerView.create( { contentBinding: 'parentView.timerSeconds' }), + + resetTimeout: function () { this.set('timerSeconds', 10); FFW.TTS.OnResetTimeout(this.appID, "TTS.Speak"); - this.appID = null; }, ActivateTTS: function(msg, appID) { @@ -126,9 +148,14 @@ SDL.TTSPopUp = Em.ContainerView.create( { DeactivateTTS: function() { clearInterval(this.timer); this.set('active', false); - this.set('timerSeconds', 10); - SDL.SDLController.TTSResponseHandler(); - FFW.TTS.Stopped(); + this.appID = null; + this.set('timerSeconds', 5); + this.checkBox.set('checked', true); + + if (this.checkBox.checked) { + SDL.SDLController.TTSResponseHandler(); + FFW.TTS.Stopped(); + } }, /** |