Last active
July 18, 2016 21:57
-
-
Save kovchiy/39b0c0bd6559af78df0cbfacb446fcf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ConvertLinks(linksArray) { | |
return { | |
elem: 'group', | |
content: linksArray.map(function(item) { | |
return { | |
block: 'menu-item', | |
mods: { type: 'link', userSettingsItem: true }, | |
content: { | |
block: 'link', | |
url: item.url, | |
content: item.text | |
} | |
}; | |
}) | |
}; | |
} | |
block('popup').mod('userSettings', true)( | |
content()(function(){ | |
return [{ | |
elem: 'topSquare', | |
content: null | |
}, | |
{ | |
block: 'menu', | |
mods : { mode : 'radio' }, | |
content: this.ctx.links.map(ConvertLinks) | |
}] | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment