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
ce066ba6
Commit
ce066ba6
authored
Jan 11, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'autocomplete-on-load' into 'master'
Load autocomplete data when loading an issue page See merge request !2312
parents
e9f84c4c
cb22e5f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
gfm_auto_complete.js.coffee
app/assets/javascripts/gfm_auto_complete.js.coffee
+12
-13
No files found.
app/assets/javascripts/gfm_auto_complete.js.coffee
View file @
ce066ba6
...
...
@@ -34,7 +34,7 @@ GitLab.GfmAutoComplete =
searchKey
:
'search'
callbacks
:
beforeSave
:
(
members
)
->
$
.
map
members
,
(
m
)
->
$
.
map
members
,
(
m
)
->
title
=
m
.
name
title
+=
" (
#{
m
.
count
}
)"
if
m
.
count
...
...
@@ -50,7 +50,7 @@ GitLab.GfmAutoComplete =
insertTpl
:
'${atwho-at}${id}'
callbacks
:
beforeSave
:
(
issues
)
->
$
.
map
issues
,
(
i
)
->
$
.
map
issues
,
(
i
)
->
id
:
i
.
iid
title
:
sanitize
(
i
.
title
)
search
:
"
#{
i
.
iid
}
#{
i
.
title
}
"
...
...
@@ -63,18 +63,17 @@ GitLab.GfmAutoComplete =
insertTpl
:
'${atwho-at}${id}'
callbacks
:
beforeSave
:
(
merges
)
->
$
.
map
merges
,
(
m
)
->
$
.
map
merges
,
(
m
)
->
id
:
m
.
iid
title
:
sanitize
(
m
.
title
)
search
:
"
#{
m
.
iid
}
#{
m
.
title
}
"
input
.
one
'focus'
,
=>
$
.
getJSON
(
@
dataSource
).
done
(
data
)
->
# load members
input
.
atwho
'load'
,
'@'
,
data
.
members
# load issues
input
.
atwho
'load'
,
'issues'
,
data
.
issues
# load merge requests
input
.
atwho
'load'
,
'mergerequests'
,
data
.
mergerequests
# load emojis
input
.
atwho
'load'
,
':'
,
data
.
emojis
$
.
getJSON
(
@
dataSource
).
done
(
data
)
->
# load members
input
.
atwho
'load'
,
'@'
,
data
.
members
# load issues
input
.
atwho
'load'
,
'issues'
,
data
.
issues
# load merge requests
input
.
atwho
'load'
,
'mergerequests'
,
data
.
mergerequests
# load emojis
input
.
atwho
'load'
,
':'
,
data
.
emojis
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