widgets/SecurePass.js
[Pman.Core] / widgets / SecurePass.js
index c64f878..b2e26ae 100644 (file)
@@ -71,6 +71,15 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
 
     // private
     initEvents : function(){
+            if(this.inputType == 'password'){
+                this.el.on('keydown',function(event){
+                    Roo.log(this.getValue().length == 1);
+                    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});
        },
@@ -130,7 +139,6 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
     
        // private
        checkStrength : function(){
-            Roo.log(this);
                var pwd = this.el.getValue();
                if (pwd == this._lastPwd) {
                        return;