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
Tatuya Kamada
gitlab-ce
Commits
85bbb914
Commit
85bbb914
authored
Apr 19, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GfmAutoComplete for jquery-atwho 1.0
parent
d086e76c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
app/assets/javascripts/gfm_auto_complete.js.coffee
app/assets/javascripts/gfm_auto_complete.js.coffee
+24
-23
No files found.
app/assets/javascripts/gfm_auto_complete.js.coffee
View file @
85bbb914
...
@@ -2,19 +2,19 @@
...
@@ -2,19 +2,19 @@
window
.
GitLab
?=
{}
window
.
GitLab
?=
{}
GitLab
.
GfmAutoComplete
=
GitLab
.
GfmAutoComplete
=
# private_token: ''
dataSource
:
''
dataSource
:
''
# Emoji
# Emoji
Emoji
:
Emoji
:
template
:
'<li
data-value="${insert}">${name} <img alt="${name}" height="20" src="${image
}" width="20" /></li>'
template
:
'<li
>${name} <img alt="${name}" height="20" src="${path
}" width="20" /></li>'
# Team Members
# Team Members
Members
:
Members
:
template
:
'<li
data-value="${username}"
>${username} <small>${name}</small></li>'
template
:
'<li>${username} <small>${name}</small></li>'
# Issues and MergeRequests
# Issues and MergeRequests
Issues
:
Issues
:
template
:
'<li
data-value="${id}"><small>${id}</small> ${title}
</li>'
template
:
'<li
><small>${id}</small> ${title}
</li>'
# Add GFM auto-completion to all input fields, that accept GFM input.
# Add GFM auto-completion to all input fields, that accept GFM input.
setup
:
->
setup
:
->
...
@@ -23,45 +23,46 @@ GitLab.GfmAutoComplete =
...
@@ -23,45 +23,46 @@ GitLab.GfmAutoComplete =
# Emoji
# Emoji
input
.
atwho
input
.
atwho
at
:
':'
at
:
':'
tpl
:
@
Emoji
.
template
displayTpl
:
@
Emoji
.
template
callbacks
:
insertTpl
:
':${name}:'
before_save
:
(
emojis
)
=>
$
.
map
emojis
,
(
em
)
=>
name
:
em
.
name
,
insert
:
em
.
name
+
':'
,
image
:
em
.
path
# Team Members
# Team Members
input
.
atwho
input
.
atwho
at
:
'@'
at
:
'@'
tpl
:
@
Members
.
template
displayTpl
:
@
Members
.
template
search_key
:
'search'
insertTpl
:
'${atwho-at}${username}'
searchKey
:
'search'
callbacks
:
callbacks
:
before
_save
:
(
members
)
=
>
before
Save
:
(
members
)
-
>
$
.
map
members
,
(
m
)
=
>
name
:
m
.
name
,
username
:
m
.
username
,
search
:
"
#{
m
.
username
}
#{
m
.
name
}
"
$
.
map
members
,
(
m
)
-
>
name
:
m
.
name
,
username
:
m
.
username
,
search
:
"
#{
m
.
username
}
#{
m
.
name
}
"
input
.
atwho
input
.
atwho
at
:
'#'
at
:
'#'
alias
:
'issues'
alias
:
'issues'
search_key
:
'search'
searchKey
:
'search'
tpl
:
@
Issues
.
template
displayTpl
:
@
Issues
.
template
insertTpl
:
'${atwho-at}${id}'
callbacks
:
callbacks
:
before
_s
ave
:
(
issues
)
->
before
S
ave
:
(
issues
)
->
$
.
map
issues
,
(
i
)
->
id
:
i
.
iid
,
title
:
sanitize
(
i
.
title
),
search
:
"
#{
i
.
iid
}
#{
i
.
title
}
"
$
.
map
issues
,
(
i
)
->
id
:
i
.
iid
,
title
:
sanitize
(
i
.
title
),
search
:
"
#{
i
.
iid
}
#{
i
.
title
}
"
input
.
atwho
input
.
atwho
at
:
'!'
at
:
'!'
alias
:
'mergerequests'
alias
:
'mergerequests'
search_key
:
'search'
searchKey
:
'search'
tpl
:
@
Issues
.
template
displayTpl
:
@
Issues
.
template
insertTpl
:
'${atwho-at}${id}'
callbacks
:
callbacks
:
before
_s
ave
:
(
merges
)
->
before
S
ave
:
(
merges
)
->
$
.
map
merges
,
(
m
)
->
id
:
m
.
iid
,
title
:
sanitize
(
m
.
title
),
search
:
"
#{
m
.
iid
}
#{
m
.
title
}
"
$
.
map
merges
,
(
m
)
->
id
:
m
.
iid
,
title
:
sanitize
(
m
.
title
),
search
:
"
#{
m
.
iid
}
#{
m
.
title
}
"
input
.
one
"focus"
,
=>
input
.
one
'focus'
,
=>
$
.
getJSON
(
@
dataSource
).
done
(
data
)
->
$
.
getJSON
(
@
dataSource
).
done
(
data
)
->
# load members
# load members
input
.
atwho
'load'
,
"@"
,
data
.
members
input
.
atwho
'load'
,
'@'
,
data
.
members
# load issues
# load issues
input
.
atwho
'load'
,
"issues"
,
data
.
issues
input
.
atwho
'load'
,
'issues'
,
data
.
issues
# load merge requests
# load merge requests
input
.
atwho
'load'
,
"mergerequests"
,
data
.
mergerequests
input
.
atwho
'load'
,
'mergerequests'
,
data
.
mergerequests
# load emojis
# load emojis
input
.
atwho
'load'
,
":"
,
data
.
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