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
Léo-Paul Géneau
gitlab-ce
Commits
e74e66bd
Commit
e74e66bd
authored
Feb 27, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE backport of members-ee-code
parent
d6696f81
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
app/assets/javascripts/members.js
app/assets/javascripts/members.js
+18
-9
app/assets/javascripts/pages/groups/group_members/index/index.js
...ets/javascripts/pages/groups/group_members/index/index.js
+1
-1
app/assets/javascripts/pages/projects/project_members/index.js
...ssets/javascripts/pages/projects/project_members/index.js
+1
-1
No files found.
app/assets/javascripts/members.js
View file @
e74e66bd
...
@@ -16,25 +16,33 @@ export default class Members {
...
@@ -16,25 +16,33 @@ export default class Members {
gl
.
utils
.
disableButtonIfEmptyField
(
'
#user_ids
'
,
'
input[name=commit]
'
,
'
change
'
);
gl
.
utils
.
disableButtonIfEmptyField
(
'
#user_ids
'
,
'
input[name=commit]
'
,
'
change
'
);
}
}
dropdownClicked
(
options
)
{
this
.
formSubmit
(
null
,
options
.
$el
);
}
// eslint-disable-next-line class-methods-use-this
dropdownToggleLabel
(
selected
,
$el
)
{
return
$el
.
text
();
}
// eslint-disable-next-line class-methods-use-this
dropdownIsSelectable
(
selected
,
$el
)
{
return
!
$el
.
hasClass
(
'
is-active
'
);
}
initGLDropdown
()
{
initGLDropdown
()
{
$
(
'
.js-member-permissions-dropdown
'
).
each
((
i
,
btn
)
=>
{
$
(
'
.js-member-permissions-dropdown
'
).
each
((
i
,
btn
)
=>
{
const
$btn
=
$
(
btn
);
const
$btn
=
$
(
btn
);
$btn
.
glDropdown
({
$btn
.
glDropdown
({
selectable
:
true
,
selectable
:
true
,
isSelectable
(
selected
,
$el
)
{
isSelectable
:
(
selected
,
$el
)
=>
this
.
dropdownIsSelectable
(
selected
,
$el
),
return
!
$el
.
hasClass
(
'
is-active
'
);
},
fieldName
:
$btn
.
data
(
'
fieldName
'
),
fieldName
:
$btn
.
data
(
'
fieldName
'
),
id
(
selected
,
$el
)
{
id
(
selected
,
$el
)
{
return
$el
.
data
(
'
id
'
);
return
$el
.
data
(
'
id
'
);
},
},
toggleLabel
(
selected
,
$el
)
{
toggleLabel
:
(
selected
,
$el
)
=>
this
.
dropdownToggleLabel
(
selected
,
$el
,
$btn
),
return
$el
.
text
();
clicked
:
options
=>
this
.
dropdownClicked
(
options
),
},
clicked
:
options
=>
{
this
.
formSubmit
(
null
,
options
.
$el
);
},
});
});
});
});
}
}
...
@@ -55,6 +63,7 @@ export default class Members {
...
@@ -55,6 +63,7 @@ export default class Members {
$toggle
.
enable
();
$toggle
.
enable
();
$dateInput
.
enable
();
$dateInput
.
enable
();
}
}
// eslint-disable-next-line class-methods-use-this
// eslint-disable-next-line class-methods-use-this
getMemberListItems
(
$el
)
{
getMemberListItems
(
$el
)
{
const
$memberListItem
=
$el
.
is
(
'
.member
'
)
?
$el
:
$
(
`#
${
$el
.
data
(
'
elId
'
)}
`
);
const
$memberListItem
=
$el
.
is
(
'
.member
'
)
?
$el
:
$
(
`#
${
$el
.
data
(
'
elId
'
)}
`
);
...
...
app/assets/javascripts/pages/groups/group_members/index/index.js
View file @
e74e66bd
/* eslint-disable no-new */
/* eslint-disable no-new */
import
memberExpirationDate
from
'
~/member_expiration_date
'
;
import
memberExpirationDate
from
'
~/member_expiration_date
'
;
import
Members
from
'
~
/members
'
;
import
Members
from
'
ee_else_ce
/members
'
;
import
UsersSelect
from
'
~/users_select
'
;
import
UsersSelect
from
'
~/users_select
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
...
...
app/assets/javascripts/pages/projects/project_members/index.js
View file @
e74e66bd
import
Members
from
'
ee_else_ce/members
'
;
import
memberExpirationDate
from
'
../../../member_expiration_date
'
;
import
memberExpirationDate
from
'
../../../member_expiration_date
'
;
import
UsersSelect
from
'
../../../users_select
'
;
import
UsersSelect
from
'
../../../users_select
'
;
import
groupsSelect
from
'
../../../groups_select
'
;
import
groupsSelect
from
'
../../../groups_select
'
;
import
Members
from
'
../../../members
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
memberExpirationDate
(
'
.js-access-expiration-date-groups
'
);
memberExpirationDate
(
'
.js-access-expiration-date-groups
'
);
...
...
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