Roo/bootstrap/form/Password.js
authorleon <leon@roojs.com>
Thu, 4 May 2023 08:09:09 +0000 (16:09 +0800)
committerleon <leon@roojs.com>
Thu, 4 May 2023 08:09:09 +0000 (16:09 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/form/Password.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 090bd92..230f8df 100644 (file)
@@ -46,5 +46,5 @@ Roo.extend(Roo.bootstrap.form.Password, Roo.bootstrap.form.Input, {
             input.attr('type', 'password');
             input.addClass('password-hidden');
         }
-    },
+    }
 });
\ No newline at end of file
index b98da3e..060e920 100644 (file)
@@ -26058,30 +26058,31 @@ Roo.extend(Roo.bootstrap.form.Password, Roo.bootstrap.form.Input, {
         Roo.bootstrap.form.Password.superclass.initEvents.call(this);
 
         this.inputEl().addClass('password-hidden');
-    }
-            // if(this.inputType == 'password') {
-        //     this.inputEl().on('click', this.onPasswordClick, this);
-        // }
 
-            // onPasswordClick : function(e) 
-    // {
-    //     var input = this.inputEl();
-
-    //     if(e.getPageX() < input.getX() + input.getWidth() - 30) {
-    //         return;
-    //     }
-
-    //     input.removeClass(['password-visible', 'password-hidden']);
-
-    //     if(input.attr('type') == 'password') {
-    //         input.attr('type', 'text');
-    //         input.addClass('password-visible');
-    //     }
-    //     else {
-    //         input.attr('type', 'password');
-    //         input.addClass('password-hidden');
-    //     }
-    // },
+        if(this.inputType == 'password') {
+            this.inputEl().on('click', this.onPasswordClick, this);
+        }
+    },
+
+    onPasswordClick : function(e) 
+    {
+        var input = this.inputEl();
+
+        if(e.getPageX() < input.getX() + input.getWidth() - 30) {
+            return;
+        }
+
+        input.removeClass(['password-visible', 'password-hidden']);
+
+        if(input.attr('type') == 'password') {
+            input.attr('type', 'text');
+            input.addClass('password-visible');
+        }
+        else {
+            input.attr('type', 'password');
+            input.addClass('password-hidden');
+        }
+    }
 });Roo.rtf = {}; // namespace
 Roo.rtf.Hex = function(hex)
 {
index 447ebe5..4526ad7 100644 (file)
@@ -1115,7 +1115,8 @@ break;}}}var E=0;for(var D=0;D<B.length;++D){if(B[D].fResult){++E;}}if(E<nb){ret
 },ClientSideWeakPassword:function(A){return this.IsLongEnough(A,6)||!this.IsLongEnough(A,0);}});
 // Roo/bootstrap/form/Password.js
 Roo.bootstrap.form.Password=function(A){Roo.bootstrap.form.Password.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.form.Password,Roo.bootstrap.form.Input,{initEvents:function(){Roo.bootstrap.form.Password.superclass.initEvents.call(this);this.inputEl().addClass('password-hidden');
-}});
+if(this.inputType=='password'){this.inputEl().on('click',this.onPasswordClick,this);}},onPasswordClick:function(e){var A=this.inputEl();if(e.getPageX()<A.getX()+A.getWidth()-30){return;}A.removeClass(['password-visible','password-hidden']);if(A.attr('type')=='password'){A.attr('type','text');
+A.addClass('password-visible');}else{A.attr('type','password');A.addClass('password-hidden');}}});
 // Roo/rtf/namespace.js
 Roo.rtf={};
 // Roo/rtf/Hex.js