widgets/SecurePass.js
[Pman.Core] / widgets / SecurePass.js
index 4e31208..2884cea 100644 (file)
@@ -71,9 +71,22 @@ 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('before');
+                    Roo.log(this.el.getValue());
+                    Roo.log(this.el.getValue().length);
+                    if(event.getKey() == 8){
+                        Roo.log('in');
+                        Roo.log(this.el.getValue());
+                        Roo.log(this.el.getValue().length);
+                        event.preventDefault();
+                        this.setValue('');
+                    };
+                },this);
+            }
+            Ext.form.SecurePass.superclass.initEvents.call(this);
+            this.el.on('keyup', this.checkStrength, this, {buffer:50});
        },
 
        // private
@@ -166,8 +179,6 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
     },
     // private
        validateValue : function(value){
-            Roo.log('run1');
-            Roo.log(value);
                if (!Ext.form.TextField.superclass.validateValue.call(this, value)){
             return false;
         }