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
69b585fa
Commit
69b585fa
authored
Sep 01, 2017
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean filtered_search.js.
parent
e9be9d5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
app/assets/javascripts/service_desk_issues/filtered_search.js
...assets/javascripts/service_desk_issues/filtered_search.js
+7
-4
app/views/projects/issues/_head.html.haml
app/views/projects/issues/_head.html.haml
+1
-1
No files found.
app/assets/javascripts/service_desk_issues/filtered_search.js
View file @
69b585fa
...
...
@@ -3,11 +3,16 @@
export
default
class
FilteredSearchServiceDesk
extends
gl
.
FilteredSearchManager
{
constructor
()
{
super
(
'
service_desk
'
);
this
.
supportBotAttrs
=
JSON
.
parse
(
document
.
querySelector
(
'
.service-desk-issues
'
).
dataset
.
supportBot
);
this
.
supportBotAttrs
=
JSON
.
parse
(
document
.
querySelector
(
'
.service-desk-issues
'
).
dataset
.
supportBot
,
);
}
customRemovalValidator
(
token
)
{
return
token
.
querySelector
(
'
.value-container
'
).
getAttribute
(
'
data-original-value
'
)
!==
'
@support-bot
'
;
const
tokenValue
=
token
.
querySelector
(
'
.value-container
'
);
return
tokenValue
?
tokenValue
.
getAttribute
(
'
data-original-value
'
)
!==
`@
${
this
.
supportBotAttrs
.
username
}
`
:
true
;
}
canEdit
(
tokenName
)
{
...
...
@@ -16,9 +21,7 @@ export default class FilteredSearchServiceDesk extends gl.FilteredSearchManager
modifyUrlParams
(
paramsArray
)
{
const
authorParamKey
=
'
author_username
'
;
// FIXME: Need to grab the value from a data attribute
const
supportBotParamPair
=
`
${
authorParamKey
}
=
${
this
.
supportBotAttrs
.
username
}
`
;
const
onlyValidParams
=
paramsArray
.
filter
(
param
=>
param
.
indexOf
(
authorParamKey
)
===
-
1
);
// unshift ensures author param is always first token element
...
...
app/views/projects/issues/_head.html.haml
View file @
69b585fa
...
...
@@ -29,7 +29,7 @@
-
if
EE
::
Gitlab
::
ServiceDesk
.
enabled?
(
project:
@project
)
=
nav_link
(
controller: :issues
,
action: :service_desk
)
do
=
link_to
service_desk_project_issues_
url
(
@project
),
title:
'Service Desk'
do
=
link_to
service_desk_project_issues_
path
(
@project
),
title:
'Service Desk'
do
%span
Service Desk
-
if
project_nav_tab?
:milestones
...
...
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