[FIX] completely broken readonly URL form field
bzr revid: xmo@openerp.com-20111019140709-hj86g28izgnb9imy
This commit is contained in:
parent
1af7100a81
commit
f88c553d45
|
@ -2835,10 +2835,10 @@ openerp.web.form.FieldEmailReadonly = openerp.web.form.FieldURIReadonly.extend({
|
|||
});
|
||||
openerp.web.form.FieldUrlReadonly = openerp.web.form.FieldURIReadonly.extend({
|
||||
set_value: function (value) {
|
||||
var s = /(\w+):(\.+)/.match(value);
|
||||
if (!(s[0] === 'http' || s[0] === 'https')) { return; }
|
||||
this.scheme = s[0];
|
||||
this._super(s[1]);
|
||||
var s = /(\w+):(.+)/.exec(value);
|
||||
if (!s || !(s[1] === 'http' || s[1] === 'https')) { return; }
|
||||
this.scheme = s[1];
|
||||
this._super(s[2]);
|
||||
}
|
||||
});
|
||||
openerp.web.form.FieldBooleanReadonly = openerp.web.form.FieldCharReadonly.extend({
|
||||
|
|
Loading…
Reference in New Issue