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
fb506a12
Commit
fb506a12
authored
Feb 11, 2020
by
Jackie Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show selected template type when clicked
parent
e37b141d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
app/assets/javascripts/blob/file_template_mediator.js
app/assets/javascripts/blob/file_template_mediator.js
+1
-5
changelogs/unreleased/show_selected_template_type.yml
changelogs/unreleased/show_selected_template_type.yml
+5
-0
spec/features/projects/files/template_type_dropdown_spec.rb
spec/features/projects/files/template_type_dropdown_spec.rb
+5
-0
No files found.
app/assets/javascripts/blob/file_template_mediator.js
View file @
fb506a12
...
@@ -117,11 +117,7 @@ export default class FileTemplateMediator {
...
@@ -117,11 +117,7 @@ export default class FileTemplateMediator {
selector
.
hide
();
selector
.
hide
();
}
}
});
});
this
.
setTypeSelectorToggleText
(
item
.
name
);
if
(
this
.
editor
.
getValue
()
!==
''
)
{
this
.
setTypeSelectorToggleText
(
item
.
name
);
}
this
.
cacheToggleText
();
this
.
cacheToggleText
();
}
}
...
...
changelogs/unreleased/show_selected_template_type.yml
0 → 100644
View file @
fb506a12
---
title
:
Show selected template type when clicked
merge_request
:
24596
author
:
type
:
fixed
spec/features/projects/files/template_type_dropdown_spec.rb
View file @
fb506a12
...
@@ -75,6 +75,11 @@ describe 'Projects > Files > Template type dropdown selector', :js do
...
@@ -75,6 +75,11 @@ describe 'Projects > Files > Template type dropdown selector', :js do
check_type_selector_toggle_text
(
'.gitignore'
)
check_type_selector_toggle_text
(
'.gitignore'
)
end
end
it
'sets the toggle text when selecting the template type'
do
select_template_type
(
'.gitignore'
)
check_type_selector_toggle_text
(
'.gitignore'
)
end
it
'selects every template type correctly'
do
it
'selects every template type correctly'
do
try_selecting_all_types
try_selecting_all_types
end
end
...
...
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