arrow-admin
Version:
Arrow Admin Website
23 lines (19 loc) • 521 B
JavaScript
define(['jquery','bootstrap'], function($){
var profile = $('div.profile'),
img = profile.find('img'),
anchor = profile.find('a');
if (typeof(CONFIG)==='object' && CONFIG.profile_link) {
img.attr('src',CONFIG.profile_link);
anchor.find('span').html(CONFIG.name);
anchor.attr('href','');
$('div.profile .dropdown li a').click(function (e) {
window.location.href = $(this).data('target');
e.preventDefault();
return false;
});
profile.show();
}
else {
$('li.menu-registry').hide();
}
});