Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2b0de66e
Commit
2b0de66e
authored
Nov 18, 2020
by
Martin Wortschack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace fa-chevron-down in template selectors
parent
cfa4b126
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
11 deletions
+22
-11
app/assets/javascripts/blob/file_template_selector.js
app/assets/javascripts/blob/file_template_selector.js
+8
-7
app/assets/javascripts/blob/template_selector.js
app/assets/javascripts/blob/template_selector.js
+8
-3
app/helpers/dropdowns_helper.rb
app/helpers/dropdowns_helper.rb
+1
-1
changelogs/unreleased/mw-replace-fa-chevron-down-in-template-selectors.yml
...ased/mw-replace-fa-chevron-down-in-template-selectors.yml
+5
-0
No files found.
app/assets/javascripts/blob/file_template_selector.js
View file @
2b0de66e
...
...
@@ -12,7 +12,10 @@ export default class FileTemplateSelector {
this
.
$dropdown
=
$
(
cfg
.
dropdown
);
this
.
$wrapper
=
$
(
cfg
.
wrapper
);
this
.
$loadingIcon
=
this
.
$wrapper
.
find
(
'
.fa-chevron-down
'
);
this
.
$dropdownIcon
=
this
.
$wrapper
.
find
(
'
.dropdown-menu-toggle-icon
'
);
this
.
$loadingIcon
=
$
(
'
<div class="gl-spinner gl-spinner-orange gl-spinner-sm gl-absolute gl-top-3 gl-right-3 gl-display-none"></div>
'
,
).
insertAfter
(
this
.
$dropdownIcon
);
this
.
$dropdownToggleText
=
this
.
$wrapper
.
find
(
'
.dropdown-toggle-text
'
);
this
.
initDropdown
();
...
...
@@ -45,15 +48,13 @@ export default class FileTemplateSelector {
}
renderLoading
()
{
this
.
$loadingIcon
.
addClass
(
'
gl-spinner gl-spinner-orange gl-spinner-sm
'
)
.
removeClass
(
'
fa-chevron-down
'
);
this
.
$loadingIcon
.
removeClass
(
'
gl-display-none
'
);
this
.
$dropdownIcon
.
addClass
(
'
gl-display-none
'
);
}
renderLoaded
()
{
this
.
$loadingIcon
.
addClass
(
'
fa-chevron-down
'
)
.
removeClass
(
'
gl-spinner gl-spinner-orange gl-spinner-sm
'
);
this
.
$loadingIcon
.
addClass
(
'
gl-display-none
'
);
this
.
$dropdownIcon
.
removeClass
(
'
gl-display-none
'
);
}
reportSelection
(
options
)
{
...
...
app/assets/javascripts/blob/template_selector.js
View file @
2b0de66e
...
...
@@ -10,7 +10,10 @@ export default class TemplateSelector {
this
.
dropdown
=
dropdown
;
this
.
$dropdownContainer
=
wrapper
;
this
.
$filenameInput
=
$input
||
$
(
'
#file_name
'
);
this
.
$dropdownIcon
=
$
(
'
.fa-chevron-down
'
,
dropdown
);
this
.
$dropdownIcon
=
$
(
'
.dropdown-menu-toggle-icon
'
,
dropdown
);
this
.
$loadingIcon
=
$
(
'
<div class="gl-spinner gl-spinner-orange gl-spinner-sm gl-absolute gl-top-3 gl-right-3 gl-display-none"></div>
'
,
).
insertAfter
(
this
.
$dropdownIcon
);
this
.
initDropdown
(
dropdown
,
data
);
this
.
listenForFilenameInput
();
...
...
@@ -92,10 +95,12 @@ export default class TemplateSelector {
}
startLoadingSpinner
()
{
this
.
$dropdownIcon
.
addClass
(
'
spinner
'
).
removeClass
(
'
fa-chevron-down
'
);
this
.
$loadingIcon
.
removeClass
(
'
gl-display-none
'
);
this
.
$dropdownIcon
.
addClass
(
'
gl-display-none
'
);
}
stopLoadingSpinner
()
{
this
.
$dropdownIcon
.
addClass
(
'
fa-chevron-down
'
).
removeClass
(
'
spinner
'
);
this
.
$loadingIcon
.
addClass
(
'
gl-display-none
'
);
this
.
$dropdownIcon
.
removeClass
(
'
gl-display-none
'
);
}
}
app/helpers/dropdowns_helper.rb
View file @
2b0de66e
...
...
@@ -51,7 +51,7 @@ module DropdownsHelper
default_label
=
data_attr
[
:default_label
]
content_tag
(
:button
,
disabled:
options
[
:disabled
],
class:
"dropdown-menu-toggle
#{
options
[
:toggle_class
]
if
options
.
key?
(
:toggle_class
)
}
"
,
id:
(
options
[
:id
]
if
options
.
key?
(
:id
)),
type:
"button"
,
data:
data_attr
)
do
output
=
content_tag
(
:span
,
toggle_text
,
class:
"dropdown-toggle-text
#{
'is-default'
if
toggle_text
==
default_label
}
"
)
output
<<
icon
(
'chevron-down'
)
output
<<
sprite_icon
(
'chevron-down'
,
css_class:
"dropdown-menu-toggle-icon gl-top-3"
)
output
.
html_safe
end
end
...
...
changelogs/unreleased/mw-replace-fa-chevron-down-in-template-selectors.yml
0 → 100644
View file @
2b0de66e
---
title
:
Replace fa-chevron-down in template selector dropdown
merge_request
:
48015
author
:
type
:
changed
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