X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsymbols%2Fsrc%2FRoo_bootstrap_SecurePass.js.html;h=97e0ac07f47ba3d83eff66f9975f4fd41088bf34;hb=aee20f8a5af6367c96009f05488184e259c3b161;hp=dca6310391d1888cea44e9343ae3bb8ea7163516;hpb=4093a151465ac13c049ee70abdf70f12c4e4ee20;p=roojs1 diff --git a/docs/symbols/src/Roo_bootstrap_SecurePass.js.html b/docs/symbols/src/Roo_bootstrap_SecurePass.js.html index dca6310391..97e0ac07f4 100644 --- a/docs/symbols/src/Roo_bootstrap_SecurePass.js.html +++ b/docs/symbols/src/Roo_bootstrap_SecurePass.js.html @@ -1,4 +1,22 @@ -../roojs1/Roo/bootstrap/SecurePass.jsRoo.bootstrap.SecurePass = function (config) { +../roojs1/Roo/bootstrap/SecurePass.js/* + * - LGPL + * + * Input + * + */ + +/** + * @class Roo.bootstrap.SecurePass + * @extends Roo.bootstrap.Input + * Bootstrap SecurePass class + * + * + * @constructor + * Create a new SecurePass + * @param {Object} config The config object + */ + +Roo.bootstrap.SecurePass = function (config) { // these go here, so the translation tool can replace them.. this.errors = { PwdEmpty: "Please type a password, and then retype it to confirm.", @@ -29,6 +47,7 @@ * }) */ // private + meterWidth: 300, errors: {}, imageRoot: '/', /** @@ -42,12 +61,7 @@ * ['Weak', 'Medium', 'Strong']) */ // private - pwdStrengths: [], - /** - * @cfg {String/Object} fieldsFilter A fieldsFilter spec, as [['field_name', 'error_id'], ...] - */ - // private - fieldsFilter: [], + pwdStrengths: [], // private strength: 0, // private @@ -79,22 +93,22 @@ tag: 'div', style: { 'margin-bottom': '10px', - width: this.width + 'px' + width: this.meterWidth + 'px' }, cn: { tag: 'div', - cls: 'password_meter_grey', + cls: 'password-meter-grey', style: { - width: this.width + 'px', - height: '20px' + width: this.meterWidth + 'px', + height: '10px' }, cn: { //id: 'PwdMeter', tag: 'div', - cls: 'password_meter', + cls: 'password-meter', style: { - width: 0, - height: '20px' + //width: 0, + height: '10px' } } } @@ -133,14 +147,15 @@ strength = 0; } var pm = this.trigger.child('div/div/div').dom; + console.log('strength1: ' + strength); - pm.style.width = (this.width / 3) * strength + 'px'; + pm.style.width = (this.meterWidth / 3) * strength + 'px'; //if(this.pwdStrengths != null && strength > 0) { pm.innerHTML = this.meterLabel + ' ' + this.pwdStrengths[strength]; //} else { // pm.innerHTML = ''; //} - + this._lastPwd = pwd; }, reset: function () { @@ -197,11 +212,11 @@ this.markInvalid(this.errors.TooWeak); return false; } - console.log('strength: ' + strength); + console.log('strength2: ' + strength); var pm = this.trigger.child('div/div/div').dom; - pm.style.width = (this.width / 3) * strength + 'px'; - + pm.style.width = (this.meterWidth / 3) * strength + 'px'; + pm.innerHTML = this.meterLabel + ' ' + this.pwdStrengths[strength]; /* @@ -298,26 +313,6 @@ // private ClientSideWeakPassword: function (pwd) { return this.IsLongEnough(pwd, 6) || !this.IsLongEnough(pwd, 0); - }/*, - - // private -- see TextFiedl... - not sure why we are duping the code? - SafariOnKeyDown : function(event){ - - var isSelectAll = false; - if(this.el.dom.selectionEnd > 0){ - isSelectAll = (this.el.dom.selectionEnd - this.el.dom.selectionStart - this.getValue().length == 0) ? true : false; - } - if(((event.getKey() == 8 || event.getKey() == 46) && this.getValue().length ==1)){ // backspace and delete key - event.preventDefault(); - this.setValue(''); - return; - }; - if(isSelectAll){ // backspace and delete key - - event.preventDefault(); - this.setValue(String.fromCharCode( - this.shiftKey ? event.getKey() : event.getKey().toLowerCase() - )); - }; - } */ -}) \ No newline at end of file + } + +}) \ No newline at end of file