-
18 Dec 2007 9:01 PM #11
Thanks for the detailed code for reproducing this. The extension uses Ext element methods for calculating it's placement so I'll try to reproduce this and see what I can find by tinkering...
Sorry it's taken a few days to respond - had my laptop hard drive toast itself, so a few days building up a machine and pulling in backups of my data.. Will hopefully post a code revision in the next day or two...
Cheers! :-)
-
21 Dec 2007 3:23 AM #12
I've added 3 ifs:
here:Code:afterRender: function() { Ext.ux.PasswordField.superclass.afterRender.call(this); if (this.showStrengthMeter) this.objMeter.setWidth(this.el.getWidth(false)); },
Code:handleFocus: function(e) { if(!Ext.isOpera) { // don't touch in Opera if (this.showStrengthMeter) this.objMeter.addClass(this.pwStrengthMeterFocusCls); } }, handleBlur: function(e) { if(!Ext.isOpera) { // don't touch in Opera if (this.showStrengthMeter) this.objMeter.removeClass(this.pwStrengthMeterFocusCls); } if (this.showCapsWarning) { this.hideCapsMessage(); } },
-
22 Dec 2007 12:01 PM #13
Benny Boi,
I haven't looked at the original password strenght meter, but I found that entering 5 times 1 gives the same strength as entering $rY#2
Is this on purpose? The last one should be harder to guess/crack compared to 11111.
How about an algoritme that 'gives' points based on the type of character entered and the length of the password? These points can be used to feed the strength meter.
Just my two cents.
Maurice.
-
23 Dec 2007 2:23 AM #14
Hi Maurice...
Included in the HTML file is a sample override for the strength calculation function - it just shows that you can plug in your own function to calculate strength, and the dummy function looks at the length of the string... remove the config line from the object:
If you dont set pwStrengthTest to a custom function, it uses it's internal function which is a bit more advanced.. For future releases I'll comment the above out as it seems to be causing confusion as to how the user extension behaves by default.HTML Code:pwStrengthTest: function(pw) { return (pw.length * 10); }
Hope this helps..
Cheers,
Ben
-
23 Dec 2007 2:26 AM #15
Hi Medusadelf -
Thanks for those improvements - lazy coding on my part for not putting those conditionals in to start with.. I'll integrate into the next release...
Sorry it's taken a few days to implement the next minor release of this control - had to rebuild my development environment, on top of the mayhem that is the Christmas period..
Good to see people are interested in seeing this progress - lots of extra improvements in the works at the moment.
Stay tuned over the next few days (he says optimistically!)
Cheers,
Ben
-
24 Dec 2007 6:24 AM #16
Hi,
How can I apply the guague to a textfield - similar to the other form fields:
Regards,Code:Ext.onReady(function(){ var password = new Ext.ux.PasswordField({ width: 200, showCapsWarning: true, showStrengthMeter: true, applyto:'password', pwStrengthTest: function(pw) { return (pw.length * 10); } }); });
Sanj
-
3 Jan 2008 6:24 AM #17
perhaps you can add:
When the form is reset the scoreBar becomes the correct width...Code:reset : function(){ if (this.showStrengthMeter) this.scoreBar.setWidth(0, true) }
Bye
-
3 Jan 2008 4:22 PM #18
I added :
Ext.reg('uxpassword', Ext.ux.PasswordField);
can now use as xtype:'uxpassword' in form configs.
-
7 Apr 2008 1:56 AM #19
Hi, very nice work!
However, it seems to have some problem when it is used in tabs. It doesnt show at all... Any help on this one ?
-
13 May 2008 12:12 AM #20
somewhere it should have a high z-index otherwise the caps warning can be hidden by other items



Reply With Quote
