瀏覽代碼

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
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21
     <script src="interface_config.js?v=5"></script>
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
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24
     <link rel="stylesheet" href="css/font.css?v=7"/>
24
     <link rel="stylesheet" href="css/font.css?v=7"/>
25
     <link rel="stylesheet" href="css/toastr.css?v=1">
25
     <link rel="stylesheet" href="css/toastr.css?v=1">

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


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

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

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

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
  * Creates the Etherpad button and adds it to the toolbar.
30
  * Creates the Etherpad button and adds it to the toolbar.
38
  */
31
  */
115
      */
108
      */
116
     init: function (name) {
109
     init: function (name) {
117
 
110
 
118
-        if (config.etherpad_base && !etherpadName) {
111
+        if (config.etherpad_base && !etherpadName && name) {
119
 
112
 
120
             domain = config.etherpad_base;
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
             enableEtherpadButton();
117
             enableEtherpadButton();
132
 
118
 

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

112
             // Parse etherpad tag.
112
             // Parse etherpad tag.
113
             var etherpad = $(pres).find('>etherpad');
113
             var etherpad = $(pres).find('>etherpad');
114
             if (etherpad.length) {
114
             if (etherpad.length) {
115
-                if (config.etherpad_base && !Moderator.isModerator()) {
115
+                if (config.etherpad_base) {
116
                     eventEmitter.emit(XMPPEvents.ETHERPAD, etherpad.text());
116
                     eventEmitter.emit(XMPPEvents.ETHERPAD, etherpad.text());
117
                 }
117
                 }
118
             }
118
             }
500
                     .c('current').t(this.presMap['prezicurrent']).up().up();
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
             if (this.presMap['medians']) {
503
             if (this.presMap['medians']) {
509
                 pres.c('media', {xmlns: this.presMap['medians']});
504
                 pres.c('media', {xmlns: this.presMap['medians']});
510
                 var sourceNumber = 0;
505
                 var sourceNumber = 0;
574
         getPrezi: function (roomjid) {
569
         getPrezi: function (roomjid) {
575
             return this.preziMap[roomjid];
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
         addAudioInfoToPresence: function (isMuted) {
572
         addAudioInfoToPresence: function (isMuted) {
582
             this.presMap['audions'] = 'http://jitsi.org/jitmeet/audio';
573
             this.presMap['audions'] = 'http://jitsi.org/jitmeet/audio';
583
             this.presMap['audiomuted'] = isMuted.toString();
574
             this.presMap['audiomuted'] = isMuted.toString();

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

485
             case "displayName":
485
             case "displayName":
486
                 connection.emuc.addDisplayNameToPresence(value);
486
                 connection.emuc.addDisplayNameToPresence(value);
487
                 break;
487
                 break;
488
-            case "etherpad":
489
-                connection.emuc.addEtherpadToPresence(value);
490
-                break;
491
             case "prezi":
488
             case "prezi":
492
                 connection.emuc.addPreziToPresence(value, 0);
489
                 connection.emuc.addPreziToPresence(value, 0);
493
                 break;
490
                 break;

Loading…
取消
儲存