Roo/bootstrap/form/Password.js
authorleon <leon@roojs.com>
Mon, 15 May 2023 05:15:52 +0000 (13:15 +0800)
committerleon <leon@roojs.com>
Mon, 15 May 2023 05:15:52 +0000 (13:15 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index a2ff9d2..fbfe9a4 100644 (file)
@@ -23,6 +23,8 @@ Roo.extend(Roo.bootstrap.form.Password, Roo.bootstrap.form.Input, {
     {
         Roo.bootstrap.form.SecurePass.superclass.onRender.call(this, ct, position);
 
+        this.el.addClass('form-password');
+
         this.wrap = this.inputEl().wrap({
             cls : 'password-wrap'
         });
@@ -31,21 +33,11 @@ Roo.extend(Roo.bootstrap.form.Password, Roo.bootstrap.form.Input, {
             tag : 'Button',
             cls : 'password-toggle'
         });
-    },
-
-    initEvents : function()
-    {   
-        Roo.bootstrap.form.Password.superclass.initEvents.call(this);
-
-        this.el.addClass('form-password');
-
-        Roo.log(this.toggleEl());
 
-        Roo.log('AAAA');
 
-        // this.toggleEl().addClass('password-hidden');
+        this.toggleEl().addClass('password-hidden');
 
-        // this.toggleEl().on('click', this.onToggleClick, this);;
+        this.toggleEl().on('click', this.onToggleClick, this);;
     },
 
     toggleEl: function()
index fef6a67..a458bca 100644 (file)
@@ -26073,6 +26073,8 @@ Roo.extend(Roo.bootstrap.form.Password, Roo.bootstrap.form.Input, {
     {
         Roo.bootstrap.form.SecurePass.superclass.onRender.call(this, ct, position);
 
+        this.el.addClass('form-password');
+
         this.wrap = this.inputEl().wrap({
             cls : 'password-wrap'
         });
@@ -26081,21 +26083,11 @@ Roo.extend(Roo.bootstrap.form.Password, Roo.bootstrap.form.Input, {
             tag : 'Button',
             cls : 'password-toggle'
         });
-    },
-
-    initEvents : function()
-    {   
-        Roo.bootstrap.form.Password.superclass.initEvents.call(this);
-
-        this.el.addClass('form-password');
-
-        Roo.log(this.toggleEl());
 
-        Roo.log('AAAA');
 
-        // this.toggleEl().addClass('password-hidden');
+        this.toggleEl().addClass('password-hidden');
 
-        // this.toggleEl().on('click', this.onToggleClick, this);;
+        this.toggleEl().on('click', this.onToggleClick, this);;
     },
 
     toggleEl: function()
index 72e99aa..39b33c0 100644 (file)
@@ -1116,8 +1116,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);this.inputType='password';};Roo.extend(Roo.bootstrap.form.Password,Roo.bootstrap.form.Input,{onRender:function(ct,A){Roo.bootstrap.form.SecurePass.superclass.onRender.call(this,ct,A);
-this.wrap=this.inputEl().wrap({cls:'password-wrap'});this.toggle=this.wrap.createChild({tag:'Button',cls:'password-toggle'});},initEvents:function(){Roo.bootstrap.form.Password.superclass.initEvents.call(this);this.el.addClass('form-password');Roo.log(this.toggleEl());
-Roo.log('AAAA');},toggleEl:function(){return this.el.select('button.password-toggle',true).first();},onToggleClick:function(e){var A=this.inputEl();var B=this.toggleEl();B.removeClass(['password-visible','password-hidden']);if(A.attr('type')=='password'){A.attr('type','text');
+this.el.addClass('form-password');this.wrap=this.inputEl().wrap({cls:'password-wrap'});this.toggle=this.wrap.createChild({tag:'Button',cls:'password-toggle'});this.toggleEl().addClass('password-hidden');this.toggleEl().on('click',this.onToggleClick,this);
+;},toggleEl:function(){return this.el.select('button.password-toggle',true).first();},onToggleClick:function(e){var A=this.inputEl();var B=this.toggleEl();B.removeClass(['password-visible','password-hidden']);if(A.attr('type')=='password'){A.attr('type','text');
 B.addClass('password-visible');}else{A.attr('type','password');B.addClass('password-hidden');}}});
 // Roo/rtf/namespace.js
 Roo.rtf={};