Sfoglia il codice sorgente

Hide the bottom toolbar with the header toolbar if the film strip is hidden.

j8
fo 11 anni fa
parent
commit
32fab4c222
11 ha cambiato i file con 168 aggiunte e 124 eliminazioni
  1. 1
    1
      app.js
  2. 1
    1
      bottom_toolbar.js
  3. 2
    2
      chat.js
  4. 1
    1
      contact_list.js
  5. 0
    6
      css/videolayout_default.css
  6. 2
    2
      etherpad.js
  7. 56
    26
      fonts/selection.json
  8. 3
    2
      index.html
  9. 2
    2
      prezi.js
  10. 0
    81
      toolbar.js
  11. 100
    0
      toolbar_toggler.js

+ 1
- 1
app.js Vedi File

601
     ContactList.addContact(jid);
601
     ContactList.addContact(jid);
602
 
602
 
603
     // Once we've joined the muc show the toolbar
603
     // Once we've joined the muc show the toolbar
604
-    Toolbar.showToolbar();
604
+    ToolbarToggler.showToolbar();
605
 
605
 
606
     if (info.displayName)
606
     if (info.displayName)
607
         $(document).trigger('displaynamechanged',
607
         $(document).trigger('displaynamechanged',

+ 1
- 1
bottom_toolbar.js Vedi File

22
     };
22
     };
23
 
23
 
24
     my.toggleFilmStrip = function() {
24
     my.toggleFilmStrip = function() {
25
-        $("#remoteVideos").toggleClass("hidden");
25
+        $("#remoteVideos").toggle("slide", { direction: "down", duration: 700});
26
     };
26
     };
27
 
27
 
28
 
28
 

+ 2
- 2
chat.js Vedi File

207
             // Undock the toolbar when the chat is shown and if we're in a 
207
             // Undock the toolbar when the chat is shown and if we're in a 
208
             // video mode.
208
             // video mode.
209
             if (VideoLayout.isLargeVideoVisible())
209
             if (VideoLayout.isLargeVideoVisible())
210
-                Toolbar.dockToolbar(false);
210
+                ToolbarToggler.dockToolbar(false);
211
 
211
 
212
             videospace.animate({right: chatSize[0],
212
             videospace.animate({right: chatSize[0],
213
                                 width: videospaceWidth,
213
                                 width: videospaceWidth,
333
         if (unreadMessages) {
333
         if (unreadMessages) {
334
             unreadMsgElement.innerHTML = unreadMessages.toString();
334
             unreadMsgElement.innerHTML = unreadMessages.toString();
335
 
335
 
336
-            Toolbar.dockToolbar(true);
336
+            ToolbarToggler.dockToolbar(true);
337
 
337
 
338
             var chatButtonElement
338
             var chatButtonElement
339
                 = document.getElementById('chatButton').parentNode;
339
                 = document.getElementById('chatButton').parentNode;

+ 1
- 1
contact_list.js Vedi File

143
             // Undock the toolbar when the chat is shown and if we're in a 
143
             // Undock the toolbar when the chat is shown and if we're in a 
144
             // video mode.
144
             // video mode.
145
             if (VideoLayout.isLargeVideoVisible())
145
             if (VideoLayout.isLargeVideoVisible())
146
-                Toolbar.dockToolbar(false);
146
+                ToolbarToggler.dockToolbar(false);
147
 
147
 
148
             videospace.animate({right: chatSize[0],
148
             videospace.animate({right: chatSize[0],
149
                                 width: videospaceWidth,
149
                                 width: videospaceWidth,

+ 0
- 6
css/videolayout_default.css Vedi File

19
     width:auto;
19
     width:auto;
20
     border:1px solid transparent;
20
     border:1px solid transparent;
21
     z-index: 5;
21
     z-index: 5;
22
-    -webkit-transition: bottom 2s; /* For Safari 3.1 to 6.0 */
23
-    transition: bottom 2s;
24
-}
25
-
26
-#remotevideos.hidden {
27
-    bottom: -196px;
28
 }
22
 }
29
 
23
 
30
 .videocontainer {
24
 .videocontainer {

+ 2
- 2
etherpad.js Vedi File

46
                     largeVideo.css({opacity: '0'});
46
                     largeVideo.css({opacity: '0'});
47
                 } else {
47
                 } else {
48
                     VideoLayout.setLargeVideoVisible(false);
48
                     VideoLayout.setLargeVideoVisible(false);
49
-                    Toolbar.dockToolbar(true);
49
+                    ToolbarToggler.dockToolbar(true);
50
                 }
50
                 }
51
 
51
 
52
                 $('#etherpad>iframe').fadeIn(300, function () {
52
                 $('#etherpad>iframe').fadeIn(300, function () {
64
                 if (!isPresentation) {
64
                 if (!isPresentation) {
65
                     $('#largeVideo').fadeIn(300, function () {
65
                     $('#largeVideo').fadeIn(300, function () {
66
                         VideoLayout.setLargeVideoVisible(true);
66
                         VideoLayout.setLargeVideoVisible(true);
67
-                        Toolbar.dockToolbar(false);
67
+                        ToolbarToggler.dockToolbar(false);
68
                     });
68
                     });
69
                 }
69
                 }
70
             });
70
             });

+ 56
- 26
fonts/selection.json Vedi File

1
 {
1
 {
2
 	"IcoMoonType": "selection",
2
 	"IcoMoonType": "selection",
3
 	"icons": [
3
 	"icons": [
4
+		{
5
+			"icon": {
6
+				"paths": [
7
+					"M46.993-1.7c461.234 0 553.793 0 1015.024 0 35.919 0 53.356 25.959 53.356 57.959-0.581 303.259-0.325 606.488-0.449 909.809 0 43.984-13.203 57.058-57.703 57.058-443.072 0.126-556.453 0.126-999.553 0-44.534 0-57.799-13.009-57.799-57.058-0.098-303.257 0.485-608.072-0.093-911.329-0.034-26.21 11.301-53.761 47.217-56.439zM311.405 509.702c0 119.045-0.072 172.168 0.057 291.249 0.036 50.043 11.208 61.050 62.12 61.050 233.352 0 137.075 0 370.522 0 47.075 0 59.249-11.982 59.249-58.095 0.126-239.111 0.126-346.338 0-585.389 0-48.138-10.687-58.991-57.768-58.991-235.323-0.101-140.844-0.101-376.157 0-47.044 0-57.93 11.043-57.966 58.89-0.129 119.109-0.057 172.209-0.057 291.287zM153.944 121.434c-74.929 0.062-66.687-5.958-66.845 66.685-0.201 63.95-7.054 63.534 62.528 63.372 72.999-0.194 67.201 3.764 67.302-67.554 0-67.722 4.087-62.595-62.985-62.502zM963.644 121.434c-71.159 0.034-65.56-6.185-65.751 65.364-0.129 67.302-4.508 64.693 64.528 64.693 73.089 0 65.299 2.031 65.299-66.238-0.003-68.646 6.956-63.911-64.076-63.818zM216.828 837.592c0.359-73.094 4.639-66.914-67.358-67.17-68.104-0.191-62.569-2.763-62.407 63.31 0.129 73.476-6.954 66.52 67.074 66.649 66.042 0.065 63.142 6.056 62.691-62.789zM1027.718 835.6c0.134-68.334 6.443-65.304-63.297-65.178-70.132 0.132-66.656-5.793-66.527 65.304 0.129 70.645-4.384 64.721 63.756 64.657 71.995-0.132 66.202 6.698 66.068-64.783zM1027.718 617.923c0-70.55 7.219-66.842-67.485-66.522-0.898 0-1.873 0-2.838 0-59.375 0-59.375 0-59.375 58.023 0 77.922-6.443 69.936 69.293 70.196 66.076 0.387 60.539 3.091 60.405-61.697zM151.307 470.127c68.295 0.163 65.815 5.568 65.624-62.982-0.194-71.128 4.895-64.917-66.014-65.010-69.905-0.101-63.813-4.704-63.885 63.978-0.062 67.431-5.7 64.463 64.275 64.014zM961.263 470.127c72.511 0.258 66.589 4.603 66.455-64.494 0-68.558 6.185-63.537-64.267-63.498-70.196 0.028-65.686-6.053-65.498 65.493 0.132 62.5 0.067 62.5 63.31 62.5zM150.399 679.62c71.004 0 66.659 6.567 66.466-64.528-0.163-63.694-0.036-63.501-65.013-63.756-70.805-0.258-64.822-2.673-64.822 63.756 0.036 69.167-5.919 64.788 63.369 64.528z"
8
+				],
9
+				"attrs": [
10
+					{}
11
+				],
12
+				"width": 1115,
13
+				"grid": 0,
14
+				"tags": [
15
+					"filmstrip"
16
+				]
17
+			},
18
+			"attrs": [
19
+				{}
20
+			],
21
+			"properties": {
22
+				"order": 26,
23
+				"id": 29,
24
+				"prevSize": 32,
25
+				"code": 58905,
26
+				"name": "filmstrip",
27
+				"ligatures": ""
28
+			},
29
+			"setIdx": 0,
30
+			"iconIdx": 0
31
+		},
4
 		{
32
 		{
5
 			"icon": {
33
 			"icon": {
6
 				"paths": [
34
 				"paths": [
33
 				"ligatures": ""
61
 				"ligatures": ""
34
 			},
62
 			},
35
 			"setIdx": 0,
63
 			"setIdx": 0,
36
-			"iconIdx": 0
64
+			"iconIdx": 1
37
 		},
65
 		},
38
 		{
66
 		{
39
 			"icon": {
67
 			"icon": {
61
 				"ligatures": ""
89
 				"ligatures": ""
62
 			},
90
 			},
63
 			"setIdx": 0,
91
 			"setIdx": 0,
64
-			"iconIdx": 1
92
+			"iconIdx": 2
65
 		},
93
 		},
66
 		{
94
 		{
67
 			"icon": {
95
 			"icon": {
89
 				"ligatures": ""
117
 				"ligatures": ""
90
 			},
118
 			},
91
 			"setIdx": 0,
119
 			"setIdx": 0,
92
-			"iconIdx": 2
120
+			"iconIdx": 3
93
 		},
121
 		},
94
 		{
122
 		{
95
 			"icon": {
123
 			"icon": {
128
 				"ligatures": ""
156
 				"ligatures": ""
129
 			},
157
 			},
130
 			"setIdx": 0,
158
 			"setIdx": 0,
131
-			"iconIdx": 3
159
+			"iconIdx": 4
132
 		},
160
 		},
133
 		{
161
 		{
134
 			"icon": {
162
 			"icon": {
151
 				"ligatures": ""
179
 				"ligatures": ""
152
 			},
180
 			},
153
 			"setIdx": 0,
181
 			"setIdx": 0,
154
-			"iconIdx": 4
182
+			"iconIdx": 5
155
 		},
183
 		},
156
 		{
184
 		{
157
 			"icon": {
185
 			"icon": {
174
 				"ligatures": ""
202
 				"ligatures": ""
175
 			},
203
 			},
176
 			"setIdx": 0,
204
 			"setIdx": 0,
177
-			"iconIdx": 5
205
+			"iconIdx": 6
178
 		},
206
 		},
179
 		{
207
 		{
180
 			"icon": {
208
 			"icon": {
198
 				"ligatures": ""
226
 				"ligatures": ""
199
 			},
227
 			},
200
 			"setIdx": 0,
228
 			"setIdx": 0,
201
-			"iconIdx": 6
229
+			"iconIdx": 7
202
 		},
230
 		},
203
 		{
231
 		{
204
 			"icon": {
232
 			"icon": {
223
 				"ligatures": ""
251
 				"ligatures": ""
224
 			},
252
 			},
225
 			"setIdx": 0,
253
 			"setIdx": 0,
226
-			"iconIdx": 7
254
+			"iconIdx": 8
227
 		},
255
 		},
228
 		{
256
 		{
229
 			"icon": {
257
 			"icon": {
246
 				"ligatures": ""
274
 				"ligatures": ""
247
 			},
275
 			},
248
 			"setIdx": 0,
276
 			"setIdx": 0,
249
-			"iconIdx": 8
277
+			"iconIdx": 9
250
 		},
278
 		},
251
 		{
279
 		{
252
 			"icon": {
280
 			"icon": {
270
 				"ligatures": ""
298
 				"ligatures": ""
271
 			},
299
 			},
272
 			"setIdx": 0,
300
 			"setIdx": 0,
273
-			"iconIdx": 9
301
+			"iconIdx": 10
274
 		},
302
 		},
275
 		{
303
 		{
276
 			"icon": {
304
 			"icon": {
294
 				"ligatures": ""
322
 				"ligatures": ""
295
 			},
323
 			},
296
 			"setIdx": 0,
324
 			"setIdx": 0,
297
-			"iconIdx": 10
325
+			"iconIdx": 11
298
 		},
326
 		},
299
 		{
327
 		{
300
 			"icon": {
328
 			"icon": {
316
 				"ligatures": ""
344
 				"ligatures": ""
317
 			},
345
 			},
318
 			"setIdx": 0,
346
 			"setIdx": 0,
319
-			"iconIdx": 11
347
+			"iconIdx": 12
320
 		},
348
 		},
321
 		{
349
 		{
322
 			"icon": {
350
 			"icon": {
340
 				"ligatures": ""
368
 				"ligatures": ""
341
 			},
369
 			},
342
 			"setIdx": 0,
370
 			"setIdx": 0,
343
-			"iconIdx": 12
371
+			"iconIdx": 13
344
 		},
372
 		},
345
 		{
373
 		{
346
 			"icon": {
374
 			"icon": {
364
 				"ligatures": ""
392
 				"ligatures": ""
365
 			},
393
 			},
366
 			"setIdx": 0,
394
 			"setIdx": 0,
367
-			"iconIdx": 13
395
+			"iconIdx": 14
368
 		},
396
 		},
369
 		{
397
 		{
370
 			"icon": {
398
 			"icon": {
391
 				"ligatures": ""
419
 				"ligatures": ""
392
 			},
420
 			},
393
 			"setIdx": 0,
421
 			"setIdx": 0,
394
-			"iconIdx": 14
422
+			"iconIdx": 15
395
 		},
423
 		},
396
 		{
424
 		{
397
 			"icon": {
425
 			"icon": {
415
 				"ligatures": ""
443
 				"ligatures": ""
416
 			},
444
 			},
417
 			"setIdx": 0,
445
 			"setIdx": 0,
418
-			"iconIdx": 15
446
+			"iconIdx": 16
419
 		},
447
 		},
420
 		{
448
 		{
421
 			"icon": {
449
 			"icon": {
439
 				"ligatures": ""
467
 				"ligatures": ""
440
 			},
468
 			},
441
 			"setIdx": 0,
469
 			"setIdx": 0,
442
-			"iconIdx": 16
470
+			"iconIdx": 17
443
 		},
471
 		},
444
 		{
472
 		{
445
 			"icon": {
473
 			"icon": {
464
 				"ligatures": ""
492
 				"ligatures": ""
465
 			},
493
 			},
466
 			"setIdx": 0,
494
 			"setIdx": 0,
467
-			"iconIdx": 17
495
+			"iconIdx": 18
468
 		},
496
 		},
469
 		{
497
 		{
470
 			"icon": {
498
 			"icon": {
486
 				"ligatures": ""
514
 				"ligatures": ""
487
 			},
515
 			},
488
 			"setIdx": 0,
516
 			"setIdx": 0,
489
-			"iconIdx": 18
517
+			"iconIdx": 19
490
 		},
518
 		},
491
 		{
519
 		{
492
 			"icon": {
520
 			"icon": {
509
 				"ligatures": ""
537
 				"ligatures": ""
510
 			},
538
 			},
511
 			"setIdx": 0,
539
 			"setIdx": 0,
512
-			"iconIdx": 19
540
+			"iconIdx": 20
513
 		},
541
 		},
514
 		{
542
 		{
515
 			"icon": {
543
 			"icon": {
531
 				"ligatures": ""
559
 				"ligatures": ""
532
 			},
560
 			},
533
 			"setIdx": 0,
561
 			"setIdx": 0,
534
-			"iconIdx": 20
562
+			"iconIdx": 21
535
 		},
563
 		},
536
 		{
564
 		{
537
 			"icon": {
565
 			"icon": {
554
 				"ligatures": ""
582
 				"ligatures": ""
555
 			},
583
 			},
556
 			"setIdx": 0,
584
 			"setIdx": 0,
557
-			"iconIdx": 21
585
+			"iconIdx": 22
558
 		},
586
 		},
559
 		{
587
 		{
560
 			"icon": {
588
 			"icon": {
577
 				"ligatures": ""
605
 				"ligatures": ""
578
 			},
606
 			},
579
 			"setIdx": 0,
607
 			"setIdx": 0,
580
-			"iconIdx": 22
608
+			"iconIdx": 23
581
 		},
609
 		},
582
 		{
610
 		{
583
 			"icon": {
611
 			"icon": {
601
 				"ligatures": ""
629
 				"ligatures": ""
602
 			},
630
 			},
603
 			"setIdx": 0,
631
 			"setIdx": 0,
604
-			"iconIdx": 23
632
+			"iconIdx": 24
605
 		},
633
 		},
606
 		{
634
 		{
607
 			"icon": {
635
 			"icon": {
624
 				"ligatures": ""
652
 				"ligatures": ""
625
 			},
653
 			},
626
 			"setIdx": 0,
654
 			"setIdx": 0,
627
-			"iconIdx": 24
655
+			"iconIdx": 25
628
 		}
656
 		}
629
 	],
657
 	],
630
 	"height": 1024,
658
 	"height": 1024,
637
 		"fontPref": {
665
 		"fontPref": {
638
 			"prefix": "icon-",
666
 			"prefix": "icon-",
639
 			"metadata": {
667
 			"metadata": {
640
-				"fontFamily": "jitsi"
668
+				"fontFamily": "jitsi",
669
+				"majorVersion": 1,
670
+				"minorVersion": 0
641
 			},
671
 			},
642
 			"metrics": {
672
 			"metrics": {
643
 				"emSize": 512,
673
 				"emSize": 512,

+ 3
- 2
index.html Vedi File

44
     <script src="local_sts.js?v=1"></script><!-- Local stats processing -->
44
     <script src="local_sts.js?v=1"></script><!-- Local stats processing -->
45
     <script src="videolayout.js?v=8"></script><!-- video ui -->
45
     <script src="videolayout.js?v=8"></script><!-- video ui -->
46
     <script src="toolbar.js?v=4"></script><!-- toolbar ui -->
46
     <script src="toolbar.js?v=4"></script><!-- toolbar ui -->
47
+    <script src="toolbar_toggler.js"></script>
47
     <script src="canvas_util.js?v=1"></script><!-- canvas drawing utils -->
48
     <script src="canvas_util.js?v=1"></script><!-- canvas drawing utils -->
48
     <script src="audio_levels.js?v=1"></script><!-- audio levels plugin -->
49
     <script src="audio_levels.js?v=1"></script><!-- audio levels plugin -->
49
     <script src="media_stream.js?v=1"></script><!-- media stream -->
50
     <script src="media_stream.js?v=1"></script><!-- media stream -->
228
           </form>
229
           </form>
229
         </div>
230
         </div>
230
         <div id="reloadPresentation"><a onclick='Prezi.reloadPresentation();'><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div>
231
         <div id="reloadPresentation"><a onclick='Prezi.reloadPresentation();'><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div>
231
-        <div id="videospace" onmousemove="Toolbar.showToolbar();">
232
+        <div id="videospace" onmousemove="ToolbarToggler.showToolbar();">
232
             <div id="largeVideoContainer" class="videocontainer">
233
             <div id="largeVideoContainer" class="videocontainer">
233
                 <div id="presentation"></div>
234
                 <div id="presentation"></div>
234
                 <div id="etherpad"></div>
235
                 <div id="etherpad"></div>
260
                     </a>
261
                     </a>
261
                 </span>
262
                 </span>
262
                 <span class="bottomToolbar_span">
263
                 <span class="bottomToolbar_span">
263
-                    <a class="bottomToolbarButton" data-toggle="popover" data-placement="top" data-content="Show / hide filmstrip" onclick='BottomToolbar.toggleFilmStrip()'>
264
+                    <a class="bottomToolbarButton" data-toggle="popover" data-placement="top" data-content="Show / hide film strip" onclick='BottomToolbar.toggleFilmStrip()'>
264
                         <i id="filmStripButton" class="icon-filmstrip"></i>
265
                         <i id="filmStripButton" class="icon-filmstrip"></i>
265
                     </a>
266
                     </a>
266
                 </span>
267
                 </span>

+ 2
- 2
prezi.js Vedi File

22
                 VideoLayout.setLargeVideoVisible(false);
22
                 VideoLayout.setLargeVideoVisible(false);
23
                 $('#presentation>iframe').fadeIn(300, function() {
23
                 $('#presentation>iframe').fadeIn(300, function() {
24
                     $('#presentation>iframe').css({opacity:'1'});
24
                     $('#presentation>iframe').css({opacity:'1'});
25
-                    Toolbar.dockToolbar(true);
25
+                    ToolbarToggler.dockToolbar(true);
26
                 });
26
                 });
27
             });
27
             });
28
         }
28
         }
33
                     $('#reloadPresentation').css({display:'none'});
33
                     $('#reloadPresentation').css({display:'none'});
34
                     $('#largeVideo').fadeIn(300, function() {
34
                     $('#largeVideo').fadeIn(300, function() {
35
                         VideoLayout.setLargeVideoVisible(true);
35
                         VideoLayout.setLargeVideoVisible(true);
36
-                        Toolbar.dockToolbar(false);
36
+                        ToolbarToggler.dockToolbar(false);
37
                     });
37
                     });
38
                 });
38
                 });
39
             }
39
             }

+ 0
- 81
toolbar.js Vedi File

1
 var Toolbar = (function (my) {
1
 var Toolbar = (function (my) {
2
-    var INITIAL_TOOLBAR_TIMEOUT = 20000;
3
-    var TOOLBAR_TIMEOUT = INITIAL_TOOLBAR_TIMEOUT;
4
 
2
 
5
     /**
3
     /**
6
      * Opens the lock room dialog.
4
      * Opens the lock room dialog.
199
             }
197
             }
200
         }
198
         }
201
     };
199
     };
202
-
203
-    /**
204
-     * Shows the main toolbar.
205
-     */
206
-    my.showToolbar = function() {
207
-        if (!$('#header').is(':visible')) {
208
-            $('#header').show("slide", { direction: "up", duration: 300});
209
-            $('#subject').animate({top: "+=40"}, 300);
210
-
211
-            if (toolbarTimeout) {
212
-                clearTimeout(toolbarTimeout);
213
-                toolbarTimeout = null;
214
-            }
215
-            toolbarTimeout = setTimeout(hideToolbar, TOOLBAR_TIMEOUT);
216
-            TOOLBAR_TIMEOUT = 4000;
217
-        }
218
-
219
-        if (focus != null)
220
-        {
221
-//            TODO: Enable settings functionality. Need to uncomment the settings button in index.html.
222
-//            $('#settingsButton').css({visibility:"visible"});
223
-        }
224
-
225
-        // Show/hide desktop sharing button
226
-        showDesktopSharingButton();
227
-    };
228
-
229
-    /**
230
-     * Docks/undocks the toolbar.
231
-     *
232
-     * @param isDock indicates what operation to perform
233
-     */
234
-    my.dockToolbar = function(isDock) {
235
-        if (isDock) {
236
-            // First make sure the toolbar is shown.
237
-            if (!$('#header').is(':visible')) {
238
-                Toolbar.showToolbar();
239
-            }
240
-
241
-            // Then clear the time out, to dock the toolbar.
242
-            if (toolbarTimeout) {
243
-                clearTimeout(toolbarTimeout);
244
-                toolbarTimeout = null;
245
-            }
246
-        }
247
-        else {
248
-            if (!$('#header').is(':visible')) {
249
-                Toolbar.showToolbar();
250
-            }
251
-            else {
252
-                toolbarTimeout = setTimeout(hideToolbar, TOOLBAR_TIMEOUT);
253
-            }
254
-        }
255
-    };
256
-
257
     /**
200
     /**
258
      * Updates the lock button state.
201
      * Updates the lock button state.
259
      */
202
      */
261
         buttonClick("#lockIcon", "icon-security icon-security-locked");
204
         buttonClick("#lockIcon", "icon-security icon-security-locked");
262
     };
205
     };
263
 
206
 
264
-    /**
265
-     * Hides the toolbar.
266
-     */
267
-    var hideToolbar = function () {
268
-        var isToolbarHover = false;
269
-        $('#header').find('*').each(function () {
270
-            var id = $(this).attr('id');
271
-            if ($("#" + id + ":hover").length > 0) {
272
-                isToolbarHover = true;
273
-            }
274
-        });
275
-
276
-        clearTimeout(toolbarTimeout);
277
-        toolbarTimeout = null;
278
-
279
-        if (!isToolbarHover) {
280
-            $('#header').hide("slide", { direction: "up", duration: 300});
281
-            $('#subject').animate({top: "-=40"}, 300);
282
-        }
283
-        else {
284
-            toolbarTimeout = setTimeout(hideToolbar, TOOLBAR_TIMEOUT);
285
-        }
286
-    };
287
-
288
     // Shows or hides the 'recording' button.
207
     // Shows or hides the 'recording' button.
289
     my.showRecordingButton = function (show) {
208
     my.showRecordingButton = function (show) {
290
         if (!config.enableRecording) {
209
         if (!config.enableRecording) {

+ 100
- 0
toolbar_toggler.js Vedi File

1
+var ToolbarToggler = (function(my) {
2
+    var INITIAL_TOOLBAR_TIMEOUT = 20000;
3
+    var TOOLBAR_TIMEOUT = INITIAL_TOOLBAR_TIMEOUT;
4
+    var toolbarTimeout;
5
+
6
+    /**
7
+     * Shows the main toolbar.
8
+     */
9
+    my.showToolbar = function() {
10
+        var header = $("#header"),
11
+            bottomToolbar = $("#bottomToolbar");
12
+        if (!header.is(':visible') || !bottomToolbar.is(":visible")) {
13
+            header.show("slide", { direction: "up", duration: 300});
14
+            $('#subject').animate({top: "+=40"}, 300);
15
+            if(!bottomToolbar.is(":visible")) {
16
+                bottomToolbar.show("slide", {direction: "right",cduration: 300});
17
+            }
18
+
19
+            if (toolbarTimeout) {
20
+                clearTimeout(toolbarTimeout);
21
+                toolbarTimeout = null;
22
+            }
23
+            toolbarTimeout = setTimeout(hideToolbar, TOOLBAR_TIMEOUT);
24
+            TOOLBAR_TIMEOUT = 4000;
25
+        }
26
+
27
+        if (focus != null)
28
+        {
29
+//            TODO: Enable settings functionality. Need to uncomment the settings button in index.html.
30
+//            $('#settingsButton').css({visibility:"visible"});
31
+        }
32
+
33
+        // Show/hide desktop sharing button
34
+        showDesktopSharingButton();
35
+    };
36
+
37
+    /**
38
+     * Hides the toolbar.
39
+     */
40
+    var hideToolbar = function () {
41
+        var header = $("#header"),
42
+            bottomToolbar = $("#bottomToolbar");
43
+        var isToolbarHover = false;
44
+        header.find('*').each(function () {
45
+            var id = $(this).attr('id');
46
+            if ($("#" + id + ":hover").length > 0) {
47
+                isToolbarHover = true;
48
+            }
49
+        });
50
+        if($("#bottomToolbar:hover").length > 0) {
51
+                isToolbarHover = true;
52
+        }
53
+
54
+        clearTimeout(toolbarTimeout);
55
+        toolbarTimeout = null;
56
+
57
+        if (!isToolbarHover) {
58
+            header.hide("slide", { direction: "up", duration: 300});
59
+            $('#subject').animate({top: "-=40"}, 300);
60
+            if(!$("#remoteVideos").is(":visible")) {
61
+                bottomToolbar.hide("slide", {direction: "right", cduration: 300});
62
+            }
63
+        }
64
+        else {
65
+            toolbarTimeout = setTimeout(hideToolbar, TOOLBAR_TIMEOUT);
66
+        }
67
+    };
68
+
69
+
70
+    /**
71
+     * Docks/undocks the toolbar.
72
+     *
73
+     * @param isDock indicates what operation to perform
74
+     */
75
+    my.dockToolbar = function(isDock) {
76
+        if (isDock) {
77
+            // First make sure the toolbar is shown.
78
+            if (!$('#header').is(':visible')) {
79
+                ToolbarToggler.showToolbar();
80
+            }
81
+
82
+            // Then clear the time out, to dock the toolbar.
83
+            if (toolbarTimeout) {
84
+                clearTimeout(toolbarTimeout);
85
+                toolbarTimeout = null;
86
+            }
87
+        }
88
+        else {
89
+            if (!$('#header').is(':visible')) {
90
+                ToolbarToggler.showToolbar();
91
+            }
92
+            else {
93
+                toolbarTimeout = setTimeout(hideToolbar, TOOLBAR_TIMEOUT);
94
+            }
95
+        }
96
+    };
97
+
98
+
99
+    return my;
100
+}(ToolbarToggler || {}));

Loading…
Annulla
Salva