main
Barış Soner Uşaklı 6 years ago
parent 5deb4eee8a
commit 9a5c49d3fa

@ -0,0 +1,3 @@
{
"mobile-menu-side": "Switch which side each mobile menu is on"
}

@ -0,0 +1,3 @@
{
"mobile-menu-side": "Switch which side each mobile menu is on"
}

@ -268,17 +268,21 @@ $(document).ready(function() {
function setupSetting() { function setupSetting() {
if (ajaxify.data.template['account/settings'] && !document.getElementById('persona:menus:legacy-layout')) { if (ajaxify.data.template['account/settings'] && !document.getElementById('persona:menus:legacy-layout')) {
$('<div class="well checkbox"><label><input type="checkbox" id="persona:menus:legacy-layout"/><strong>Switch which side each mobile menu is on</strong></label></div>') require(['translator'], function (translator) {
.appendTo('#content .account > .row > div:first-child') translator.translate('[[persona:mobile-menu-side]]', function (translated) {
.find('input') $('<div class="well checkbox"><label><input type="checkbox" id="persona:menus:legacy-layout"/><strong>' + translated + '</strong></label></div>')
.prop('checked', Storage.getItem('persona:menus:legacy-layout', 'true')) .appendTo('#content .account > .row > div:first-child')
.change(function (e) { .find('input')
if (e.target.checked) { .prop('checked', Storage.getItem('persona:menus:legacy-layout', 'true'))
Storage.setItem('persona:menus:legacy-layout', 'true'); .change(function (e) {
} else { if (e.target.checked) {
Storage.removeItem('persona:menus:legacy-layout'); Storage.setItem('persona:menus:legacy-layout', 'true');
} } else {
Storage.removeItem('persona:menus:legacy-layout');
}
});
}); });
})
} }
} }

@ -21,5 +21,6 @@
}, },
"acpScripts": [ "acpScripts": [
"lib/admin.js" "lib/admin.js"
] ],
"languages": "languages"
} }
Loading…
Cancel
Save