소스 검색

Fixes jshint warnings in toolbar_toggler.js

master
paweldomas 11 년 전
부모
커밋
ed2d7e4282
1개의 변경된 파일15개의 추가작업 그리고 11개의 파일을 삭제
  1. 15
    11
      toolbar_toggler.js

+ 15
- 11
toolbar_toggler.js 파일 보기

1
-var ToolbarToggler = (function(my) {
1
+/* global $, interfaceConfig, showDesktopSharingButton */
2
+var ToolbarToggler = (function (my) {
2
     var toolbarTimeoutObject,
3
     var toolbarTimeoutObject,
3
         toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
4
         toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
4
 
5
 
5
     /**
6
     /**
6
      * Shows the main toolbar.
7
      * Shows the main toolbar.
7
      */
8
      */
8
-    my.showToolbar = function() {
9
+    my.showToolbar = function () {
9
         var header = $("#header"),
10
         var header = $("#header"),
10
             bottomToolbar = $("#bottomToolbar");
11
             bottomToolbar = $("#bottomToolbar");
11
         if (!header.is(':visible') || !bottomToolbar.is(":visible")) {
12
         if (!header.is(':visible') || !bottomToolbar.is(":visible")) {
12
             header.show("slide", { direction: "up", duration: 300});
13
             header.show("slide", { direction: "up", duration: 300});
13
             $('#subject').animate({top: "+=40"}, 300);
14
             $('#subject').animate({top: "+=40"}, 300);
14
-            if(!bottomToolbar.is(":visible")) {
15
-                bottomToolbar.show("slide", {direction: "right",duration: 300});
15
+            if (!bottomToolbar.is(":visible")) {
16
+                bottomToolbar.show(
17
+                    "slide", {direction: "right", duration: 300});
16
             }
18
             }
17
 
19
 
18
             if (toolbarTimeoutObject) {
20
             if (toolbarTimeoutObject) {
23
             toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
25
             toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
24
         }
26
         }
25
 
27
 
26
-        if (focus != null)
28
+        if (focus !== null)
27
         {
29
         {
28
-//            TODO: Enable settings functionality. Need to uncomment the settings button in index.html.
30
+//            TODO: Enable settings functionality.
31
+//                  Need to uncomment the settings button in index.html.
29
 //            $('#settingsButton').css({visibility:"visible"});
32
 //            $('#settingsButton').css({visibility:"visible"});
30
         }
33
         }
31
 
34
 
46
                 isToolbarHover = true;
49
                 isToolbarHover = true;
47
             }
50
             }
48
         });
51
         });
49
-        if($("#bottomToolbar:hover").length > 0) {
50
-                isToolbarHover = true;
52
+        if ($("#bottomToolbar:hover").length > 0) {
53
+            isToolbarHover = true;
51
         }
54
         }
52
 
55
 
53
         clearTimeout(toolbarTimeoutObject);
56
         clearTimeout(toolbarTimeoutObject);
56
         if (!isToolbarHover) {
59
         if (!isToolbarHover) {
57
             header.hide("slide", { direction: "up", duration: 300});
60
             header.hide("slide", { direction: "up", duration: 300});
58
             $('#subject').animate({top: "-=40"}, 300);
61
             $('#subject').animate({top: "-=40"}, 300);
59
-            if($("#remoteVideos").hasClass("hidden")) {
60
-                bottomToolbar.hide("slide", {direction: "right", duration: 300});
62
+            if ($("#remoteVideos").hasClass("hidden")) {
63
+                bottomToolbar.hide(
64
+                    "slide", {direction: "right", duration: 300});
61
             }
65
             }
62
         }
66
         }
63
         else {
67
         else {
71
      *
75
      *
72
      * @param isDock indicates what operation to perform
76
      * @param isDock indicates what operation to perform
73
      */
77
      */
74
-    my.dockToolbar = function(isDock) {
78
+    my.dockToolbar = function (isDock) {
75
         if (isDock) {
79
         if (isDock) {
76
             // First make sure the toolbar is shown.
80
             // First make sure the toolbar is shown.
77
             if (!$('#header').is(':visible')) {
81
             if (!$('#header').is(':visible')) {

Loading…
취소
저장