Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
20b740f8
Commit
20b740f8
authored
11 years ago
by
Jan-Christoph Borchardt
Browse files
Options
Downloads
Patches
Plain Diff
do not show display name on mobile when profile picture is present
parent
92d57cb5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/css/mobile.css
+6
-0
6 additions, 0 deletions
core/css/mobile.css
core/js/avatar.js
+8
-1
8 additions, 1 deletion
core/js/avatar.js
core/js/jquery.avatar.js
+9
-1
9 additions, 1 deletion
core/js/jquery.avatar.js
settings/js/personal.js
+2
-0
2 additions, 0 deletions
settings/js/personal.js
with
25 additions
and
2 deletions
core/css/mobile.css
+
6
−
0
View file @
20b740f8
...
...
@@ -17,4 +17,10 @@
transition
:
width
100ms
;
}
/* do not show display name on mobile when profile picture is present */
#header
.avatardiv.avatardiv-shown
+
#expandDisplayName
{
display
:
none
;
}
}
This diff is collapsed.
Click to expand it.
core/js/avatar.js
+
8
−
1
View file @
20b740f8
$
(
document
).
ready
(
function
(){
if
(
OC
.
currentUser
)
{
$
(
'
#header .avatardiv
'
).
avatar
(
OC
.
currentUser
,
32
,
undefined
,
true
);
var
callback
=
function
()
{
// do not show display name on mobile when profile picture is present
if
(
$
(
'
#header .avatardiv
'
).
children
().
length
>
0
)
{
$
(
'
#header .avatardiv
'
).
addClass
(
'
avatardiv-shown
'
);
}
};
$
(
'
#header .avatardiv
'
).
avatar
(
OC
.
currentUser
,
32
,
undefined
,
true
,
callback
);
// Personal settings
$
(
'
#avatar .avatardiv
'
).
avatar
(
OC
.
currentUser
,
128
);
}
...
...
This diff is collapsed.
Click to expand it.
core/js/jquery.avatar.js
+
9
−
1
View file @
20b740f8
...
...
@@ -39,10 +39,15 @@
* This will behave like the first example, but it will hide the avatardiv, if
* it will display the default placeholder. undefined is the ie8fix from
* example 4 and can be either true, or false/undefined, to be ignored.
*
* 6. $('.avatardiv').avatar('jdoe', 128, undefined, true, callback);
* This will behave like the above example, but it will call the function
* defined in callback after the avatar is placed into the DOM.
*
*/
(
function
(
$
)
{
$
.
fn
.
avatar
=
function
(
user
,
size
,
ie8fix
,
hidedefault
)
{
$
.
fn
.
avatar
=
function
(
user
,
size
,
ie8fix
,
hidedefault
,
callback
)
{
if
(
typeof
(
size
)
===
'
undefined
'
)
{
if
(
this
.
height
()
>
0
)
{
size
=
this
.
height
();
...
...
@@ -91,6 +96,9 @@
$div
.
html
(
'
<img src="
'
+
url
+
'
">
'
);
}
}
if
(
typeof
callback
===
'
function
'
)
{
callback
();
}
});
});
};
...
...
This diff is collapsed.
Click to expand it.
settings/js/personal.js
+
2
−
0
View file @
20b740f8
...
...
@@ -52,9 +52,11 @@ function updateAvatar (hidedefault) {
if
(
hidedefault
)
{
$headerdiv
.
hide
();
$
(
'
#header .avatardiv
'
).
removeClass
(
'
avatardiv-shown
'
);
}
else
{
$headerdiv
.
css
({
'
background-color
'
:
''
});
$headerdiv
.
avatar
(
OC
.
currentUser
,
32
,
true
);
$
(
'
#header .avatardiv
'
).
addClass
(
'
avatardiv-shown
'
);
}
$displaydiv
.
css
({
'
background-color
'
:
''
});
$displaydiv
.
avatar
(
OC
.
currentUser
,
128
,
true
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment