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
9a02fd32
Commit
9a02fd32
authored
Dec 21, 2021
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove transfer edit jquery
parent
1c7e9862
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
8 deletions
+36
-8
app/assets/javascripts/groups/transfer_edit.js
app/assets/javascripts/groups/transfer_edit.js
+34
-7
app/assets/javascripts/pages/groups/edit/index.js
app/assets/javascripts/pages/groups/edit/index.js
+2
-1
No files found.
app/assets/javascripts/groups/transfer_edit.js
View file @
9a02fd32
import
$
from
'
jquery
'
;
export
default
function
setupTransferEdit
(
formSelector
,
watchField
,
targetSelectorId
)
{
const
transferForm
=
document
.
querySelector
(
formSelector
);
console
.
log
(
'
formSelector
'
,
formSelector
);
console
.
log
(
'
watchField
'
,
watchField
);
console
.
log
(
'
transferForm
'
,
transferForm
);
const
field
=
transferForm
.
querySelector
(
watchField
);
console
.
log
(
'
field
'
,
field
);
const
valueField
=
transferForm
.
querySelector
(
targetSelectorId
);
console
.
log
(
'
valueField.value
'
,
valueField
.
value
);
export
default
function
setupTransferEdit
(
formSelector
,
targetSelector
)
{
const
$transferForm
=
$
(
formSelector
);
const
$selectNamespace
=
$transferForm
.
find
(
targetSelector
);
field
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
console
.
log
(
'
event::click
'
);
$selectNamespace
.
on
(
'
change
'
,
()
=>
{
$transferForm
.
find
(
'
:submit
'
).
prop
(
'
disabled
'
,
!
$selectNamespace
.
val
());
console
.
log
(
'
valueField
'
,
valueField
,
valueField
.
value
);
console
.
log
(
'
e
'
,
e
.
currentTarget
);
console
.
log
(
'
e
'
,
e
.
target
);
transferForm
.
querySelector
(
"
input[type='submit']
"
)
// .querySelector("input[type='submit']")
.
setAttribute
(
'
disabled
'
,
!
valueField
.
val
()
?
'
disabled
'
:
''
);
});
$selectNamespace
.
trigger
(
'
change
'
);
field
.
addEventListener
(
'
select
'
,
()
=>
{
console
.
log
(
'
event::select
'
);
// transferForm
// .querySelector("input[type='submit']")
// .setAttribute('disabled', !field.val() ? 'disabled' : '');
});
field
.
addEventListener
(
'
change
'
,
()
=>
{
console
.
log
(
'
event::change
'
);
// transferForm
// .querySelector("input[type='submit']")
// .setAttribute('disabled', !field.val() ? 'disabled' : '');
});
// field.trigger('change');
transferForm
.
querySelector
(
"
input[type='submit']
"
).
setAttribute
(
'
disabled
'
,
'
disabled
'
);
}
app/assets/javascripts/pages/groups/edit/index.js
View file @
9a02fd32
...
...
@@ -19,7 +19,8 @@ document.addEventListener('DOMContentLoaded', () => {
document
.
querySelectorAll
(
'
.js-general-settings-form, .js-general-permissions-form
'
),
);
mountBadgeSettings
(
GROUP_BADGE
);
setupTransferEdit
(
'
.js-group-transfer-form
'
,
'
#new_parent_group_id
'
);
setupTransferEdit
(
'
.js-group-transfer-form
'
,
'
.dropdown-group-transfer
'
,
'
#new_parent_group_id
'
);
// Initialize Subgroups selector
groupsSelect
();
...
...
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