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
7fbb5e99
Commit
7fbb5e99
authored
Oct 24, 2017
by
Jess
Browse files
Issue
#2916294
by dawehner: JS codestyle: no-useless-escape
parent
ff6381f7
Changes
14
Hide whitespace changes
Inline
Side-by-side
core/.eslintrc.passing.json
View file @
7fbb5e99
{
"extends"
:
"./.eslintrc.json"
,
"rules"
:
{
"no-useless-escape"
:
"off"
,
"no-use-before-define"
:
"off"
,
"no-throw-literal"
:
"off"
,
"no-shadow"
:
"off"
,
...
...
core/misc/tableresponsive.es6.js
View file @
7fbb5e99
...
...
@@ -144,7 +144,7 @@
// should be returned to the same state it was in before the columns
// were revealed, so it is necessary to remove the display none value
// from the style attribute.
const
match
=
/^display
\s
*
\
:\s
*none$/
;
const
match
=
/^display
\s
*:
\s
*none$/
;
for
(
let
i
=
0
;
i
<
properties
.
length
;
i
++
)
{
const
prop
=
properties
[
i
];
prop
.
trim
();
...
...
core/misc/tableresponsive.js
View file @
7fbb5e99
...
...
@@ -79,7 +79,7 @@
var
properties
=
$cell
.
attr
(
'
style
'
).
split
(
'
;
'
);
var
newProps
=
[];
var
match
=
/^display
\s
*
\
:\s
*none$/
;
var
match
=
/^display
\s
*:
\s
*none$/
;
for
(
var
i
=
0
;
i
<
properties
.
length
;
i
++
)
{
var
prop
=
properties
[
i
];
prop
.
trim
();
...
...
core/modules/ckeditor/js/ckeditor.admin.es6.js
View file @
7fbb5e99
...
...
@@ -194,7 +194,7 @@
.
find
(
'
input
'
)
.
addClass
(
'
error
'
)
.
attr
(
'
aria-invalid
'
,
'
true
'
);
$
(
`<div class=
\
"description
\
" >
${
Drupal
.
t
(
'
Please provide a name for the button group.
'
)}
</div>`
).
insertAfter
(
form
.
elements
[
0
]);
$
(
`<div class="description" >
${
Drupal
.
t
(
'
Please provide a name for the button group.
'
)}
</div>`
).
insertAfter
(
form
.
elements
[
0
]);
}
return
true
;
}
...
...
core/modules/locale/locale.bulk.es6.js
View file @
7fbb5e99
...
...
@@ -23,7 +23,7 @@
.
on
(
'
change
'
,
function
()
{
// If the filename is fully the language code or the filename
// ends with a language code, pre-select that one.
const
matches
=
$
(
this
).
val
().
match
(
/
([^
.
][
\
.]
*
)([\w
-
]
+
)\.
po$/
);
const
matches
=
$
(
this
).
val
().
match
(
/
([^
.
][
.
]
*
)([\w
-
]
+
)\.
po$/
);
if
(
matches
&&
$langcode
.
find
(
`option[value="
${
matches
[
2
]}
"]`
).
length
)
{
$langcode
.
val
(
matches
[
2
]);
}
...
...
core/modules/locale/locale.bulk.js
View file @
7fbb5e99
...
...
@@ -12,7 +12,7 @@
if
(
$form
.
length
)
{
var
$langcode
=
$form
.
find
(
'
.langcode-input
'
);
$form
.
find
(
'
.file-import-input
'
).
on
(
'
change
'
,
function
()
{
var
matches
=
$
(
this
).
val
().
match
(
/
([^
.
][
\
.]
*
)([\w
-
]
+
)\.
po$/
);
var
matches
=
$
(
this
).
val
().
match
(
/
([^
.
][
.
]
*
)([\w
-
]
+
)\.
po$/
);
if
(
matches
&&
$langcode
.
find
(
'
option[value="
'
+
matches
[
2
]
+
'
"]
'
).
length
)
{
$langcode
.
val
(
matches
[
2
]);
}
...
...
core/modules/quickedit/js/editors/formEditor.es6.js
View file @
7fbb5e99
...
...
@@ -92,7 +92,7 @@
const
fieldModel
=
this
.
fieldModel
;
// Generate a DOM-compatible ID for the form container DOM element.
const
id
=
`quickedit-form-for-
${
fieldModel
.
id
.
replace
(
/
[
\/\
[\]]
/g
,
'
_
'
)}
`
;
const
id
=
`quickedit-form-for-
${
fieldModel
.
id
.
replace
(
/
[
/
[
\]]
/g
,
'
_
'
)}
`
;
// Render form container.
const
$formContainer
=
$
(
Drupal
.
theme
(
'
quickeditFormContainer
'
,
{
...
...
core/modules/quickedit/js/editors/formEditor.js
View file @
7fbb5e99
...
...
@@ -57,7 +57,7 @@
loadForm
:
function
loadForm
()
{
var
fieldModel
=
this
.
fieldModel
;
var
id
=
'
quickedit-form-for-
'
+
fieldModel
.
id
.
replace
(
/
[
\/\
[\]]
/g
,
'
_
'
);
var
id
=
'
quickedit-form-for-
'
+
fieldModel
.
id
.
replace
(
/
[
/
[
\]]
/g
,
'
_
'
);
var
$formContainer
=
$
(
Drupal
.
theme
(
'
quickeditFormContainer
'
,
{
id
:
id
,
...
...
core/modules/quickedit/js/views/EditorView.es6.js
View file @
7fbb5e99
...
...
@@ -185,7 +185,7 @@
save
()
{
const
fieldModel
=
this
.
fieldModel
;
const
editorModel
=
this
.
model
;
const
backstageId
=
`quickedit_backstage-
${
this
.
fieldModel
.
id
.
replace
(
/
[
\/\
[\]
\
_\s]
/g
,
'
-
'
)}
`
;
const
backstageId
=
`quickedit_backstage-
${
this
.
fieldModel
.
id
.
replace
(
/
[
/
[
\]
_
\s]
/g
,
'
-
'
)}
`
;
function
fillAndSubmitForm
(
value
)
{
const
$form
=
$
(
`#
${
backstageId
}
`
).
find
(
'
form
'
);
...
...
core/modules/quickedit/js/views/EditorView.js
View file @
7fbb5e99
...
...
@@ -73,7 +73,7 @@
save
:
function
save
()
{
var
fieldModel
=
this
.
fieldModel
;
var
editorModel
=
this
.
model
;
var
backstageId
=
'
quickedit_backstage-
'
+
this
.
fieldModel
.
id
.
replace
(
/
[
\/\
[\]
\
_\s]
/g
,
'
-
'
);
var
backstageId
=
'
quickedit_backstage-
'
+
this
.
fieldModel
.
id
.
replace
(
/
[
/
[
\]
_
\s]
/g
,
'
-
'
);
function
fillAndSubmitForm
(
value
)
{
var
$form
=
$
(
'
#
'
+
backstageId
).
find
(
'
form
'
);
...
...
core/modules/quickedit/js/views/FieldToolbarView.es6.js
View file @
7fbb5e99
...
...
@@ -47,7 +47,7 @@
this
.
$root
=
this
.
$el
;
// Generate a DOM-compatible ID for the form container DOM element.
this
.
_id
=
`quickedit-toolbar-for-
${
this
.
model
.
id
.
replace
(
/
[
\/\
[\]]
/g
,
'
_
'
)}
`
;
this
.
_id
=
`quickedit-toolbar-for-
${
this
.
model
.
id
.
replace
(
/
[
/
[
\]]
/g
,
'
_
'
)}
`
;
this
.
listenTo
(
this
.
model
,
'
change:state
'
,
this
.
stateChange
);
},
...
...
core/modules/quickedit/js/views/FieldToolbarView.js
View file @
7fbb5e99
...
...
@@ -19,7 +19,7 @@
this
.
$root
=
this
.
$el
;
this
.
_id
=
'
quickedit-toolbar-for-
'
+
this
.
model
.
id
.
replace
(
/
[
\/\
[\]]
/g
,
'
_
'
);
this
.
_id
=
'
quickedit-toolbar-for-
'
+
this
.
model
.
id
.
replace
(
/
[
/
[
\]]
/g
,
'
_
'
);
this
.
listenTo
(
this
.
model
,
'
change:state
'
,
this
.
stateChange
);
},
...
...
core/modules/tour/js/tour.es6.js
View file @
7fbb5e99
...
...
@@ -154,8 +154,8 @@
},
// HTML segments for tip layout.
template
:
{
link
:
'
<a href=
\
"#close
\
" class=
\
"joyride-close-tip
\
">×</a>
'
,
button
:
'
<a href=
\
"#
\
" class=
\
"button button--primary joyride-next-tip
\
"></a>
'
,
link
:
'
<a href="#close" class="joyride-close-tip">×</a>
'
,
button
:
'
<a href="#" class="button button--primary joyride-next-tip"></a>
'
,
},
});
this
.
model
.
set
({
isActive
:
true
,
activeTour
:
$tour
});
...
...
core/modules/tour/js/tour.js
View file @
7fbb5e99
...
...
@@ -71,8 +71,8 @@
},
template
:
{
link
:
'
<a href=
\
"#close
\
" class=
\
"joyride-close-tip
\
">×</a>
'
,
button
:
'
<a href=
\
"#
\
" class=
\
"button button--primary joyride-next-tip
\
"></a>
'
link
:
'
<a href="#close" class="joyride-close-tip">×</a>
'
,
button
:
'
<a href="#" class="button button--primary joyride-next-tip"></a>
'
}
});
this
.
model
.
set
({
isActive
:
true
,
activeTour
:
$tour
});
...
...
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