Fixes side toolbar container behavior
This commit is contained in:
parent
b4c9816d9f
commit
50e803f1a0
|
@ -28,6 +28,11 @@
|
||||||
padding: 7px 10px;
|
padding: 7px 10px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active {
|
||||||
|
background: $toolbarSelectBackground;
|
||||||
|
}
|
||||||
|
|
||||||
> p {
|
> p {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: $defaultToolbarSize;
|
left: $defaultToolbarSize;
|
||||||
width:0%;
|
width: 0%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
background-color: rgba(0,0,0,0.8);
|
background-color: rgba(0,0,0,0.8);
|
||||||
|
@ -145,7 +145,7 @@ a.button:active,
|
||||||
a.button.selected {
|
a.button.selected {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// sum opacity with background layer should give us 0.8
|
// sum opacity with background layer should give us 0.8
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: $toolbarSelectBackground;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.button>#avatar {
|
a.button>#avatar {
|
||||||
|
@ -163,6 +163,7 @@ a.button>#avatar {
|
||||||
* START of slide in animation for extended toolbar.
|
* START of slide in animation for extended toolbar.
|
||||||
*/
|
*/
|
||||||
@include keyframes(slideInX) {
|
@include keyframes(slideInX) {
|
||||||
|
0% { transform: translateX(-100%); }
|
||||||
100% { transform: translateX(0%); }
|
100% { transform: translateX(0%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +179,25 @@ a.button>#avatar {
|
||||||
.slideOutX {
|
.slideOutX {
|
||||||
@include animation('slideOutX .5s forwards');
|
@include animation('slideOutX .5s forwards');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include keyframes(slideInExtX) {
|
||||||
|
0% { transform: translateX(-500%); }
|
||||||
|
100% { transform: translateX(0%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.slideInExtX {
|
||||||
|
@include animation('slideInExtX .5s forwards');
|
||||||
|
}
|
||||||
|
|
||||||
|
@include keyframes(slideOutExtX) {
|
||||||
|
0% { transform: translateX(0%); }
|
||||||
|
100% { transform: translateX(-500%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.slideOutExtX {
|
||||||
|
@include animation('slideOutExtX .5s forwards');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* END of slide out animation for extended toolbar.
|
* END of slide out animation for extended toolbar.
|
||||||
*/
|
*/
|
||||||
|
@ -209,8 +229,8 @@ a.button>#avatar {
|
||||||
* START of slide in animation for extended toolbar panel.
|
* START of slide in animation for extended toolbar panel.
|
||||||
*/
|
*/
|
||||||
@include keyframes(slideInExt) {
|
@include keyframes(slideInExt) {
|
||||||
from { width: 0%; }
|
from { width: 0px; }
|
||||||
to { width: 20%; }
|
to { width: 200px; } // TO FIX: Make this value a percentage.
|
||||||
}
|
}
|
||||||
|
|
||||||
.slideInExt {
|
.slideInExt {
|
||||||
|
@ -218,8 +238,8 @@ a.button>#avatar {
|
||||||
}
|
}
|
||||||
|
|
||||||
@include keyframes(slideOutExt) {
|
@include keyframes(slideOutExt) {
|
||||||
from { width: 20%; }
|
from { width: 200px; } // TO FIX: Make this value a percentage.
|
||||||
to { width: 0%; }
|
to { width: 0px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.slideOutExt {
|
.slideOutExt {
|
||||||
|
|
|
@ -8,3 +8,8 @@ $baseFontFamily: 'open_sanslight', 'Helvetica Neue', Helvetica, Arial, sans-seri
|
||||||
*/
|
*/
|
||||||
$defaultToolbarSize: 50px;
|
$defaultToolbarSize: 50px;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Miscellaneous.
|
||||||
|
*/
|
||||||
|
$toolbarSelectBackground: rgba(0, 0, 0, 0.6);
|
||||||
|
|
||||||
|
|
80
index.html
80
index.html
|
@ -116,7 +116,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="subject" class="hide"></div>
|
<div id="subject" class="hide"></div>
|
||||||
<span id="extendedToolbar" class="toolbar">
|
<div id="extendedToolbar" class="toolbar">
|
||||||
<a class="button" data-container="body" data-placement="right" data-i18n="[content]toolbar.profile" content="Edit your profile">
|
<a class="button" data-container="body" data-placement="right" data-i18n="[content]toolbar.profile" content="Edit your profile">
|
||||||
<img id="avatar" src="images/avatar2.png"/>
|
<img id="avatar" src="images/avatar2.png"/>
|
||||||
</a>
|
</a>
|
||||||
|
@ -133,6 +133,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
|
<a class="button icon-link" id="toolbar_button_link" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[content]toolbar.invite" content="Invite others"></a>
|
||||||
<a class="button icon-contactList" id="toolbar_contact_list" data-container="body" data-toggle="popover" data-placement="right" shortcut="contactlistpopover" data-i18n="[content]bottomtoolbar.contactlist" content="Open / close contact list">
|
<a class="button icon-contactList" id="toolbar_contact_list" data-container="body" data-toggle="popover" data-placement="right" shortcut="contactlistpopover" data-i18n="[content]bottomtoolbar.contactlist" content="Open / close contact list">
|
||||||
<span id="numberOfParticipants"></span>
|
<span id="numberOfParticipants"></span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -141,7 +142,6 @@
|
||||||
</a>
|
</a>
|
||||||
<a class="button" id="toolbar_button_record" data-container="body" data-toggle="popover" data-placement="right" style="display: none"></a>
|
<a class="button" id="toolbar_button_record" data-container="body" data-toggle="popover" data-placement="right" style="display: none"></a>
|
||||||
<a class="button icon-security" id="toolbar_button_security" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[content]toolbar.lock" content="Lock / unlock room"></a>
|
<a class="button icon-security" id="toolbar_button_security" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[content]toolbar.lock" content="Lock / unlock room"></a>
|
||||||
<a class="button icon-link" id="toolbar_button_link" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[content]toolbar.invite" content="Invite others"></a>
|
|
||||||
<a class="button icon-share-doc" id="toolbar_button_etherpad" data-container="body" data-toggle="popover" data-placement="right" content="Shared document" data-i18n="[content]toolbar.etherpad"></a>
|
<a class="button icon-share-doc" id="toolbar_button_etherpad" data-container="body" data-toggle="popover" data-placement="right" content="Shared document" data-i18n="[content]toolbar.etherpad"></a>
|
||||||
<a class="button fa fa-share-alt-square" id="toolbar_button_sharedvideo" data-container="body" data-toggle="popover" data-placement="right" content="Share a YouTube video" data-i18n="[content]toolbar.sharedvideo" style="display: none">
|
<a class="button fa fa-share-alt-square" id="toolbar_button_sharedvideo" data-container="body" data-toggle="popover" data-placement="right" content="Share a YouTube video" data-i18n="[content]toolbar.sharedvideo" style="display: none">
|
||||||
<ul id="sharedVideoMutedPopup" class="loginmenu">
|
<ul id="sharedVideoMutedPopup" class="loginmenu">
|
||||||
|
@ -153,44 +153,6 @@
|
||||||
<a class="button icon-settings" id="toolbar_button_settings" data-container="body" data-toggle="popover" data-placement="right" content="Settings" data-i18n="[content]toolbar.Settings"></a>
|
<a class="button icon-settings" id="toolbar_button_settings" data-container="body" data-toggle="popover" data-placement="right" content="Settings" data-i18n="[content]toolbar.Settings"></a>
|
||||||
<a class="button icon-filmstrip" id="toolbar_film_strip" data-container="body" data-toggle="popover" shortcut="filmstripPopover" data-placement="right" data-i18n="[content]toolbar.filmstrip" content="Show / hide videos"></a>
|
<a class="button icon-filmstrip" id="toolbar_film_strip" data-container="body" data-toggle="popover" shortcut="filmstripPopover" data-placement="right" data-i18n="[content]toolbar.filmstrip" content="Show / hide videos"></a>
|
||||||
<a class="button fa fa-heart" id="feedbackButton" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[content]feedback"></a>
|
<a class="button fa fa-heart" id="feedbackButton" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[content]feedback"></a>
|
||||||
</span>
|
|
||||||
<div id="videospace">
|
|
||||||
<div id="largeVideoContainer" class="videocontainer">
|
|
||||||
<div id="presentation"></div>
|
|
||||||
<div id="sharedVideo"><div id="sharedVideoIFrame"></div></div>
|
|
||||||
<div id="etherpad"></div>
|
|
||||||
<a target="_new"><div class="watermark leftwatermark"></div></a>
|
|
||||||
<a target="_new"><div class="watermark rightwatermark"></div></a>
|
|
||||||
<a class="poweredby" href="http://jitsi.org" target="_new">
|
|
||||||
<span data-i18n="poweredby"></span> jitsi.org
|
|
||||||
</a>
|
|
||||||
<div id="dominantSpeaker">
|
|
||||||
<img id="dominantSpeakerAvatar" src=""/>
|
|
||||||
<canvas id="dominantSpeakerAudioLevel"></canvas>
|
|
||||||
</div>
|
|
||||||
<div id="largeVideoWrapper">
|
|
||||||
<video id="largeVideo" muted="true" autoplay></video>
|
|
||||||
</div>
|
|
||||||
<span id="videoConnectionMessage"></span>
|
|
||||||
<span id="videoResolutionLabel">HD</span>
|
|
||||||
<span id="recordingLabel" class="centeredVideoLabel">
|
|
||||||
<span id="recordingLabelText"></span>
|
|
||||||
<img id="recordingSpinner" class="recordingSpinner" src="images/spin.svg"></img>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="remoteVideos">
|
|
||||||
<span id="localVideoContainer" class="videocontainer">
|
|
||||||
<span id="localVideoWrapper">
|
|
||||||
<!--<video id="localVideo" autoplay muted></video> - is now per stream generated -->
|
|
||||||
</span>
|
|
||||||
<audio id="localAudio" autoplay muted></audio>
|
|
||||||
<span class="focusindicator"></span>
|
|
||||||
</span>
|
|
||||||
<audio id="userJoined" src="sounds/joined.wav" preload="auto"></audio>
|
|
||||||
<audio id="userLeft" src="sounds/left.wav" preload="auto"></audio>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="sideToolbarContainer">
|
<div id="sideToolbarContainer">
|
||||||
<div id="chat_container" class="sideToolbarContainer__inner">
|
<div id="chat_container" class="sideToolbarContainer__inner">
|
||||||
<div id="nickname">
|
<div id="nickname">
|
||||||
|
@ -253,6 +215,44 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="videospace">
|
||||||
|
<div id="largeVideoContainer" class="videocontainer">
|
||||||
|
<div id="presentation"></div>
|
||||||
|
<div id="sharedVideo"><div id="sharedVideoIFrame"></div></div>
|
||||||
|
<div id="etherpad"></div>
|
||||||
|
<a target="_new"><div class="watermark leftwatermark"></div></a>
|
||||||
|
<a target="_new"><div class="watermark rightwatermark"></div></a>
|
||||||
|
<a class="poweredby" href="http://jitsi.org" target="_new">
|
||||||
|
<span data-i18n="poweredby"></span> jitsi.org
|
||||||
|
</a>
|
||||||
|
<div id="dominantSpeaker">
|
||||||
|
<img id="dominantSpeakerAvatar" src=""/>
|
||||||
|
<canvas id="dominantSpeakerAudioLevel"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="largeVideoWrapper">
|
||||||
|
<video id="largeVideo" muted="true" preload="auto" autoplay></video>
|
||||||
|
</div>
|
||||||
|
<span id="videoConnectionMessage"></span>
|
||||||
|
<span id="videoResolutionLabel">HD</span>
|
||||||
|
<span id="recordingLabel" class="centeredVideoLabel">
|
||||||
|
<span id="recordingLabelText"></span>
|
||||||
|
<img id="recordingSpinner" class="recordingSpinner" src="images/spin.svg"></img>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="remoteVideos">
|
||||||
|
<span id="localVideoContainer" class="videocontainer">
|
||||||
|
<span id="localVideoWrapper">
|
||||||
|
<!--<video id="localVideo" autoplay muted></video> - is now per stream generated -->
|
||||||
|
</span>
|
||||||
|
<audio id="localAudio" autoplay muted></audio>
|
||||||
|
<span class="focusindicator"></span>
|
||||||
|
</span>
|
||||||
|
<audio id="userJoined" src="sounds/joined.wav" preload="auto"></audio>
|
||||||
|
<audio id="userLeft" src="sounds/left.wav" preload="auto"></audio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="keyboard-shortcuts" class="keyboard-shortcuts" style="display:none;">
|
<div id="keyboard-shortcuts" class="keyboard-shortcuts" style="display:none;">
|
||||||
<div class="header"><h3 data-i18n="keyboardShortcuts.keyboardShortcuts"></h3></div>
|
<div class="header"><h3 data-i18n="keyboardShortcuts.keyboardShortcuts"></h3></div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
|
@ -57,7 +57,7 @@ const SideContainerToggler = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns {true} if the extended toolbar panel is currently visible,
|
* Returns {true} if the side toolbar panel is currently visible,
|
||||||
* otherwise returns {false}.
|
* otherwise returns {false}.
|
||||||
*/
|
*/
|
||||||
isVisible() {
|
isVisible() {
|
||||||
|
@ -65,7 +65,15 @@ const SideContainerToggler = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides the extended toolbar panel with a slide out animation.
|
* Returns {true} if the side toolbar panel is currently hovered and
|
||||||
|
* {false} otherwise.
|
||||||
|
*/
|
||||||
|
isHovered() {
|
||||||
|
return $("#sideToolbarContainer:hover").length > 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hides the side toolbar panel with a slide out animation.
|
||||||
*/
|
*/
|
||||||
hide() {
|
hide() {
|
||||||
$("#sideToolbarContainer")
|
$("#sideToolbarContainer")
|
||||||
|
@ -73,7 +81,7 @@ const SideContainerToggler = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows the extended toolbar panel with a slide in animation.
|
* Shows the side toolbar panel with a slide in animation.
|
||||||
*/
|
*/
|
||||||
show() {
|
show() {
|
||||||
if (!this.isVisible())
|
if (!this.isVisible())
|
||||||
|
@ -81,6 +89,12 @@ const SideContainerToggler = {
|
||||||
.removeClass("slideOutExt").addClass("slideInExt");
|
.removeClass("slideOutExt").addClass("slideInExt");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hides the inner container given by the selector.
|
||||||
|
*
|
||||||
|
* @param {Object} containerSelector the jquery selector for the
|
||||||
|
* element to hide
|
||||||
|
*/
|
||||||
hideInnerContainer(containerSelector) {
|
hideInnerContainer(containerSelector) {
|
||||||
containerSelector.removeClass("show").addClass("hide");
|
containerSelector.removeClass("show").addClass("hide");
|
||||||
|
|
||||||
|
@ -88,6 +102,12 @@ const SideContainerToggler = {
|
||||||
containerSelector.attr('id'), false);
|
containerSelector.attr('id'), false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows the inner container given by the selector.
|
||||||
|
*
|
||||||
|
* @param {Object} containerSelector the jquery selector for the
|
||||||
|
* element to show
|
||||||
|
*/
|
||||||
showInnerContainer(containerSelector) {
|
showInnerContainer(containerSelector) {
|
||||||
containerSelector.removeClass("hide").addClass("show");
|
containerSelector.removeClass("hide").addClass("show");
|
||||||
|
|
||||||
|
|
|
@ -298,8 +298,7 @@ const Toolbar = {
|
||||||
|
|
||||||
APP.UI.addListener(UIEvents.SIDE_TOOLBAR_CONTAINER_TOGGLED,
|
APP.UI.addListener(UIEvents.SIDE_TOOLBAR_CONTAINER_TOGGLED,
|
||||||
function(containerId, isVisible) {
|
function(containerId, isVisible) {
|
||||||
console.log("TOGGLED", containerId, isVisible);
|
Toolbar._handleSideToolbarContainerToggled( containerId,
|
||||||
Toolbar.handleSideToolbarContainerToggled( containerId,
|
|
||||||
isVisible);
|
isVisible);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -544,7 +543,7 @@ const Toolbar = {
|
||||||
return true;
|
return true;
|
||||||
if ($("#bottomToolbar:hover").length > 0
|
if ($("#bottomToolbar:hover").length > 0
|
||||||
|| $("#extendedToolbar:hover").length > 0
|
|| $("#extendedToolbar:hover").length > 0
|
||||||
|| SideContainerToggler.isVisible()) {
|
|| SideContainerToggler.isHovered()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -564,8 +563,16 @@ const Toolbar = {
|
||||||
*/
|
*/
|
||||||
hide() {
|
hide() {
|
||||||
this.toolbarSelector.toggleClass("slideInY").toggleClass("slideOutY");
|
this.toolbarSelector.toggleClass("slideInY").toggleClass("slideOutY");
|
||||||
this.extendedToolbarSelector.toggleClass("slideInX")
|
|
||||||
.toggleClass("slideOutX");
|
let slideInAnimation = (SideContainerToggler.isVisible)
|
||||||
|
? "slideInExtX"
|
||||||
|
: "slideInX";
|
||||||
|
let slideOutAnimation = (SideContainerToggler.isVisible)
|
||||||
|
? "slideOutExtX"
|
||||||
|
: "slideOutX";
|
||||||
|
|
||||||
|
this.extendedToolbarSelector.toggleClass(slideInAnimation)
|
||||||
|
.toggleClass(slideOutAnimation);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -576,17 +583,30 @@ const Toolbar = {
|
||||||
if (this.toolbarSelector.hasClass("slideOutY"))
|
if (this.toolbarSelector.hasClass("slideOutY"))
|
||||||
this.toolbarSelector.toggleClass("slideOutY");
|
this.toolbarSelector.toggleClass("slideOutY");
|
||||||
|
|
||||||
if (this.extendedToolbarSelector.hasClass("slideOutX"))
|
let slideInAnimation = (SideContainerToggler.isVisible)
|
||||||
this.extendedToolbarSelector.toggleClass("slideOutX");
|
? "slideInExtX"
|
||||||
|
: "slideInX";
|
||||||
|
let slideOutAnimation = (SideContainerToggler.isVisible)
|
||||||
|
? "slideOutExtX"
|
||||||
|
: "slideOutX";
|
||||||
|
|
||||||
|
if (this.extendedToolbarSelector.hasClass(slideOutAnimation))
|
||||||
|
this.extendedToolbarSelector.toggleClass(slideOutAnimation);
|
||||||
|
|
||||||
this.toolbarSelector.toggleClass("slideInY");
|
this.toolbarSelector.toggleClass("slideInY");
|
||||||
this.extendedToolbarSelector.toggleClass("slideInX");
|
this.extendedToolbarSelector.toggleClass(slideInAnimation);
|
||||||
|
},
|
||||||
|
|
||||||
|
registerClickListeners(listener) {
|
||||||
|
$('#mainToolbarContainer').click(listener);
|
||||||
|
|
||||||
|
$("#extendedToolbar").click(listener);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Handles the side toolbar toggle.
|
||||||
*/
|
*/
|
||||||
handleSideToolbarContainerToggled(containerId, isVisible) {
|
_handleSideToolbarContainerToggled(containerId, isVisible) {
|
||||||
Object.keys(defaultToolbarButtons).forEach(
|
Object.keys(defaultToolbarButtons).forEach(
|
||||||
id => {
|
id => {
|
||||||
if (!UIUtil.isButtonEnabled(id))
|
if (!UIUtil.isButtonEnabled(id))
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import UIUtil from '../util/UIUtil';
|
import UIUtil from '../util/UIUtil';
|
||||||
import Toolbar from './Toolbar';
|
import Toolbar from './Toolbar';
|
||||||
|
import SideContainerToggler from "../side_pannels/SideContainerToggler";
|
||||||
import FilmStrip from '../videolayout/FilmStrip.js';
|
import FilmStrip from '../videolayout/FilmStrip.js';
|
||||||
|
|
||||||
let toolbarTimeoutObject;
|
let toolbarTimeoutObject;
|
||||||
|
@ -22,8 +23,11 @@ function showDesktopSharingButton() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides the toolbar.
|
* Hides the toolbar.
|
||||||
|
*
|
||||||
|
* @param force {true} to force the hiding of the toolbar without caring about
|
||||||
|
* the extended toolbar side panels.
|
||||||
*/
|
*/
|
||||||
function hideToolbar() {
|
function hideToolbar(force) {
|
||||||
if (alwaysVisibleToolbar) {
|
if (alwaysVisibleToolbar) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +37,7 @@ function hideToolbar() {
|
||||||
|
|
||||||
if (Toolbar.isHovered()) {
|
if (Toolbar.isHovered()) {
|
||||||
toolbarTimeoutObject = setTimeout(hideToolbar, toolbarTimeout);
|
toolbarTimeoutObject = setTimeout(hideToolbar, toolbarTimeout);
|
||||||
} else {
|
} else if (!SideContainerToggler.isVisible() || force) {
|
||||||
Toolbar.hide();
|
Toolbar.hide();
|
||||||
$('#subject').animate({top: "-=40"}, 300);
|
$('#subject').animate({top: "-=40"}, 300);
|
||||||
}
|
}
|
||||||
|
@ -45,7 +49,26 @@ const ToolbarToggler = {
|
||||||
*/
|
*/
|
||||||
init() {
|
init() {
|
||||||
alwaysVisibleToolbar = (config.alwaysVisibleToolbar === true);
|
alwaysVisibleToolbar = (config.alwaysVisibleToolbar === true);
|
||||||
|
|
||||||
|
this._registerWindowClickListeners();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers click listeners handling the show and hode of toolbars when
|
||||||
|
* user clicks outside of toolbar area.
|
||||||
|
*/
|
||||||
|
_registerWindowClickListeners() {
|
||||||
|
$(window).click(function() {
|
||||||
|
(Toolbar.isEnabled() && Toolbar.isVisible())
|
||||||
|
? hideToolbar(true)
|
||||||
|
: this.showToolbar();
|
||||||
|
}.bind(this));
|
||||||
|
|
||||||
|
Toolbar.registerClickListeners(function(event){
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of alwaysVisibleToolbar variable.
|
* Sets the value of alwaysVisibleToolbar variable.
|
||||||
* @param value {boolean} the new value of alwaysVisibleToolbar variable
|
* @param value {boolean} the new value of alwaysVisibleToolbar variable
|
||||||
|
@ -53,12 +76,14 @@ const ToolbarToggler = {
|
||||||
setAlwaysVisibleToolbar(value) {
|
setAlwaysVisibleToolbar(value) {
|
||||||
alwaysVisibleToolbar = value;
|
alwaysVisibleToolbar = value;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the value of alwaysVisibleToolbar variable to the default one.
|
* Resets the value of alwaysVisibleToolbar variable to the default one.
|
||||||
*/
|
*/
|
||||||
resetAlwaysVisibleToolbar() {
|
resetAlwaysVisibleToolbar() {
|
||||||
alwaysVisibleToolbar = (config.alwaysVisibleToolbar === true);
|
alwaysVisibleToolbar = (config.alwaysVisibleToolbar === true);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows the main toolbar.
|
* Shows the main toolbar.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue