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
da123cbe
Commit
da123cbe
authored
Nov 05, 2019
by
minghuan lei
Committed by
Mike Greiling
Nov 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Remove IIFEs from project_select.js"
parent
c5099d46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
59 deletions
+62
-59
app/assets/javascripts/project_select.js
app/assets/javascripts/project_select.js
+57
-59
changelogs/unreleased/34624-remove-IIFEs-from-project_select-js.yml
.../unreleased/34624-remove-IIFEs-from-project_select-js.yml
+5
-0
No files found.
app/assets/javascripts/project_select.js
View file @
da123cbe
...
...
@@ -30,67 +30,65 @@ const projectSelect = () => {
$
(
select
).
select2
({
placeholder
,
minimumInputLength
:
0
,
query
:
(
function
(
_this
)
{
return
function
(
query
)
{
var
finalCallback
,
projectsCallback
;
finalCallback
=
function
(
projects
)
{
var
data
;
data
=
{
results
:
projects
,
};
return
query
.
callback
(
data
);
query
:
query
=>
{
var
finalCallback
,
projectsCallback
;
finalCallback
=
function
(
projects
)
{
var
data
;
data
=
{
results
:
projects
,
};
if
(
_this
.
includeGroups
)
{
projectsCallback
=
function
(
projects
)
{
var
groupsCallback
;
groupsCallback
=
function
(
groups
)
{
var
data
;
data
=
groups
.
concat
(
projects
);
return
finalCallback
(
data
);
};
return
Api
.
groups
(
query
.
term
,
{},
groupsCallback
);
};
}
else
{
projectsCallback
=
finalCallback
;
}
if
(
_this
.
groupId
)
{
return
Api
.
groupProjects
(
_this
.
groupId
,
query
.
term
,
{
with_issues_enabled
:
_this
.
withIssuesEnabled
,
with_merge_requests_enabled
:
_this
.
withMergeRequestsEnabled
,
with_shared
:
_this
.
withShared
,
include_subgroups
:
_this
.
includeProjectsInSubgroups
,
},
projectsCallback
,
);
}
else
if
(
_this
.
userId
)
{
return
Api
.
userProjects
(
_this
.
userId
,
query
.
term
,
{
with_issues_enabled
:
_this
.
withIssuesEnabled
,
with_merge_requests_enabled
:
_this
.
withMergeRequestsEnabled
,
with_shared
:
_this
.
withShared
,
include_subgroups
:
_this
.
includeProjectsInSubgroups
,
},
projectsCallback
,
);
}
else
{
return
Api
.
projects
(
query
.
term
,
{
order_by
:
_this
.
orderBy
,
with_issues_enabled
:
_this
.
withIssuesEnabled
,
with_merge_requests_enabled
:
_this
.
withMergeRequestsEnabled
,
membership
:
!
_this
.
allProjects
,
},
projectsCallback
,
);
}
return
query
.
callback
(
data
);
};
})(
this
),
if
(
this
.
includeGroups
)
{
projectsCallback
=
function
(
projects
)
{
var
groupsCallback
;
groupsCallback
=
function
(
groups
)
{
var
data
;
data
=
groups
.
concat
(
projects
);
return
finalCallback
(
data
);
};
return
Api
.
groups
(
query
.
term
,
{},
groupsCallback
);
};
}
else
{
projectsCallback
=
finalCallback
;
}
if
(
this
.
groupId
)
{
return
Api
.
groupProjects
(
this
.
groupId
,
query
.
term
,
{
with_issues_enabled
:
this
.
withIssuesEnabled
,
with_merge_requests_enabled
:
this
.
withMergeRequestsEnabled
,
with_shared
:
this
.
withShared
,
include_subgroups
:
this
.
includeProjectsInSubgroups
,
},
projectsCallback
,
);
}
else
if
(
this
.
userId
)
{
return
Api
.
userProjects
(
this
.
userId
,
query
.
term
,
{
with_issues_enabled
:
this
.
withIssuesEnabled
,
with_merge_requests_enabled
:
this
.
withMergeRequestsEnabled
,
with_shared
:
this
.
withShared
,
include_subgroups
:
this
.
includeProjectsInSubgroups
,
},
projectsCallback
,
);
}
else
{
return
Api
.
projects
(
query
.
term
,
{
order_by
:
this
.
orderBy
,
with_issues_enabled
:
this
.
withIssuesEnabled
,
with_merge_requests_enabled
:
this
.
withMergeRequestsEnabled
,
membership
:
!
this
.
allProjects
,
},
projectsCallback
,
);
}
},
id
(
project
)
{
if
(
simpleFilter
)
return
project
.
id
;
return
JSON
.
stringify
({
...
...
changelogs/unreleased/34624-remove-IIFEs-from-project_select-js.yml
0 → 100644
View file @
da123cbe
---
title
:
Remove IIFEs from project_select.js
merge_request
:
19288
author
:
minghuan lei
type
:
other
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