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