Fix useradmin dropdown position

pull/1/head
yflory 8 years ago
parent 97d8d86395
commit e6188bfb63

@ -34,7 +34,8 @@ define([
// User admin menu
var $userMenu = $('#user-menu');
var userMenuCfg = {
$initBlock: $userMenu
$initBlock: $userMenu,
'static': true
};
var $userAdmin = Cryptpad.createUserAdminMenu(userMenuCfg);
$userAdmin.find('button').addClass('btn').addClass('btn-secondary');

@ -42,7 +42,7 @@
overflow: hidden;
text-overflow: ellipsis;
font-size: 16px;
display: inline-flex;
display: flex;
align-items: center;
&.clickable {
cursor: pointer;

@ -1657,7 +1657,7 @@ define([
//var $userbig = $('<span>', {'class': 'big'}).append($displayedName.clone());
var $userButton = $('<div>').append($icon);//.append($userbig);
if (account) {
$userButton = $('<div>');//.append(accountName.slice(0,1).toUpperCase());
$userButton = $('<div>').append(accountName);
}
/*if (account && config.displayNameCls) {
$userbig.append($('<span>', {'class': 'account-name'}).text('(' + accountName + ')'));
@ -1674,15 +1674,19 @@ define([
};
var $userAdmin = createDropdown(dropdownConfigUser);
if (account) {
if (account && !config.static && store) {
var $avatar = $userAdmin.find('.buttonTitle');
var url = store ? store.getProfile().avatar : undefined;
$avatar.html('');
common.displayAvatar($avatar, url, accountName, function ($img) {
if ($img) {
$userAdmin.find('button').addClass('avatar');
}
});
var updateButton = function (newName) {
var url = store.getProfile().avatar;
$avatar.html('');
common.displayAvatar($avatar, url, newName, function ($img) {
if ($img) {
$userAdmin.find('button').addClass('avatar');
}
});
};
common.onDisplayNameChanged(updateButton);
updateButton(common.getDisplayName());
}
$userAdmin.find('a.logout').click(function () {

@ -500,7 +500,8 @@ define([
// User admin menu
var $userMenu = $('#user-menu');
var userMenuCfg = {
$initBlock: $userMenu
$initBlock: $userMenu,
'static': true
};
var $userAdmin = Cryptpad.createUserAdminMenu(userMenuCfg);
$userAdmin.find('button').addClass('btn').addClass('btn-secondary');

@ -13,8 +13,6 @@ define([
], function ($, Cryptpad, Crypt, Merge) {
var saveAs = window.saveAs;
console.log("wut");
var USERNAME_KEY = 'cryptpad.username';
var APP = window.APP = {

Loading…
Cancel
Save