Commit dbd50142 authored by Dries's avatar Dries
Browse files

- Patch #1684880 by droplet, nod_: JSHint user.

parent 811885d7
...@@ -18,13 +18,13 @@ Drupal.behaviors.password = { ...@@ -18,13 +18,13 @@ Drupal.behaviors.password = {
innerWrapper.addClass('password-parent'); innerWrapper.addClass('password-parent');
// Add the password confirmation layer. // 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 confirmInput = outerWrapper.find('input.password-confirm');
var confirmResult = outerWrapper.find('div.password-confirm'); var confirmResult = outerWrapper.find('div.password-confirm');
var confirmChild = confirmResult.find('span'); var confirmChild = confirmResult.find('span');
// Add the description box. // 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>'); confirmInput.parent().after('<div class="password-suggestions description"></div>');
innerWrapper.prepend(passwordMeter); innerWrapper.prepend(passwordMeter);
var passwordDescription = outerWrapper.find('div.password-suggestions').hide(); var passwordDescription = outerWrapper.find('div.password-suggestions').hide();
...@@ -159,7 +159,6 @@ Drupal.evaluatePasswordStrength = function (password, translate) { ...@@ -159,7 +159,6 @@ Drupal.evaluatePasswordStrength = function (password, translate) {
strength = 5; strength = 5;
} }
var indicatorText;
// Based on the strength, work out what text should be shown by the password strength meter. // Based on the strength, work out what text should be shown by the password strength meter.
if (strength < 60) { if (strength < 60) {
indicatorText = translate.weak; indicatorText = translate.weak;
......
...@@ -15,11 +15,14 @@ Drupal.behaviors.permissions = { ...@@ -15,11 +15,14 @@ Drupal.behaviors.permissions = {
// performed without triggering internal layout and re-rendering processes // performed without triggering internal layout and re-rendering processes
// in the browser. // in the browser.
var $table = $(this); var $table = $(this);
var $ancestor, method;
if ($table.prev().length) { if ($table.prev().length) {
var $ancestor = $table.prev(), method = 'after'; $ancestor = $table.prev();
method = 'after';
} }
else { else {
var $ancestor = $table.parent(), method = 'append'; $ancestor = $table.parent();
method = 'append';
} }
$table.detach(); $table.detach();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment