Commit fd891842 authored by daniel.dickhaus's avatar daniel.dickhaus Committed by julian.baeume
Browse files

Finally fix the initials

parent 7b78ffe3
Pipeline #147692 failed with stages
in 56 minutes and 40 seconds
......@@ -255,7 +255,7 @@ define('io.ox/core/api/user', [
* @return { object} text node
*/
api.getTextNode = function (id, options) {
var opt = _.extend({ type: 'name' }, options),
var opt = _.extend({ type: 'name', textZoom: true }, options),
node = opt.node || document.createTextNode('');
api.get({ id: id })
.done(function (data) {
......@@ -264,7 +264,11 @@ define('io.ox/core/api/user', [
else if (opt.type === 'email') name = data.email1 || data.display_name;
else if (opt.type === 'email-localpart') name = (data.email1 || data.display_name || '').replace(/@.*$/, '');
else if (opt.type === 'initials') name = util.getInitials(data);
node.nodeValue = name;
if (opt.textZoom) {
node.nodeValue = name;
return;
}
$(node).replaceWith('<svg viewbox="0 0 48 48"><text x="24" y="30" text-anchor="middle">' + _.escape(name) + '</text></svg>');
});
return node;
};
......
......@@ -553,7 +553,7 @@ define('io.ox/core/main/topbar_right', [
a.empty().append(
contactAPI.pictureHalo(
$('<div class="contact-picture" aria-hidden="true">').attr('title', title)
.append(userAPI.getTextNode(ox.user_id, { type: 'initials' })),
.append(userAPI.getTextNode(ox.user_id, { type: 'initials', textZoom: false })),
{ internal_userid: ox.user_id },
{ width: 40, height: 40, fallback: false }
)
......
......@@ -357,12 +357,11 @@ html:not(.smartphone) #io-ox-appcontrol #io-ox-toprightbar #io-ox-launcher .laun
.flex-center;
background-color: #eee;
color: rgba(0, 0, 0, 0.60);
font-size: 13px;
font-size: 18px;
font-weight: bold;
fill: currentColor;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.50);
max-height: 50px;
max-width: 50px;
}
}
}
......@@ -390,8 +389,9 @@ html:not(.smartphone) #io-ox-appcontrol #io-ox-toprightbar #io-ox-launcher .laun
.picture(@sidelength, @sidelength);
background-color: #eee;
color: rgba(0, 0, 0, 0.60);
font-size: 20px;
font-size: 11px;
font-weight: bold;
fill: currentColor;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.50);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment