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
6a07c1a4
Commit
6a07c1a4
authored
Jan 29, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated admin_email_select
parent
8b4059d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+10
-2
ee/app/assets/javascripts/pages/admin/emails/show/admin_email_select.js
...javascripts/pages/admin/emails/show/admin_email_select.js
+4
-9
No files found.
app/assets/javascripts/api.js
View file @
6a07c1a4
...
...
@@ -37,7 +37,11 @@ const Api = {
per_page
:
20
,
},
options
),
})
.
then
(({
data
})
=>
callback
(
data
));
.
then
(({
data
})
=>
{
callback
(
data
);
return
data
;
});
},
// Return namespaces list. Filtered by query
...
...
@@ -68,7 +72,11 @@ const Api = {
return
axios
.
get
(
url
,
{
params
:
Object
.
assign
(
defaults
,
options
),
})
.
then
(({
data
})
=>
callback
(
data
));
.
then
(({
data
})
=>
{
callback
(
data
);
return
data
;
});
},
// Return single project
...
...
ee/app/assets/javascripts/pages/admin/emails/show/admin_email_select.js
View file @
6a07c1a4
...
...
@@ -13,22 +13,17 @@ function AdminEmailSelect() {
multiple
:
$
(
select
).
hasClass
(
'
multiselect
'
),
minimumInputLength
:
0
,
query
:
function
(
query
)
{
var
group_result
,
project_result
;
group_result
=
Api
.
groups
(
query
.
term
,
{},
function
(
groups
)
{
return
groups
;
});
project_result
=
Api
.
projects
(
query
.
term
,
{
const
groupsFetch
=
Api
.
groups
(
query
.
term
,
{});
const
projectsFetch
=
Api
.
projects
(
query
.
term
,
{
order_by
:
'
id
'
,
membership
:
false
},
function
(
projects
)
{
return
projects
;
});
return
$
.
when
(
project_result
,
group_result
).
done
(
function
(
projects
,
groups
)
{
return
Promise
.
all
([
projectsFetch
,
groupsFetch
]).
done
(
function
([
projects
,
groups
]
)
{
var
all
,
data
;
all
=
{
id
:
"
all
"
};
data
=
[
all
].
concat
(
groups
[
0
],
projects
[
0
]
);
data
=
[
all
].
concat
(
groups
,
projects
);
return
query
.
callback
({
results
:
data
});
...
...
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