Remove inline styles for screen sharing menu items

The items in "app-navigation-entry-menu" lists were forced to be
displayed as blocks with an "!important" rule, so inline rules were used
to hide some items in the screensharing menu.

However, forcing the items in "app-navigation-entry-menus" lists to be
displayed as blocks is no longer needed; that class is only used in the
room list menus and in the screensharing menu, and both work fine
without it. Moreover, the server provides rules to hide items in those
menus by adding the "hidden" class, so that approach is used now instead
of the inline styles.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2018-11-30 13:34:55 +01:00
Родитель 98277660a8
Коммит a4e0a6e2e8
2 изменённых файлов: 8 добавлений и 14 удалений

Просмотреть файл

@ -107,10 +107,6 @@
padding: 0;
}
.app-navigation-entry-menu li {
display: block !important;
}
.participantWithList .avatar,
#app-navigation .avatar,
#app-navigation .icon-contacts-dark,

Просмотреть файл

@ -263,20 +263,18 @@
splitShare = (ffver >= 52);
}
// The parent CSS of the menu list items is using "display:block !important",
// so we need to also hide with "!important".
if (webrtc.getLocalScreen()) {
$('#share-screen-entry').attr('style','display:none !important');
$('#share-window-entry').attr('style','display:none !important');
$('#show-screen-entry').show();
$('#stop-screen-entry').show();
$('#share-screen-entry').addClass('hidden');
$('#share-window-entry').addClass('hidden');
$('#show-screen-entry').removeClass('hidden');
$('#stop-screen-entry').removeClass('hidden');
$('#screensharing-menu').toggleClass('open');
} else {
if (splitShare) {
$('#share-screen-entry').show();
$('#share-window-entry').show();
$('#show-screen-entry').attr('style','display:none !important');
$('#stop-screen-entry').attr('style','display:none !important');
$('#share-screen-entry').removeClass('hidden');
$('#share-window-entry').removeClass('hidden');
$('#show-screen-entry').addClass('hidden');
$('#stop-screen-entry').addClass('hidden');
$('#screensharing-menu').toggleClass('open');
return;
}