Skip to content

Commit

Permalink
#14
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoprestesmachado committed Nov 23, 2016
1 parent ccc2136 commit 84ddb62
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion WebContent/sound-chat/localization/enUs.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ enUs = {
labelButtonSendMessage: "Send message",
labelTyping: "typing ...",
labelTTSRoom: "people in the conversation",
labelTTSTyping: "typing",
labelLoadError: "Could not load data from the server"
};
1 change: 0 additions & 1 deletion WebContent/sound-chat/localization/esEs.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ esEs = {
labelButtonSendMessage: "Enviar mensagem",
labelTyping: "Escribiendo ...",
labelTTSRoom: "personas en la conversación",
labelTTSTyping: "Escribiendo",
labelLoadError: "No se pudo cargar datos del servidor"
};
1 change: 0 additions & 1 deletion WebContent/sound-chat/localization/ptBr.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ ptBr = {
labelButtonSendMessage: "Enviar mensagem",
labelTyping: "Digitando ...",
labelTTSRoom: "pessoas na conversa",
labelTTSTyping: "digitando",
labelLoadError: "Não foi possível carregar dados do servidor"
};
2 changes: 1 addition & 1 deletion WebContent/sound-chat/sound-chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<audio id="audioTyping" src="sounds/typing4.mp3"preload="auto"></audio>

<paper-dialog id="windowLogin" modal="true" opened="true" autoCloseDisabled>
<paper-input id="inputName" label="{{localization.labelInputLogin}}" tabindex="1"></paper-input>
<paper-input id="inputName" on-keydown="enterEvent" label="{{localization.labelInputLogin}}" tabindex="1"></paper-input>
<div class="buttons">
<paper-button id="buttonEnter" tabindex="2">{{localization.labelButtonLogin}}</paper-button>
</div>
Expand Down
11 changes: 10 additions & 1 deletion WebContent/sound-chat/sound-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ Polymer({
}
},

/**
* Enable login with the user press enter/return button in login name field
*/
enterEvent: function(event){
if (event.keyCode === 13){
this.loginAction();
}
},

/**
* Method used to send a message to other users
*/
Expand Down Expand Up @@ -203,7 +212,7 @@ Polymer({
this.updateScroll();

if (this.countTypingMessages == 20){
this.speechMessage.text = data.user + " " + this.localization.labelTTSTyping;
this.speechMessage.text = data.user;
this.playTTS(this.speechMessage, "typing");
this.countTypingMessages--;
}
Expand Down

0 comments on commit 84ddb62

Please sign in to comment.