diff --git a/public/js/vroom.js b/public/js/vroom.js index ad59c95..dd1b1bc 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -1996,20 +1996,19 @@ function initVroom(room) { }); if (etherpad.enabled){ - $('#etherpadButton').change(function(){ - var action = ($(this).is(':checked')) ? 'show':'hide'; + $('.btn-etherpad').click(function(){ + var action = ($(this).hasClass('btn-danger')) ? 'hide':'show'; if (action === 'show'){ // If not already loaded, load etherpad in the iFrame if ($('#etherpadContainer').html() == ''){ loadEtherpadIframe(); } - $('#etherpadLabel').addClass('btn-danger'); $('#etherpadContainer').slideDown('200'); } else{ - $('#etherpadLabel').removeClass('btn-danger'); $('#etherpadContainer').slideUp('200'); } + $('.btn-etherpad').toggleClass('btn-danger').button('toggle'); }); } diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index 0c45b9e..cf23fc0 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -44,28 +44,20 @@ + <% } %> +