Cleanup etherpad button

master
Daniel Berteaud 10 years ago
parent 629805f484
commit e71bea9df6
  1. 7
      public/js/vroom.js
  2. 12
      templates/default/join.html.ep

@ -1996,20 +1996,19 @@ function initVroom(room) {
}); });
if (etherpad.enabled){ if (etherpad.enabled){
$('#etherpadButton').change(function(){ $('.btn-etherpad').click(function(){
var action = ($(this).is(':checked')) ? 'show':'hide'; var action = ($(this).hasClass('btn-danger')) ? 'hide':'show';
if (action === 'show'){ if (action === 'show'){
// If not already loaded, load etherpad in the iFrame // If not already loaded, load etherpad in the iFrame
if ($('#etherpadContainer').html() == ''){ if ($('#etherpadContainer').html() == ''){
loadEtherpadIframe(); loadEtherpadIframe();
} }
$('#etherpadLabel').addClass('btn-danger');
$('#etherpadContainer').slideDown('200'); $('#etherpadContainer').slideDown('200');
} }
else{ else{
$('#etherpadLabel').removeClass('btn-danger');
$('#etherpadContainer').slideUp('200'); $('#etherpadContainer').slideUp('200');
} }
$('.btn-etherpad').toggleClass('btn-danger').button('toggle');
}); });
} }

@ -44,9 +44,6 @@
</div> </div>
</div> </div>
<div class="btn-group navbar-form navbar-btn-group navbar-left"> <div class="btn-group navbar-form navbar-btn-group navbar-left">
<% if ($etherpad eq 'true'){ %>
<div class="btn-group">
<% } %>
<button id="chatDropdown" class="btn btn-default collapsed help" data-toggle="collapse" data-target="#chatMenu" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CLICK_TO_CHAT' %>"> <button id="chatDropdown" class="btn btn-default collapsed help" data-toggle="collapse" data-target="#chatMenu" data-toggle="tooltip" data-placement="bottom" title="<%=l 'CLICK_TO_CHAT' %>">
<span class="glyphicon glyphicon-comment"> <span class="glyphicon glyphicon-comment">
</span> </span>
@ -54,18 +51,13 @@
0 0
</span> </span>
</button> </button>
</div>
<% if ($etherpad eq 'true'){ %> <% if ($etherpad eq 'true'){ %>
<div class="btn-group" data-toggle="buttons"> <button class="btn btn-default help btn-etherpad" data-toggle="tooltip" data-placement="bottom" title="<%=l 'OPEN_ETHERPAD' %>">
<label class="btn btn-default help" id="etherpadLabel" data-toggle="tooltip" data-placement="bottom" title="<%=l 'OPEN_ETHERPAD' %>">
<input type = "checkbox" id="etherpadButton">
<span class="glyphicon glyphicon-pencil"> <span class="glyphicon glyphicon-pencil">
</span> </span>
</button> </button>
</label>
</div>
</div>
<% } %> <% } %>
</div>
<div class="btn-group navbar-form navbar-btn-group navbar-left hidden-xs"> <div class="btn-group navbar-form navbar-btn-group navbar-left hidden-xs">
<button class="btn btn-default btn-mute-mic help" data-toggle="tooltip" data-placement="bottom" title="<%=l 'MUTE_MIC' %>"> <button class="btn btn-default btn-mute-mic help" data-toggle="tooltip" data-placement="bottom" title="<%=l 'MUTE_MIC' %>">
<span class="glyphicon glyphicon-volume-off"> <span class="glyphicon glyphicon-volume-off">

Loading…
Cancel
Save