Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
29a2728e
Commit
29a2728e
authored
Jul 20, 2018
by
Lauri Timmanee
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2983377
by ApacheEx, anmolgoyal74, drpal, m1r1k: JS codestyle: implicit-arrow-linebreak
parent
25809ca8
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/.eslintrc.passing.json
+0
-1
0 additions, 1 deletion
core/.eslintrc.passing.json
core/misc/form.es6.js
+3
-2
3 additions, 2 deletions
core/misc/form.es6.js
core/modules/block/js/block.es6.js
+7
-3
7 additions, 3 deletions
core/modules/block/js/block.es6.js
with
10 additions
and
6 deletions
core/.eslintrc.passing.json
+
0
−
1
View file @
29a2728e
...
...
@@ -11,7 +11,6 @@
"operator-linebreak"
:
"off"
,
"react/no-this-in-sfc"
:
"off"
,
"react/destructuring-assignment"
:
"off"
,
"implicit-arrow-linebreak"
:
"off"
,
"import/named"
:
"off"
}
}
This diff is collapsed.
Click to expand it.
core/misc/form.es6.js
+
3
−
2
View file @
29a2728e
...
...
@@ -154,10 +154,11 @@
* Array of IDs for form fields.
*/
function
fieldsList
(
form
)
{
const
$fieldList
=
$
(
form
).
find
(
'
[name]
'
).
map
(
(
index
,
element
)
=>
const
$fieldList
=
$
(
form
).
find
(
'
[name]
'
).
map
(
// We use id to avoid name duplicates on radio fields and filter out
// elements with a name but no id.
element
.
getAttribute
(
'
id
'
));
(
index
,
element
)
=>
element
.
getAttribute
(
'
id
'
),
);
// Return a true array.
return
$
.
makeArray
(
$fieldList
);
}
...
...
This diff is collapsed.
Click to expand it.
core/modules/block/js/block.es6.js
+
7
−
3
View file @
29a2728e
...
...
@@ -136,13 +136,17 @@
// Calculate minimum weight.
let
weight
=
-
Math
.
round
(
table
.
find
(
'
.draggable
'
).
length
/
2
);
// Update the block weights.
table
.
find
(
`.region-
${
region
}
-message`
).
nextUntil
(
'
.region-title
'
)
.
find
(
'
select.block-weight
'
).
val
(()
=>
table
.
find
(
`.region-
${
region
}
-message`
)
.
nextUntil
(
'
.region-title
'
)
.
find
(
'
select.block-weight
'
)
.
val
(
// Increment the weight before assigning it to prevent using the
// absolute minimum available weight. This way we always have an
// unused upper and lower bound, which makes manually setting the
// weights easier for users who prefer to do it that way.
++
weight
);
()
=>
++
weight
,
);
}
const
table
=
$
(
'
#blocks
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment