fix(toolbar): Button popups
This commit is contained in:
parent
09f7615a35
commit
2b84a149fe
|
@ -1,6 +1,7 @@
|
||||||
/*Initialize*/
|
/*Initialize*/
|
||||||
ul.loginmenu {
|
ul.loginmenu {
|
||||||
font-family: inherit;
|
font-family: $baseFontFamily;
|
||||||
|
line-height: normal;
|
||||||
display:none;
|
display:none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -56,3 +57,16 @@ a.disabled {
|
||||||
top: -30px;
|
top: -30px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loginmenu.extendedToolbarPopup {
|
||||||
|
left: 55px;
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.loginmenu.extendedToolbarPopup:after {
|
||||||
|
content: url('../images/leftDropdownPointer.png');
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 18px;
|
||||||
|
left: -7px;
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 611 B |
|
@ -109,7 +109,7 @@
|
||||||
</a>
|
</a>
|
||||||
<span id="authentication" class="authentication" style="display: none">
|
<span id="authentication" class="authentication" style="display: none">
|
||||||
<a class="button icon-avatar" id="toolbar_button_authentication" data-i18n="[content]toolbar.authenticate"></a>
|
<a class="button icon-avatar" id="toolbar_button_authentication" data-i18n="[content]toolbar.authenticate"></a>
|
||||||
<ul class="loginmenu">
|
<ul class="loginmenu extendedToolbarPopup">
|
||||||
<span class="loginmenuPadding"></span>
|
<span class="loginmenuPadding"></span>
|
||||||
<li id="toolbar_auth_identity"></li>
|
<li id="toolbar_auth_identity"></li>
|
||||||
<li id="toolbar_button_login">
|
<li id="toolbar_button_login">
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
<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-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 icon-shared-video" 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 icon-shared-video" 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 extendedToolbarPopup">
|
||||||
<li data-i18n="[html]toolbar.sharedVideoMutedPopup"></li>
|
<li data-i18n="[html]toolbar.sharedVideoMutedPopup"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -184,6 +184,18 @@ const defaultToolbarButtons = {
|
||||||
APP.conference.toggleAudioMuted();
|
APP.conference.toggleAudioMuted();
|
||||||
},
|
},
|
||||||
shortcutDescription: "keyboardShortcuts.mute",
|
shortcutDescription: "keyboardShortcuts.mute",
|
||||||
|
popups: [
|
||||||
|
{
|
||||||
|
id: "micMutedPopup",
|
||||||
|
className: "loginmenu",
|
||||||
|
dataAttr: "[html]toolbar.micMutedPopup"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "unableToUnmutePopup",
|
||||||
|
className: "loginmenu",
|
||||||
|
dataAttr: "[html]toolbar.unableToUnmutePopup"
|
||||||
|
}
|
||||||
|
],
|
||||||
content: "Mute / Unmute",
|
content: "Mute / Unmute",
|
||||||
i18n: "[content]toolbar.mute"
|
i18n: "[content]toolbar.mute"
|
||||||
},
|
},
|
||||||
|
@ -704,9 +716,22 @@ const Toolbar = {
|
||||||
buttonElement.setAttribute("data-container", "body");
|
buttonElement.setAttribute("data-container", "body");
|
||||||
buttonElement.setAttribute("data-toggle", "popover");
|
buttonElement.setAttribute("data-toggle", "popover");
|
||||||
buttonElement.setAttribute("data-placement", "bottom");
|
buttonElement.setAttribute("data-placement", "bottom");
|
||||||
|
this._addPopups(buttonElement, button.popups);
|
||||||
|
|
||||||
document.getElementById("mainToolbar")
|
document.getElementById("mainToolbar")
|
||||||
.appendChild(buttonElement);
|
.appendChild(buttonElement);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addPopups(buttonElement, popups = []) {
|
||||||
|
popups.forEach((popup) => {
|
||||||
|
let popupElement = document.createElement("ul");
|
||||||
|
popupElement.id = popup.id;
|
||||||
|
popupElement.className = popup.className;
|
||||||
|
let liElement = document.createElement("li");
|
||||||
|
liElement.setAttribute("data-i18n", popup.dataAttr);
|
||||||
|
popupElement.appendChild(liElement);
|
||||||
|
buttonElement.appendChild(popupElement);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue