}
this.inputEl().on('change', this.onChange, this);
+
+ if(this.hasFeedback && this.inputType != 'hidden'){
+
+ var feedback = this.el.select('.form-control-feedback', true).first();
+
+ if(feedback) {
+ feedback.hide();
+ }
+ }
},
filterValidation : function(e){
this.el.select('.form-control-feedback', true).first().removeClass(this.invalidFeedbackClass);
feedback.update('');
+ feedback.hide();
}
}
if(feedback){
this.el.select('.form-control-feedback', true).first().removeClass([this.invalidFeedbackClass, this.validFeedbackClass]);
feedback.update('');
+ feedback.hide();
}
if(this.indicator){
this.el.select('.form-control-feedback', true).first().removeClass(
[this.invalidFeedbackClass, this.validFeedbackClass]);
feedback.update('');
+ feedback.hide();
}
if(this.disabled){
if(!this.allowBlank && !this.getRawValue().length){
feedback.update(this.blankText);
}
+
+ feedback.show();
}
return this.IsLongEnough(pwd, 6) || !this.IsLongEnough(pwd, 0);
}
+});/**
+ * @class Roo.bootstrap.form.Password
+ * @extends Roo.bootstrap.form.Input
+ * Bootstrap Password class
+ *
+ *
+ *
+ *
+ * @constructor
+ * Create a new Password
+ * @param {Object} config The config object
+ */
+
+Roo.bootstrap.form.Password = function(config){
+ Roo.bootstrap.form.Password.superclass.constructor.call(this, config);
+
+ this.inputType = 'password';
+};
+
+Roo.extend(Roo.bootstrap.form.Password, Roo.bootstrap.form.Input, {
+
+ initEvents : function()
+ {
+ Roo.bootstrap.form.Password.superclass.initEvents.call(this);
+
+ this.el.addClass('form-password');
+
+ this.inputEl().addClass('password-hidden');
+
+ 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)
{