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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
ffe7c511
Commit
ffe7c511
authored
Jun 28, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `&` support for epics autocompletion
parent
3c0ff4dd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
2 deletions
+14
-2
app/assets/javascripts/gfm_auto_complete.js
app/assets/javascripts/gfm_auto_complete.js
+2
-1
app/assets/javascripts/gl_form.js
app/assets/javascripts/gl_form.js
+7
-0
app/assets/javascripts/pages/snippets/form.js
app/assets/javascripts/pages/snippets/form.js
+1
-0
app/assets/javascripts/shared/milestones/form.js
app/assets/javascripts/shared/milestones/form.js
+2
-1
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+1
-0
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+1
-0
No files found.
app/assets/javascripts/gfm_auto_complete.js
View file @
ffe7c511
...
...
@@ -12,7 +12,7 @@ export const defaultAutocompleteConfig = {
members
:
true
,
issues
:
true
,
mergeRequests
:
true
,
epics
:
fals
e
,
epics
:
tru
e
,
milestones
:
true
,
labels
:
true
,
};
...
...
@@ -493,6 +493,7 @@ GfmAutoComplete.atTypeMap = {
'
@
'
:
'
members
'
,
'
#
'
:
'
issues
'
,
'
!
'
:
'
mergeRequests
'
,
'
&
'
:
'
epics
'
,
'
~
'
:
'
labels
'
,
'
%
'
:
'
milestones
'
,
'
/
'
:
'
commands
'
,
...
...
app/assets/javascripts/gl_form.js
View file @
ffe7c511
...
...
@@ -9,6 +9,13 @@ export default class GLForm {
this
.
form
=
form
;
this
.
textarea
=
this
.
form
.
find
(
'
textarea.js-gfm-input
'
);
this
.
enableGFM
=
Object
.
assign
({},
GFMConfig
.
defaultAutocompleteConfig
,
enableGFM
);
// Disable autocomplete for keywords which do not have dataSources available
const
dataSources
=
(
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
)
||
{};
Object
.
keys
(
this
.
enableGFM
).
forEach
(
item
=>
{
if
(
item
!==
'
emojis
'
)
{
this
.
enableGFM
[
item
]
=
!!
dataSources
[
item
];
}
});
// Before we start, we should clean up any previous data for this form
this
.
destroy
();
// Setup the form
...
...
app/assets/javascripts/pages/snippets/form.js
View file @
ffe7c511
...
...
@@ -8,6 +8,7 @@ export default () => {
members
:
false
,
issues
:
false
,
mergeRequests
:
false
,
epics
:
false
,
milestones
:
false
,
labels
:
false
,
});
...
...
app/assets/javascripts/shared/milestones/form.js
View file @
ffe7c511
...
...
@@ -8,10 +8,11 @@ export default (initGFM = true) => {
new
DueDateSelectors
();
// eslint-disable-line no-new
// eslint-disable-next-line no-new
new
GLForm
(
$
(
'
.milestone-form
'
),
{
emojis
:
initGFM
,
emojis
:
true
,
members
:
initGFM
,
issues
:
initGFM
,
mergeRequests
:
initGFM
,
epics
:
initGFM
,
milestones
:
initGFM
,
labels
:
initGFM
,
});
...
...
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
ffe7c511
...
...
@@ -67,6 +67,7 @@
members
:
this
.
enableAutocomplete
,
issues
:
this
.
enableAutocomplete
,
mergeRequests
:
this
.
enableAutocomplete
,
epics
:
this
.
enableAutocomplete
,
milestones
:
this
.
enableAutocomplete
,
labels
:
this
.
enableAutocomplete
,
});
...
...
app/helpers/notes_helper.rb
View file @
ffe7c511
...
...
@@ -148,6 +148,7 @@ module NotesHelper
members:
autocomplete
,
issues:
autocomplete
,
mergeRequests:
autocomplete
,
epics:
autocomplete
,
milestones:
autocomplete
,
labels:
autocomplete
}
...
...
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