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() {
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>')
.appendTo('#content .account > .row > div:first-child')
.find('input')
.prop('checked', Storage.getItem('persona:menus:legacy-layout', 'true'))
.change(function (e) {
if (e.target.checked) {
Storage.setItem('persona:menus:legacy-layout', 'true');
} else {
Storage.removeItem('persona:menus:legacy-layout');
}
require(['translator'], function (translator) {
translator.translate('[[persona:mobile-menu-side]]', function (translated) {
$('<div class="well checkbox"><label><input type="checkbox" id="persona:menus:legacy-layout"/><strong>' + translated + '</strong></label></div>')
.appendTo('#content .account > .row > div:first-child')
.find('input')
.prop('checked', Storage.getItem('persona:menus:legacy-layout', 'true'))
.change(function (e) {
if (e.target.checked) {
Storage.setItem('persona:menus:legacy-layout', 'true');
} else {
Storage.removeItem('persona:menus:legacy-layout');
}
});
});
})
}
}

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