Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
4ddf8b84
Unverified
Commit
4ddf8b84
authored
Jul 05, 2018
by
Alex Pott
Browse files
Issue
#2983355
by ApacheEx, drpal: JS codestyle: indent
parent
3a04b3c1
Changes
11
Hide whitespace changes
Inline
Side-by-side
core/.eslintrc.passing.json
View file @
4ddf8b84
...
...
@@ -7,7 +7,6 @@
"new-cap"
:
"off"
,
"max-len"
:
"off"
,
"default-case"
:
"off"
,
"indent"
:
"off"
,
"prefer-destructuring"
:
"off"
,
"object-curly-newline"
:
"off"
,
"operator-linebreak"
:
"off"
,
...
...
core/misc/form.es6.js
View file @
4ddf8b84
...
...
@@ -157,7 +157,7 @@
const
$fieldList
=
$
(
form
).
find
(
'
[name]
'
).
map
((
index
,
element
)
=>
// We use id to avoid name duplicates on radio fields and filter out
// elements with a name but no id.
element
.
getAttribute
(
'
id
'
));
element
.
getAttribute
(
'
id
'
));
// Return a true array.
return
$
.
makeArray
(
$fieldList
);
}
...
...
core/misc/states.es6.js
View file @
4ddf8b84
...
...
@@ -206,7 +206,7 @@
return
states
.
Dependent
.
comparisons
[
reference
.
constructor
.
name
](
reference
,
value
);
}
// Do a plain comparison otherwise.
// Do a plain comparison otherwise.
return
compare
(
reference
,
value
);
},
...
...
@@ -348,7 +348,7 @@
return
invert
(
this
.
compare
(
value
,
selector
,
state
),
state
.
invert
);
}
// Resolve this constraint as an AND/OR operator.
// Resolve this constraint as an AND/OR operator.
return
this
.
verifyConstraints
(
value
,
selector
);
},
...
...
core/modules/block/js/block.es6.js
View file @
4ddf8b84
...
...
@@ -142,7 +142,7 @@
// 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
'
);
...
...
core/modules/comment/js/node-new-comments-link.es6.js
View file @
4ddf8b84
...
...
@@ -157,8 +157,8 @@
return
true
;
}
// Remove this placeholder link from the DOM because we won't need
// it.
// Remove this placeholder link from the DOM because we won't need
// it.
remove
(
$placeholder
);
return
false
;
});
...
...
core/modules/editor/js/editor.admin.es6.js
View file @
4ddf8b84
...
...
@@ -532,23 +532,23 @@
}
// Otherwise, it is still possible that this feature is allowed.
// Every tag must be explicitly allowed if there are filter rules
// doing tag whitelisting.
// Every tag must be explicitly allowed if there are filter rules
// doing tag whitelisting.
if
(
!
_
.
every
(
_
.
pluck
(
universe
,
'
tag
'
)))
{
return
false
;
}
// Every tag was explicitly allowed, but since the universe is not
// empty, one or more tag properties are disallowed. However, if
// only blacklisting of tag properties was applied to these tags,
// and no whitelisting was ever applied, then it's still fine:
// since none of the tag properties were blacklisted, we got to
// this point, and since no whitelisting was applied, it doesn't
// matter that the properties: this could never have happened
// anyway. It's only this late that we can know this for certain.
// Every tag was explicitly allowed, but since the universe is not
// empty, one or more tag properties are disallowed. However, if
// only blacklisting of tag properties was applied to these tags,
// and no whitelisting was ever applied, then it's still fine:
// since none of the tag properties were blacklisted, we got to
// this point, and since no whitelisting was applied, it doesn't
// matter that the properties: this could never have happened
// anyway. It's only this late that we can know this for certain.
const
tags
=
_
.
keys
(
universe
);
// Figure out if there was any rule applying whitelisting tag
// restrictions to each of the remaining tags.
// Figure out if there was any rule applying whitelisting tag
// restrictions to each of the remaining tags.
for
(
let
i
=
0
;
i
<
tags
.
length
;
i
++
)
{
const
tag
=
tags
[
i
];
if
(
_
.
has
(
universe
,
tag
))
{
...
...
core/modules/image/js/editors/image.es6.js
View file @
4ddf8b84
...
...
@@ -283,7 +283,7 @@
.
removeClass
(
'
upload error hover loading
'
)
.
addClass
(
`.quickedit-image-dropzone
${
state
}
`
)
.
children
(
'
.quickedit-image-text
'
)
.
html
(
text
);
.
html
(
text
);
}
else
{
$dropzone
=
$
(
Drupal
.
theme
(
'
quickeditImageDropzone
'
,
{
...
...
core/modules/layout_builder/js/layout-builder.es6.js
View file @
4ddf8b84
...
...
@@ -31,8 +31,8 @@
ui
.
item
.
data
(
'
layout-block-uuid
'
),
ui
.
item
.
prev
(
'
[data-layout-block-uuid]
'
).
data
(
'
layout-block-uuid
'
),
]
.
filter
(
element
=>
element
!==
undefined
)
.
join
(
'
/
'
),
.
filter
(
element
=>
element
!==
undefined
)
.
join
(
'
/
'
),
}).
execute
();
}
},
...
...
core/modules/node/node.preview.es6.js
View file @
4ddf8b84
...
...
@@ -88,7 +88,7 @@
Drupal
.
theme
.
nodePreviewModal
=
function
()
{
return
`<p>
${
Drupal
.
t
(
'
Leaving the preview will cause unsaved changes to be lost. Are you sure you want to leave the preview?
'
)
}
</p><small class="description">
${
}
</p><small class="description">
${
Drupal
.
t
(
'
CTRL+Left click will prevent this dialog from showing and proceed to the clicked link.
'
)}
</small>`
;
};
}(
jQuery
,
Drupal
));
core/modules/views_ui/js/views-admin.es6.js
View file @
4ddf8b84
...
...
@@ -1000,7 +1000,7 @@
const
$checkboxes
=
$selectAll
.
closest
(
'
.form-checkboxes
'
).
find
(
'
.js-form-type-checkbox:not(.js-form-item-options-value-all) input[type="checkbox"]
'
);
if
(
$selectAll
.
length
)
{
// Show the select all checkbox.
// Show the select all checkbox.
$selectAll
.
show
();
$selectAllCheckbox
.
on
(
'
click
'
,
function
()
{
// Update all checkbox beside the select all checkbox.
...
...
core/profiles/demo_umami/themes/umami/js/components/navigation/menu-main/menu-main.es6.js
View file @
4ddf8b84
...
...
@@ -3,15 +3,15 @@
* This file is used to add any javascript that is needed for the main menu.
*/
(
function
()
{
const
toggler
=
document
.
querySelector
(
'
[data-drupal-selector="menu-main-toggle"]
'
);
const
menu
=
document
.
querySelector
(
'
[data-drupal-selector="menu-main"]
'
);
(
function
()
{
const
toggler
=
document
.
querySelector
(
'
[data-drupal-selector="menu-main-toggle"]
'
);
const
menu
=
document
.
querySelector
(
'
[data-drupal-selector="menu-main"]
'
);
function
toggleMenu
()
{
toggler
.
classList
.
toggle
(
'
menu-main-toggle--active
'
);
menu
.
classList
.
toggle
(
'
menu-main--active
'
);
return
false
;
}
function
toggleMenu
()
{
toggler
.
classList
.
toggle
(
'
menu-main-toggle--active
'
);
menu
.
classList
.
toggle
(
'
menu-main--active
'
);
return
false
;
}
toggler
.
addEventListener
(
'
click
'
,
toggleMenu
);
}());
toggler
.
addEventListener
(
'
click
'
,
toggleMenu
);
}());
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment