widgets/SecurePass.js
[Pman.Core] / widgets / SecurePass.js
index b9f8201..d6a4a62 100644 (file)
@@ -71,9 +71,17 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
 
     // private
     initEvents : function(){
-        Ext.form.SecurePass.superclass.initEvents.call(this);
-                Roo.log('run');
-               this.el.on('keyup', this.checkStrength, this, {buffer:50});
+            if(this.inputType == 'password'){
+                this.el.on('keydown',function(event){
+                    Roo.log(this.getValue());
+                    if(event.getKey() == 8 && this.getValue().length == 1){
+                        event.preventDefault();
+                        this.setValue('');
+                    };
+                },this);
+            }
+            Ext.form.SecurePass.superclass.initEvents.call(this);
+            this.el.on('keyup', this.checkStrength, this, {buffer:50});
        },
 
        // private