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
bb3d3e54
Commit
bb3d3e54
authored
Apr 17, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tooltips
parent
ceb9f767
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
bootstrap.js
app/assets/javascripts/commons/bootstrap.js
+6
-9
main.js
app/assets/javascripts/main.js
+0
-1
ci_status_helper.rb
app/helpers/ci_status_helper.rb
+4
-4
No files found.
app/assets/javascripts/commons/bootstrap.js
View file @
bb3d3e54
import
$
from
'jquery'
;
import
Popper
from
'popper.js/dist/umd/popper'
;
// bootstrap jQuery plugins
import
'bootstrap-sass/assets/javascripts/bootstrap/affix'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/alert'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/button'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/dropdown'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/modal'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/tab'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/transition'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/tooltip'
;
import
'bootstrap-sass/assets/javascripts/bootstrap/popover'
;
import
'bootstrap/dist/js/bootstrap.bundle'
;
// custom jQuery functions
$
.
fn
.
extend
({
disable
()
{
return
$
(
this
).
prop
(
'disabled'
,
true
).
addClass
(
'disabled'
);
},
enable
()
{
return
$
(
this
).
prop
(
'disabled'
,
false
).
removeClass
(
'disabled'
);
},
});
// Enable Bootstrap tooltips
$
(
'[data-toggle="tooltip"]'
).
tooltip
();
app/assets/javascripts/main.js
View file @
bb3d3e54
...
...
@@ -136,7 +136,6 @@ document.addEventListener('DOMContentLoaded', () => {
});
// Initialize tooltips
$
.
fn
.
tooltip
.
Constructor
.
DEFAULTS
.
trigger
=
'hover'
;
$body
.
tooltip
({
selector
:
'.has-tooltip, [data-toggle="tooltip"]'
,
placement
(
tip
,
el
)
{
...
...
app/helpers/ci_status_helper.rb
View file @
bb3d3e54
...
...
@@ -92,7 +92,7 @@ module CiStatusHelper
"pipeline-status/
#{
pipeline_status
.
sha
}
-
#{
pipeline_status
.
status
}
"
end
def
render_project_pipeline_status
(
pipeline_status
,
tooltip_placement:
'
auto
left'
)
def
render_project_pipeline_status
(
pipeline_status
,
tooltip_placement:
'left'
)
project
=
pipeline_status
.
project
path
=
pipelines_project_commit_path
(
project
,
pipeline_status
.
sha
,
ref:
pipeline_status
.
ref
)
...
...
@@ -103,7 +103,7 @@ module CiStatusHelper
tooltip_placement:
tooltip_placement
)
end
def
render_commit_status
(
commit
,
ref:
nil
,
tooltip_placement:
'
auto
left'
)
def
render_commit_status
(
commit
,
ref:
nil
,
tooltip_placement:
'left'
)
project
=
commit
.
project
path
=
pipelines_project_commit_path
(
project
,
commit
,
ref:
ref
)
...
...
@@ -114,7 +114,7 @@ module CiStatusHelper
tooltip_placement:
tooltip_placement
)
end
def
render_pipeline_status
(
pipeline
,
tooltip_placement:
'
auto
left'
)
def
render_pipeline_status
(
pipeline
,
tooltip_placement:
'left'
)
project
=
pipeline
.
project
path
=
project_pipeline_path
(
project
,
pipeline
)
render_status_with_link
(
'pipeline'
,
pipeline
.
status
,
path
,
tooltip_placement:
tooltip_placement
)
...
...
@@ -125,7 +125,7 @@ module CiStatusHelper
Ci
::
Runner
.
shared
.
blank?
end
def
render_status_with_link
(
type
,
status
,
path
=
nil
,
tooltip_placement:
'
auto
left'
,
cssclass:
''
,
container:
'body'
)
def
render_status_with_link
(
type
,
status
,
path
=
nil
,
tooltip_placement:
'left'
,
cssclass:
''
,
container:
'body'
)
klass
=
"ci-status-link ci-status-icon-
#{
status
.
dasherize
}
#{
cssclass
}
"
title
=
"
#{
type
.
titleize
}
:
#{
ci_label_for_status
(
status
)
}
"
data
=
{
toggle:
'tooltip'
,
placement:
tooltip_placement
,
container:
container
}
...
...
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