Remove wipe data and terminate call support

They were already disabled since last GUI revamp. Might come back one day, but they were just not very useful as is, and just made the UI messy
master
Daniel Berteaud 10 years ago
parent e1a9d97dd9
commit deb53b2e93
  1. 16
      lib/Vroom/I18N/en.pm
  2. 16
      lib/Vroom/I18N/fr.pm
  3. 112
      public/js/vroom.js
  4. 76
      templates/default/join.html.ep

@ -40,8 +40,6 @@ our %Lexicon = (
"FROM" => "From", "FROM" => "From",
"GIVE_US_YOUR_FEEDBACK" => "Give us your feedback", "GIVE_US_YOUR_FEEDBACK" => "Give us your feedback",
"YOUR_FEEDBACK_HELPS_US" => "Your feedback (good or bad) can help us improve this application", "YOUR_FEEDBACK_HELPS_US" => "Your feedback (good or bad) can help us improve this application",
"DATA_WIPED" => "Data has been wiped",
"ROOM_DATA_WIPED_BY_s" => "Room data (chat history and pad content) has been wiped by %s",
"NOT_ENABLED" => "This feature isn't enabled", "NOT_ENABLED" => "This feature isn't enabled",
"OOOPS" => "Ooops", "OOOPS" => "Ooops",
"GOODBYE" => "Goodbye", "GOODBYE" => "Goodbye",
@ -85,20 +83,6 @@ our %Lexicon = (
"DISPLAY_NAME_TOO_LONG" => "This name is too long", "DISPLAY_NAME_TOO_LONG" => "This name is too long",
"DISPLAY_NAME_REQUIRED" => "You need to enter your name", "DISPLAY_NAME_REQUIRED" => "You need to enter your name",
"SET_A_DISPLAY_NAME" => "Please set your name before you can join the room", "SET_A_DISPLAY_NAME" => "Please set your name before you can join the room",
"WIPE_CHAT_AND_PAD" => "Wipe chat history and pad content",
"WIPE_CHAT" => "Wipe chat history",
"WIPE_ROOM_DATA" => "Wipe room data",
"YOU_ARE_ABOUT_TO_WIPE_DATA" => "You are about to wipe room data",
"THIS_INCLUDE" => "This includes",
"CHAT_HISTORY" => "Chat history",
"PAD_CONTENT" => "The collaborative pad content",
"CONFIRM_WIPE" => "Wipe",
"TERMINATE_ROOM" => "Stop the call and delete the room",
"YOU_ARE_ABOUT_TO_TERMINATE_ROOM" => "You are about to delete this room. This will have the following effects",
"ALL_PEERS_WILL_HANGUP" => "All the peers will hangup immediatly",
"ALL_DATA_WILL_BE_WIPED" => "All the data of the room will be deleted",
"ROOM_WILL_BE_DELETED" => "The room itself, including all its configuration will be deleted",
"CONFIRM_TERMINATE" => "Stop the call and delete the room",
"ROOM_DELETED" => "This room has been deleted", "ROOM_DELETED" => "This room has been deleted",
"CANCEL" => "Cancel", "CANCEL" => "Cancel",
"CHANGE_COLOR" => "Change your color", "CHANGE_COLOR" => "Change your color",

@ -44,8 +44,6 @@ our %Lexicon = (
"GIVE_US_YOUR_FEEDBACK" => "Parlez-nous de votre expérience", "GIVE_US_YOUR_FEEDBACK" => "Parlez-nous de votre expérience",
"YOUR_FEEDBACK_HELPS_US" => "Votre retour d'expérience (bonne ou mauvaise) peut nous aider à améliorer ce service", "YOUR_FEEDBACK_HELPS_US" => "Votre retour d'expérience (bonne ou mauvaise) peut nous aider à améliorer ce service",
"INVITE_SENT_TO_s" => "Une invitation a été envoyée aux adresses suivantes\n%s", "INVITE_SENT_TO_s" => "Une invitation a été envoyée aux adresses suivantes\n%s",
"DATA_WIPED" => "Les données ont été supprimées",
"ROOM_DATA_WIPED_BY_s" => "Les données du salon (historique du tchat, prise de notes) ont été supprimées par %s",
"NOT_ENABLED" => "Cette fonctionalité n'est pas activée", "NOT_ENABLED" => "Cette fonctionalité n'est pas activée",
"OOOPS" => "Oups", "OOOPS" => "Oups",
"GOODBYE" => "Au revoir", "GOODBYE" => "Au revoir",
@ -90,20 +88,6 @@ our %Lexicon = (
"DISPLAY_NAME_TOO_LONG" => "Ce nom est trop long", "DISPLAY_NAME_TOO_LONG" => "Ce nom est trop long",
"DISPLAY_NAME_REQUIRED" => "Vous devez entrer votre nom", "DISPLAY_NAME_REQUIRED" => "Vous devez entrer votre nom",
"SET_A_DISPLAY_NAME" => "Merci de saisir votre nom avant de pouvoir rejoindre le salon", "SET_A_DISPLAY_NAME" => "Merci de saisir votre nom avant de pouvoir rejoindre le salon",
"WIPE_CHAT_AND_PAD" => "Supprimer l'historique du tchat et les prises de notes",
"WIPE_CHAT" => "Supprimer l'historique du tchat",
"WIPE_ROOM_DATA" => "Suppression des données du salon",
"YOU_ARE_ABOUT_TO_WIPE_DATA" => "Vous êtes sur le point de supprimer certaines données du salon",
"THIS_INCLUDE" => "Celà inclus",
"CHAT_HISTORY" => "L'historique du tchat",
"PAD_CONTENT" => "Le contenu du bloc note collaboratif",
"CONFIRM_WIPE" => "Supprimer",
"TERMINATE_ROOM" => "Arrêter l'appel en cours et supprimer le salon",
"YOU_ARE_ABOUT_TO_TERMINATE_ROOM" => "Vous êtes sur le point de supprimer ce salon. Cette action aura les effets suivants",
"ALL_PEERS_WILL_HANGUP" => "Tous les participants termineront immédiatement la conversation",
"ALL_DATA_WILL_BE_WIPED" => "Toutes les données relatives à ce salon seront supprimées",
"ROOM_WILL_BE_DELETED" => "Le salon, ainsi que tous ses paramètres seront supprimés",
"CONFIRM_TERMINATE" => "Arrêter la conversation et supprimer le salon",
"ROOM_DELETED" => "Le salon a été supprimé", "ROOM_DELETED" => "Le salon a été supprimé",
"CANCEL" => "Annuler", "CANCEL" => "Annuler",
"CHANGE_COLOR" => "Changer de couleur", "CHANGE_COLOR" => "Changer de couleur",

@ -1015,13 +1015,6 @@ function initVroom(room) {
chatIndex++; chatIndex++;
} }
// Wipe the history
function wipeChatHistory(){
$('#chatHistory').html('');
chatHistory = {};
chatIndex = 0;
}
// Update the displayName of the peer // Update the displayName of the peer
// and its screen if any // and its screen if any
function updateDisplayName(id){ function updateDisplayName(id){
@ -1170,35 +1163,6 @@ function initVroom(room) {
}); });
} }
// Wipe data
function wipeRoomData(){
if (etherpad.enabled){
$.ajax({
data: {
req: JSON.stringify({
action: 'wipe_data',
param: {
room: roomName
}
})
},
async: false,
error: function(data){
showApiError(data);
},
success: function(data){
if ($('#etherpadContainer').html() != ''){
loadEtherpadIframe();
}
}
});
}
webrtc.sendToAll('wipe_data', {});
wipeChatHistory();
$('#wipeModal').modal('hide');
$.notify(locale.DATA_WIPED, 'info');
}
// An owner is muting/unmuting someone // An owner is muting/unmuting someone
webrtc.on('owner_toggle_mute', function(data){ webrtc.on('owner_toggle_mute', function(data){
// Ignore this if the remote peer isn't the owner of the room // Ignore this if the remote peer isn't the owner of the room
@ -1469,37 +1433,6 @@ function initVroom(room) {
getPeerRole(data.id); getPeerRole(data.id);
}); });
// An owner has wiped data
webrtc.on('wipe_data', function(data){
if (data.roomType == 'screen' || peers[data.id].role != 'owner'){
return;
}
wipeChatHistory();
if (etherpad.enabled){
$.ajax({
data: {
req: JSON.stringify({
action: 'get_pad_session',
param: {
room: roomName
}
})
},
error: function(data){
showApiError(data);
},
success: function(data){
if (data.msg){
$.notify(data.msg, 'success');
}
loadEtherpadIframe();
}
});
}
var who = (peers[data.id].hasName) ? peers[data.id].displayName : locale.A_ROOM_ADMIN;
$.notify(sprintf(locale.ROOM_DATA_WIPED_BY_s, stringEscape(who)), 'info');
});
// Handle the readyToCall event: join the room // Handle the readyToCall event: join the room
// Or prompt for a name first // Or prompt for a name first
webrtc.once('readyToCall', function () { webrtc.once('readyToCall', function () {
@ -1987,51 +1920,6 @@ function initVroom(room) {
} }
}); });
// Remove the active class on the help button
$('#helpModal').on('hide.bs.modal',function(){
$('#helpButton').removeClass('active');
});
// Display the wipe data modal
$('#wipeDataButton').click(function(){
$('#wipeModal').modal('show');
});
// Really wipe data
$('#confirmWipeButton').click(function(){
wipeRoomData();
});
// Display terminate room modal
$('#terminateRoomButton').click(function(){
$('#terminateModal').modal('show');
});
// Really terminate the room now
$('#confirmTerminateButton').click(function(){
// Ask all the peers to quit now
webrtc.sendToAll('terminate_room', {});
wipeRoomData();
$.ajax({
data: {
req: JSON.stringify({
action: 'delete_room',
param: {
room: roomName
}
})
},
async: false,
error: function(data){
showApiError(data);
},
success: function(data){
if (data.msg && data.msg != ''){
$.notify(data.msg, 'info');
}
}
});
hangupCall;
window.location.assign(rootUrl + 'goodbye/' + roomName);
});
if (etherpad.enabled){ if (etherpad.enabled){
$('.btn-etherpad').click(function(){ $('.btn-etherpad').click(function(){

@ -111,82 +111,6 @@
</div> </div>
</div> </div>
</nav> </nav>
<div class="modal fade" role="dialog" id="wipeModal" aria-labelledby="wipeModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
<%=l 'WIPE_ROOM_DATA' %>
</h4>
</div>
<div class="modal-body">
<p>
<%=l 'YOU_ARE_ABOUT_TO_WIPE_DATA' %>
<%=l 'THIS_INCLUDE' %>
<ul>
<li>
<%=l 'CHAT_HISTORY' %>
</li>
<% if ($etherpad) { %>
<li>
<%=l 'PAD_CONTENT' %>
</li>
<% } %>
</ul>
</p>
</div>
<div class="modal-footer">
<button id="confirmWipeButton" class="btn btn-danger">
<%=l 'CONFIRM_WIPE' %>
</button>
<button class="btn btn-default" data-dismiss="modal" data-target="#wipeModal">
<%=l 'CANCEL' %>
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" role="dialog" id="terminateModal" aria-labelledby="terminateModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
<%=l 'TERMINATE_ROOM' %>
</h4>
</div>
<div class="modal-body">
<p>
<%=l 'YOU_ARE_ABOUT_TO_TERMINATE_ROOM' %>
</p>
<ul>
<li>
<%=l 'ALL_PEERS_WILL_HANGUP' %>
</li>
<li>
<%=l 'ALL_DATA_WILL_BE_WIPED' %>
</li>
<li>
<%=l 'ROOM_WILL_BE_DELETED' %>
</li>
</ul>
</div>
<div class="modal-footer">
<button id="confirmTerminateButton" class="btn btn-danger">
<%=l 'CONFIRM_TERMINATE' %>
</button>
<button class="btn btn-default" data-dismiss="modal" data-target="#terminateModal">
<%=l 'CANCEL' %>
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" role="dialog" id="quitModal" aria-labelledby="quitModal" aria-hidden="true"> <div class="modal fade" role="dialog" id="quitModal" aria-labelledby="quitModal" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

Loading…
Cancel
Save