1. #11
    Ext User benny_boi's Avatar
    Join Date
    May 2007
    Posts
    24
    Vote Rating
    0
    benny_boi is on a distinguished road

      0  

    Default


    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! :-)

  2. #12
    Sencha User krycek's Avatar
    Join Date
    Jun 2007
    Posts
    96
    Vote Rating
    0
    krycek is on a distinguished road

      0  

    Default


    I've added 3 ifs:

    Code:
    		afterRender: function() {
    			Ext.ux.PasswordField.superclass.afterRender.call(this);
                            if (this.showStrengthMeter)
    			       this.objMeter.setWidth(this.el.getWidth(false));
    		},
    here:
    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();	
    			}
    		},

  3. #13
    Sencha User
    Join Date
    Apr 2007
    Posts
    172
    Vote Rating
    1
    medusadelft is on a distinguished road

      0  

    Default


    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.

  4. #14
    Ext User benny_boi's Avatar
    Join Date
    May 2007
    Posts
    24
    Vote Rating
    0
    benny_boi is on a distinguished road

      0  

    Default


    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:

    HTML Code:
    pwStrengthTest: function(pw) {
    				return (pw.length * 10);
    			}
    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.

    Hope this helps..

    Cheers,

    Ben

  5. #15
    Ext User benny_boi's Avatar
    Join Date
    May 2007
    Posts
    24
    Vote Rating
    0
    benny_boi is on a distinguished road

      0  

    Default


    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

  6. #16
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    213
    Vote Rating
    0
    sanjshah is on a distinguished road

      0  

    Default


    Hi,

    How can I apply the guague to a textfield - similar to the other form fields:

    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);
    		}							
    	});
    });
    Regards,

    Sanj

  7. #17
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    686
    Vote Rating
    22
    Dumbledore will become famous soon enough Dumbledore will become famous soon enough

      0  

    Default


    perhaps you can add:
    Code:
    	    reset : function(){
    		if (this.showStrengthMeter)
    	       		this.scoreBar.setWidth(0, true)
    	    }
    When the form is reset the scoreBar becomes the correct width...


    Bye

  8. #18
    Ext User DigitalSkyline's Avatar
    Join Date
    Apr 2007
    Location
    Rochester, MI
    Posts
    461
    Vote Rating
    1
    DigitalSkyline is on a distinguished road

      0  

    Default


    I added :
    Ext.reg('uxpassword', Ext.ux.PasswordField);

    can now use as xtype:'uxpassword' in form configs.

  9. #19
    Ext User
    Join Date
    Oct 2007
    Posts
    7
    Vote Rating
    0
    WebArchitect is on a distinguished road

      0  

    Default


    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 ?

  10. #20
    Ext User
    Join Date
    Dec 2007
    Posts
    10
    Vote Rating
    0
    ramaboo is on a distinguished road

      0  

    Default


    somewhere it should have a high z-index otherwise the caps warning can be hidden by other items