BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1e1785cc
Commit
1e1785cc
authored
Apr 25, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Place the logo's tooltip dynamically
When collapsed it's on the right like everything else, when expanded it's on the bottom.
parent
96593d79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
application.js.coffee
app/assets/javascripts/application.js.coffee
+8
-0
_head_panel.html.haml
app/views/layouts/_head_panel.html.haml
+1
-1
No files found.
app/assets/javascripts/application.js.coffee
View file @
1e1785cc
...
@@ -134,6 +134,14 @@ $ ->
...
@@ -134,6 +134,14 @@ $ ->
# Initialize tooltips
# Initialize tooltips
$
(
'body'
).
tooltip
({
$
(
'body'
).
tooltip
({
selector
:
'.has_tooltip, [data-toggle="tooltip"], .page-sidebar-collapsed .nav-sidebar a'
selector
:
'.has_tooltip, [data-toggle="tooltip"], .page-sidebar-collapsed .nav-sidebar a'
placement
:
(
_
,
el
)
->
$el
=
$
(
el
)
if
$el
.
attr
(
'id'
)
==
'js-shortcuts-home'
# Place the logo tooltip on the right when collapsed, bottom when expanded
$el
.
parents
(
'header'
).
hasClass
(
'header-collapsed'
)
and
'right'
or
'bottom'
else
# Otherwise use the data-placement attribute like normal
$el
.
data
(
'placement'
)
})
})
# Form submitter
# Form submitter
...
...
app/views/layouts/_head_panel.html.haml
View file @
1e1785cc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.navbar-inner
.navbar-inner
.container
.container
%div
.app_logo
%div
.app_logo
=
link_to
root_path
,
class:
'home'
,
title:
'Dashboard'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
=
link_to
root_path
,
class:
'home'
,
title:
'Dashboard'
,
id:
'js-shortcuts-home'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
=
brand_header_logo
=
brand_header_logo
%h3
GitLab
%h3
GitLab
%h1
.title
=
title
%h1
.title
=
title
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment