The name of shared Etherpad document is now generated and advertised by Jicofo user.

This commit is contained in:
paweldomas 2015-06-15 12:07:31 +02:00
parent 15db9ca7e4
commit 3f9b220ee9
6 changed files with 17093 additions and 17160 deletions

View File

@ -19,7 +19,7 @@
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib --> <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
<script src="libs/toastr.js?v=1"></script><!-- notifications lib --> <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
<script src="interface_config.js?v=5"></script> <script src="interface_config.js?v=5"></script>
<script src="libs/app.bundle.js?v=84"></script> <script src="libs/app.bundle.js?v=85"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin --> <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<link rel="stylesheet" href="css/font.css?v=7"/> <link rel="stylesheet" href="css/font.css?v=7"/>
<link rel="stylesheet" href="css/toastr.css?v=1"> <link rel="stylesheet" href="css/toastr.css?v=1">

File diff suppressed because it is too large Load Diff

View File

@ -441,7 +441,7 @@ function onMucJoined(jid, info) {
function initEtherpad(name) { function initEtherpad(name) {
Etherpad.init(name); Etherpad.init(name);
}; }
function onMucMemberLeft(jid) { function onMucMemberLeft(jid) {
console.log('left.muc', jid); console.log('left.muc', jid);
@ -497,11 +497,7 @@ function onModeratorStatusChanged(isModerator) {
// Recording visible if // Recording visible if
// there are at least 2(+ 1 focus) participants // there are at least 2(+ 1 focus) participants
//Object.keys(connection.emuc.members).length >= 3); //Object.keys(connection.emuc.members).length >= 3);
}
if (isModerator && config.etherpad_base) {
Etherpad.init();
}
};
function onPasswordRequired(callback) { function onPasswordRequired(callback) {
// password is required // password is required

View File

@ -26,13 +26,6 @@ function resize() {
} }
} }
/**
* Shares the Etherpad name with other participants.
*/
function shareEtherpad() {
APP.xmpp.addToPresence("etherpad", etherpadName);
}
/** /**
* Creates the Etherpad button and adds it to the toolbar. * Creates the Etherpad button and adds it to the toolbar.
*/ */
@ -115,18 +108,11 @@ var Etherpad = {
*/ */
init: function (name) { init: function (name) {
if (config.etherpad_base && !etherpadName) { if (config.etherpad_base && !etherpadName && name) {
domain = config.etherpad_base; domain = config.etherpad_base;
if (!name) { etherpadName = name;
// In case we're the focus we generate the name.
etherpadName = Math.random().toString(36).substring(7) +
'_' + (new Date().getTime()).toString();
shareEtherpad();
}
else
etherpadName = name;
enableEtherpadButton(); enableEtherpadButton();

View File

@ -112,7 +112,7 @@ module.exports = function(XMPP, eventEmitter) {
// Parse etherpad tag. // Parse etherpad tag.
var etherpad = $(pres).find('>etherpad'); var etherpad = $(pres).find('>etherpad');
if (etherpad.length) { if (etherpad.length) {
if (config.etherpad_base && !Moderator.isModerator()) { if (config.etherpad_base) {
eventEmitter.emit(XMPPEvents.ETHERPAD, etherpad.text()); eventEmitter.emit(XMPPEvents.ETHERPAD, etherpad.text());
} }
} }
@ -500,11 +500,6 @@ module.exports = function(XMPP, eventEmitter) {
.c('current').t(this.presMap['prezicurrent']).up().up(); .c('current').t(this.presMap['prezicurrent']).up().up();
} }
if (this.presMap['etherpadns']) {
pres.c('etherpad', {xmlns: this.presMap['etherpadns']})
.t(this.presMap['etherpadname']).up();
}
if (this.presMap['medians']) { if (this.presMap['medians']) {
pres.c('media', {xmlns: this.presMap['medians']}); pres.c('media', {xmlns: this.presMap['medians']});
var sourceNumber = 0; var sourceNumber = 0;
@ -574,10 +569,6 @@ module.exports = function(XMPP, eventEmitter) {
getPrezi: function (roomjid) { getPrezi: function (roomjid) {
return this.preziMap[roomjid]; return this.preziMap[roomjid];
}, },
addEtherpadToPresence: function (etherpadName) {
this.presMap['etherpadns'] = 'http://jitsi.org/jitmeet/etherpad';
this.presMap['etherpadname'] = etherpadName;
},
addAudioInfoToPresence: function (isMuted) { addAudioInfoToPresence: function (isMuted) {
this.presMap['audions'] = 'http://jitsi.org/jitmeet/audio'; this.presMap['audions'] = 'http://jitsi.org/jitmeet/audio';
this.presMap['audiomuted'] = isMuted.toString(); this.presMap['audiomuted'] = isMuted.toString();

View File

@ -485,9 +485,6 @@ var XMPP = {
case "displayName": case "displayName":
connection.emuc.addDisplayNameToPresence(value); connection.emuc.addDisplayNameToPresence(value);
break; break;
case "etherpad":
connection.emuc.addEtherpadToPresence(value);
break;
case "prezi": case "prezi":
connection.emuc.addPreziToPresence(value, 0); connection.emuc.addPreziToPresence(value, 0);
break; break;