Fixes jshint warnings in toolbar_toggler.js

This commit is contained in:
paweldomas 2014-11-28 16:17:13 +01:00
parent afaa96b737
commit ed2d7e4282
1 changed files with 15 additions and 11 deletions

View File

@ -1,18 +1,20 @@
var ToolbarToggler = (function(my) { /* global $, interfaceConfig, showDesktopSharingButton */
var ToolbarToggler = (function (my) {
var toolbarTimeoutObject, var toolbarTimeoutObject,
toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT; toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
/** /**
* Shows the main toolbar. * Shows the main toolbar.
*/ */
my.showToolbar = function() { my.showToolbar = function () {
var header = $("#header"), var header = $("#header"),
bottomToolbar = $("#bottomToolbar"); bottomToolbar = $("#bottomToolbar");
if (!header.is(':visible') || !bottomToolbar.is(":visible")) { if (!header.is(':visible') || !bottomToolbar.is(":visible")) {
header.show("slide", { direction: "up", duration: 300}); header.show("slide", { direction: "up", duration: 300});
$('#subject').animate({top: "+=40"}, 300); $('#subject').animate({top: "+=40"}, 300);
if(!bottomToolbar.is(":visible")) { if (!bottomToolbar.is(":visible")) {
bottomToolbar.show("slide", {direction: "right",duration: 300}); bottomToolbar.show(
"slide", {direction: "right", duration: 300});
} }
if (toolbarTimeoutObject) { if (toolbarTimeoutObject) {
@ -23,9 +25,10 @@ var ToolbarToggler = (function(my) {
toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT; toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
} }
if (focus != null) if (focus !== null)
{ {
// TODO: Enable settings functionality. Need to uncomment the settings button in index.html. // TODO: Enable settings functionality.
// Need to uncomment the settings button in index.html.
// $('#settingsButton').css({visibility:"visible"}); // $('#settingsButton').css({visibility:"visible"});
} }
@ -46,8 +49,8 @@ var ToolbarToggler = (function(my) {
isToolbarHover = true; isToolbarHover = true;
} }
}); });
if($("#bottomToolbar:hover").length > 0) { if ($("#bottomToolbar:hover").length > 0) {
isToolbarHover = true; isToolbarHover = true;
} }
clearTimeout(toolbarTimeoutObject); clearTimeout(toolbarTimeoutObject);
@ -56,8 +59,9 @@ var ToolbarToggler = (function(my) {
if (!isToolbarHover) { if (!isToolbarHover) {
header.hide("slide", { direction: "up", duration: 300}); header.hide("slide", { direction: "up", duration: 300});
$('#subject').animate({top: "-=40"}, 300); $('#subject').animate({top: "-=40"}, 300);
if($("#remoteVideos").hasClass("hidden")) { if ($("#remoteVideos").hasClass("hidden")) {
bottomToolbar.hide("slide", {direction: "right", duration: 300}); bottomToolbar.hide(
"slide", {direction: "right", duration: 300});
} }
} }
else { else {
@ -71,7 +75,7 @@ var ToolbarToggler = (function(my) {
* *
* @param isDock indicates what operation to perform * @param isDock indicates what operation to perform
*/ */
my.dockToolbar = function(isDock) { my.dockToolbar = function (isDock) {
if (isDock) { if (isDock) {
// First make sure the toolbar is shown. // First make sure the toolbar is shown.
if (!$('#header').is(':visible')) { if (!$('#header').is(':visible')) {