Enable etherpad access in the interface

master
Daniel Berteaud 11 years ago
parent 1bf4330ec9
commit 1c3a7c2687
  1. 1
      lib/Vroom/I18N/en.pm
  2. 1
      lib/Vroom/I18N/fr.pm
  3. 4
      public/css/vroom.css
  4. 24
      public/js/vroom.js
  5. 11
      public/vroom.pl
  6. 37
      templates/default/join.html.ep

@ -90,6 +90,7 @@ our %Lexicon = (
"NAME_WONT_BE_ASKED" => "Participant won't have to type their name before they can join the room",
"CHANGE_COLOR" => "Change your color",
"CLICK_TO_CHAT" => "Click to access the chat",
"OPEN_ETHERPAD" => "Collaborative notetaking",
"PREVENT_TO_JOIN" => "Prevent other participants to join this room",
"MUTE_MIC" => "Turn off your microphone",
"NO_SOUND_DETECTED" => "No sound detected, please check your microphone (input level might be too low)",

@ -96,6 +96,7 @@ our %Lexicon = (
"NAME_WONT_BE_ASKED" => "La saisie du nom ne sera plus obligatoire pour rejoindre ce salon",
"CHANGE_COLOR" => "Changer de couleur",
"CLICK_TO_CHAT" => "Accéder au tchat",
"OPEN_ETHERPAD" => "Prise de notes collaborative",
"PREVENT_TO_JOIN" => "Empêcher d'autres participants de rejoindre ce salon",
"MUTE_MIC" => "Couper le micro",
"NO_SOUND_DETECTED" => "Aucun son n'a été détecté. Vérifiez votre micro (son volume est peut-être trop faible)",

@ -160,6 +160,10 @@
padding-right: 12px;
padding-left: 12px;
}
#etherpadContainer {
display: none;
height: auto;
}
#chatBox {
max-height:300px;
resize:none;

@ -1931,6 +1931,29 @@ function initVroom(room) {
$('#helpButton').removeClass('active');
});
if (etherpad.enabled){
$('#etherpadContainer').pad({
host: etherpad.uri,
padId: etherpad.group + '$' + room,
showControls: true,
showLineNumbers: true,
height: maxHeight() + 'px',
border: 2,
userColor: peers.local.color
});
$('#etherpadButton').change(function(){
var action = ($(this).is(':checked')) ? 'show':'hide';
if (action == 'show'){
$('#etherpadLabel').addClass('btn-danger');
$('#etherpadContainer').slideDown('200');
}
else{
$('#etherpadLabel').removeClass('btn-danger');
$('#etherpadContainer').slideUp('200');
}
});
}
// Ping the room every minutes
// Used to detect inactive rooms
setInterval(function pingRoom(){
@ -1968,6 +1991,7 @@ function initVroom(room) {
window.onresize = function (){
$('#webRTCVideo').css('max-height', maxHeight());
$('#mainVideo>video').css('max-height', maxHeight());
$('#epframetherpadContainer').css('max-height', maxHeight());
};
// Preview heigh is limited to the windows heigh, minus the navbar, minus 25px
$('#webRTCVideo').css('max-height', maxHeight());

@ -871,11 +871,12 @@ get '/(*room)' => sub {
}
# Now display the room page
$self->render('join',
moh => $self->choose_moh(),
turnPassword => $data->{token},
video => $video,
etherpad => ($ec) ? 'true' : 'false',
ua => $self->req->headers->user_agent
moh => $self->choose_moh(),
turnPassword => $data->{token},
video => $video,
etherpad => ($ec) ? 'true' : 'false',
etherpadGroup => $data->{etherpad_group},
ua => $self->req->headers->user_agent
);
};

@ -24,18 +24,24 @@
</div>
</div>
<div class="btn-group navbar-form navbar-left">
<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>
<span class="badge" id="unreadMsg">
0
</span>
</button>
<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' %>">
<span class="glyphicon glyphicon-comment">
</span>
<span class="badge" id="unreadMsg">
0
</span>
</button>
</div>
<% if ($etherpad eq 'true'){ %>
<button id="etherpad" class="btn btn-default help" data-toggle="tooltip" data-placement="bottom" title="<%=l 'OPEN_ETHERPAD' %>">
<span class="glyphicon glyphicon-pencil">
</span>
</button>
<div class="btn-group" data-toggle="buttons">
<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>
</button>
</label>
</div>
<% } %>
</div>
<div class="btn-group navbar-form navbar-left" data-toggle="buttons">
@ -771,6 +777,9 @@
</div>
</div>
<div id="mainView" class="col-sm-8 hidden-xs">
<% if ($etherpad eq 'true'){ %>
<div id="etherpadContainer"></div>
<% } %>
<div id="mainVideo">
</div>
<div id="aloneMsg" class="aloneEl">
@ -789,7 +798,11 @@
var roomName = '<%= $room %>';
$( document ).ready(function() {
setTimeout(function(){
etherpad = <%= $etherpad %>;
etherpad = {
enabled: <%= $etherpad %>,
uri: "<%= $config->{etherpadUri} %>",
group: "<%= $etherpadGroup %>"
};
<% if ($video eq 'false'){ %>
videoConstraints = false;
<% } else{ %>

Loading…
Cancel
Save