From 0982de22827a462f1b026d3b07f9d58288ffbf2e Mon Sep 17 00:00:00 2001 From: Rodrigo Ferreira de Souza Date: Thu, 16 Jun 2016 11:21:04 -0300 Subject: [PATCH] Use tag button instead of input button --- .../texttospeech/browser/templates/texttospeech.pt | 12 ++++++------ src/collective/texttospeech/static/main.js | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/collective/texttospeech/browser/templates/texttospeech.pt b/src/collective/texttospeech/browser/templates/texttospeech.pt index db1abb2..5ff797a 100644 --- a/src/collective/texttospeech/browser/templates/texttospeech.pt +++ b/src/collective/texttospeech/browser/templates/texttospeech.pt @@ -1,8 +1,8 @@
- + i18n:attributes="title" + i18n:translate="">Listen
diff --git a/src/collective/texttospeech/static/main.js b/src/collective/texttospeech/static/main.js index bd7ec0b..2bf7819 100644 --- a/src/collective/texttospeech/static/main.js +++ b/src/collective/texttospeech/static/main.js @@ -14,23 +14,23 @@ var MainView = (function() { MainView.prototype.onstart = function() { this.playing = true; this.paused = false; - this.$button.attr('value', this.label_playing); + this.$button.html(this.label_playing); }; MainView.prototype.onend = function() { this.playing = false; this.paused = true; - this.$button.attr('value', this.label_stopped); + this.$button.html(this.label_stopped); }; MainView.prototype.play_pause = function(e) { e.preventDefault(); if (this.playing) { if (this.paused) { this.paused = false; - this.$button.attr('value', this.label_playing); + this.$button.html(this.label_playing); responsiveVoice.resume(); } else { this.paused = true; - this.$button.attr('value', this.label_paused); + this.$button.html(this.label_paused); responsiveVoice.pause(); } } else {