Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Aug 2014 at 09:14 UTC
Updated:
1 Sep 2014 at 23:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
emma.mariaComment #2
emma.mariaI added the different colour classes as states (is-weak etc) which are set based on the width of the indicator just as the hardcoded colours were originally.
I added a removeClass before the addClass to tidy up the classes in the markup and make sure only one is set at a time.
Screenshots

Comment #3
mgiffordWorks well on SimplyTest.me - http://s78da2e4c91252e2.s2.simplytest.me
Comment #4
mgiffordSome examples...
Comment #5
lewisnymanSeems like a good fix
I wonder if there is a better way of doing this. Let's see if JS people chime in.
Comment #6
tompagabor commentedYes, there is a shorten way without jQuery.
Just change
to
Comment #7
emma.mariaSwitched out the jquery in favour of @tompagabor's solution and it works well, thanks for the suggestion!
Screenshot to show Strong only has one class and a CSS colour + patch

Comment #8
nod_I would rather not have unrelated class name hardcoded in the JS (because then we'll have to deal with it later on). Also #5/7 would remove any custom class on that element. Let's only deal with classes this script is responsible for.
#2 is RTBC. Not better way without handling the state and we really don't want to deal with state for a simple script like that.
Comment #9
alexpottCommitted #2 - 0d510d7 and pushed to 8.0.x. Thanks!
Comment #12
droplet commentedso why do we hard-coded strength then ?