Fix RTL switching sides of menus and buttons

main
Peter Jaszkowiak 7 years ago
parent 8328c08bed
commit a38221f1c9

@ -56,6 +56,10 @@
line-height: 30px;
border: none;
html[data-dir="rtl"] button& {
margin-left: 0;
}
.header & .notification-icon {
left: auto;
right: 7px;

@ -118,20 +118,24 @@ $(document).ready(function() {
// initialization
var guest = !app.user || !parseInt(app.user.uid, 10);
var legacy = !!Storage.getItem('persona:menus:legacy-layout');
var swapped = !!Storage.getItem('persona:menus:legacy-layout');
var margin = window.innerWidth;
if (legacy) {
if (swapped) {
$('#mobile-menu').removeClass('pull-left');
$('#mobile-chats').addClass('pull-left');
}
if (document.documentElement.getAttribute('data-dir') === 'rtl') {
swapped = !swapped;
}
var navSlideout = Pulling.create({
panel: document.getElementById('panel'),
menu: document.getElementById('menu'),
width: 256,
margin: margin,
side: legacy ? 'right' : 'left',
side: swapped ? 'right' : 'left',
});
$('#menu').removeClass('hidden');
@ -142,7 +146,7 @@ $(document).ready(function() {
menu: document.getElementById('chats-menu'),
width: 256,
margin: margin,
side: legacy ? 'left' : 'right',
side: swapped ? 'left' : 'right',
});
$('#chats-menu').removeClass('hidden');
}

Loading…
Cancel
Save