Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
dbd50142
Commit
dbd50142
authored
Jul 14, 2012
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#1684880
by droplet, nod_: JSHint user.
parent
811885d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
core/modules/user/user.js
core/modules/user/user.js
+2
-3
core/modules/user/user.permissions.js
core/modules/user/user.permissions.js
+5
-2
No files found.
core/modules/user/user.js
View file @
dbd50142
...
...
@@ -18,13 +18,13 @@ Drupal.behaviors.password = {
innerWrapper
.
addClass
(
'
password-parent
'
);
// Add the password confirmation layer.
outerWrapper
.
find
(
'
input.password-confirm
'
).
parent
().
prepend
(
'
<div class="password-confirm">
'
+
translate
[
'
confirmTitle
'
]
+
'
<span></span></div>
'
).
addClass
(
'
confirm-parent
'
);
outerWrapper
.
find
(
'
input.password-confirm
'
).
parent
().
prepend
(
'
<div class="password-confirm">
'
+
translate
.
confirmTitle
+
'
<span></span></div>
'
).
addClass
(
'
confirm-parent
'
);
var
confirmInput
=
outerWrapper
.
find
(
'
input.password-confirm
'
);
var
confirmResult
=
outerWrapper
.
find
(
'
div.password-confirm
'
);
var
confirmChild
=
confirmResult
.
find
(
'
span
'
);
// Add the description box.
var
passwordMeter
=
'
<div class="password-strength"><div class="password-strength-text" aria-live="assertive"></div><div class="password-strength-title">
'
+
translate
[
'
strengthTitle
'
]
+
'
</div><div class="password-indicator"><div class="indicator"></div></div></div>
'
;
var
passwordMeter
=
'
<div class="password-strength"><div class="password-strength-text" aria-live="assertive"></div><div class="password-strength-title">
'
+
translate
.
strengthTitle
+
'
</div><div class="password-indicator"><div class="indicator"></div></div></div>
'
;
confirmInput
.
parent
().
after
(
'
<div class="password-suggestions description"></div>
'
);
innerWrapper
.
prepend
(
passwordMeter
);
var
passwordDescription
=
outerWrapper
.
find
(
'
div.password-suggestions
'
).
hide
();
...
...
@@ -159,7 +159,6 @@ Drupal.evaluatePasswordStrength = function (password, translate) {
strength
=
5
;
}
var
indicatorText
;
// Based on the strength, work out what text should be shown by the password strength meter.
if
(
strength
<
60
)
{
indicatorText
=
translate
.
weak
;
...
...
core/modules/user/user.permissions.js
View file @
dbd50142
...
...
@@ -15,11 +15,14 @@ Drupal.behaviors.permissions = {
// performed without triggering internal layout and re-rendering processes
// in the browser.
var
$table
=
$
(
this
);
var
$ancestor
,
method
;
if
(
$table
.
prev
().
length
)
{
var
$ancestor
=
$table
.
prev
(),
method
=
'
after
'
;
$ancestor
=
$table
.
prev
();
method
=
'
after
'
;
}
else
{
var
$ancestor
=
$table
.
parent
(),
method
=
'
append
'
;
$ancestor
=
$table
.
parent
();
method
=
'
append
'
;
}
$table
.
detach
();
...
...
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