瀏覽代碼

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

j8
paweldomas 10 年之前
父節點
當前提交
3f9b220ee9
共有 6 個文件被更改,包括 26980 次插入27047 次删除
  1. 1
    1
      index.html
  2. 26974
    27011
      libs/app.bundle.js
  3. 2
    6
      modules/UI/UI.js
  4. 2
    16
      modules/UI/etherpad/Etherpad.js
  5. 1
    10
      modules/xmpp/strophe.emuc.js
  6. 0
    3
      modules/xmpp/xmpp.js

+ 1
- 1
index.html 查看文件

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

+ 26974
- 27011
libs/app.bundle.js
文件差異過大導致無法顯示
查看文件


+ 2
- 6
modules/UI/UI.js 查看文件

@@ -441,7 +441,7 @@ function onMucJoined(jid, info) {
441 441
 
442 442
 function initEtherpad(name) {
443 443
     Etherpad.init(name);
444
-};
444
+}
445 445
 
446 446
 function onMucMemberLeft(jid) {
447 447
     console.log('left.muc', jid);
@@ -497,11 +497,7 @@ function onModeratorStatusChanged(isModerator) {
497 497
     // Recording visible if
498 498
     // there are at least 2(+ 1 focus) participants
499 499
     //Object.keys(connection.emuc.members).length >= 3);
500
-
501
-    if (isModerator && config.etherpad_base) {
502
-        Etherpad.init();
503
-    }
504
-};
500
+}
505 501
 
506 502
 function onPasswordRequired(callback) {
507 503
     // password is required

+ 2
- 16
modules/UI/etherpad/Etherpad.js 查看文件

@@ -26,13 +26,6 @@ function resize() {
26 26
     }
27 27
 }
28 28
 
29
-/**
30
- * Shares the Etherpad name with other participants.
31
- */
32
-function shareEtherpad() {
33
-    APP.xmpp.addToPresence("etherpad", etherpadName);
34
-}
35
-
36 29
 /**
37 30
  * Creates the Etherpad button and adds it to the toolbar.
38 31
  */
@@ -115,18 +108,11 @@ var Etherpad = {
115 108
      */
116 109
     init: function (name) {
117 110
 
118
-        if (config.etherpad_base && !etherpadName) {
111
+        if (config.etherpad_base && !etherpadName && name) {
119 112
 
120 113
             domain = config.etherpad_base;
121 114
 
122
-            if (!name) {
123
-                // In case we're the focus we generate the name.
124
-                etherpadName = Math.random().toString(36).substring(7) +
125
-                                '_' + (new Date().getTime()).toString();
126
-                shareEtherpad();
127
-            }
128
-            else
129
-                etherpadName = name;
115
+            etherpadName = name;
130 116
 
131 117
             enableEtherpadButton();
132 118
 

+ 1
- 10
modules/xmpp/strophe.emuc.js 查看文件

@@ -112,7 +112,7 @@ module.exports = function(XMPP, eventEmitter) {
112 112
             // Parse etherpad tag.
113 113
             var etherpad = $(pres).find('>etherpad');
114 114
             if (etherpad.length) {
115
-                if (config.etherpad_base && !Moderator.isModerator()) {
115
+                if (config.etherpad_base) {
116 116
                     eventEmitter.emit(XMPPEvents.ETHERPAD, etherpad.text());
117 117
                 }
118 118
             }
@@ -500,11 +500,6 @@ module.exports = function(XMPP, eventEmitter) {
500 500
                     .c('current').t(this.presMap['prezicurrent']).up().up();
501 501
             }
502 502
 
503
-            if (this.presMap['etherpadns']) {
504
-                pres.c('etherpad', {xmlns: this.presMap['etherpadns']})
505
-                    .t(this.presMap['etherpadname']).up();
506
-            }
507
-
508 503
             if (this.presMap['medians']) {
509 504
                 pres.c('media', {xmlns: this.presMap['medians']});
510 505
                 var sourceNumber = 0;
@@ -574,10 +569,6 @@ module.exports = function(XMPP, eventEmitter) {
574 569
         getPrezi: function (roomjid) {
575 570
             return this.preziMap[roomjid];
576 571
         },
577
-        addEtherpadToPresence: function (etherpadName) {
578
-            this.presMap['etherpadns'] = 'http://jitsi.org/jitmeet/etherpad';
579
-            this.presMap['etherpadname'] = etherpadName;
580
-        },
581 572
         addAudioInfoToPresence: function (isMuted) {
582 573
             this.presMap['audions'] = 'http://jitsi.org/jitmeet/audio';
583 574
             this.presMap['audiomuted'] = isMuted.toString();

+ 0
- 3
modules/xmpp/xmpp.js 查看文件

@@ -485,9 +485,6 @@ var XMPP = {
485 485
             case "displayName":
486 486
                 connection.emuc.addDisplayNameToPresence(value);
487 487
                 break;
488
-            case "etherpad":
489
-                connection.emuc.addEtherpadToPresence(value);
490
-                break;
491 488
             case "prezi":
492 489
                 connection.emuc.addPreziToPresence(value, 0);
493 490
                 break;

Loading…
取消
儲存