imgResponsive: true,
border: '',
- src: 'about:blank',
+ src: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
href: false,
target: false,
xsUrl: '',
var alpha = /^[a-zA-Z_]+$/;
var alphanum = /^[a-zA-Z0-9_]+$/;
var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
- var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+ var url = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+ var urlWeb = /^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i
// All these messages and functions are configurable
return {
url : function(v){
return url.test(v);
},
+ /**
+ * The funciton used to validate URLs (only allow schemes 'https' and 'http')
+ * @param {String} v The URL
+ */
+ urlWeb : function(v) {
+ return urlWeb.test(v);
+ },
/**
* The error text to display when the url validation function returns false
* @type String
}
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.validate();
this.el.removeClass([this.invalidClass, this.validClass]);
this.inputEl().removeClass(['is-valid', 'is-invalid']);
+
+ if(this.hasFeedback && this.inputType != 'hidden'){
+
+ var feedback = this.el.select('.form-control-feedback', true).first();
+
+ if(feedback){
+ this.el.select('.form-control-feedback', true).first().removeClass([this.invalidFeedbackClass, this.validFeedbackClass]);
+ feedback.update('');
+ feedback.hide();
+ }
+
+ }
},
/**
* Returns the name of the field
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);
}
+
+ if(feedback.dom.innerHTML) {
+ feedback.show();
+ }
}
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.disabled || this.allowBlank){
if(feedback){
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);
}
+
+ if(feedback.dom.innerHTML) {
+ 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, {
+
+ onRender : function(ct, position)
+ {
+ Roo.bootstrap.form.SecurePass.superclass.onRender.call(this, ct, position);
+
+ 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 input = this.inputEl();
+ var toggle = this.toggleEl();
+
+ toggle.removeClass(['password-visible', 'password-hidden']);
+
+ if(input.attr('type') == 'password') {
+ input.attr('type', 'text');
+ toggle.addClass('password-visible');
+ }
+ else {
+ input.attr('type', 'password');
+ toggle.addClass('password-hidden');
+ }
+ }
});Roo.rtf = {}; // namespace
Roo.rtf.Hex = function(hex)
{
var parser = new Roo.rtf.Parser(cd.getData('text/rtf'));
images = parser.doc ? parser.doc.getElementsByType('pict') : [];
}
- //Roo.log(images);
- //Roo.log(imgs);
+ // Roo.log(images);
+ // Roo.log(imgs);
// fixme..
images = images.filter(function(g) { return !g.path.match(/^rtf\/(head|pgdsctbl|listtable|footerf)/); }) // ignore headers/footers etc.
.map(function(g) { return g.toDataURL(); })
{
tag : 'iframe',
style : 'border: 0px',
- src : 'about:blank'
+ src : 'data:text/html,%3Cbody%3E%3C%2Fbody%3E'
}
];
}