[MERGE] url tolerance
bzr revid: al@openerp.com-20120416233207-3sven3wtqt1adlob
This commit is contained in:
commit
d71662bd7c
|
@ -1918,7 +1918,10 @@ openerp.web.form.FieldUrl = openerp.web.form.FieldChar.extend({
|
||||||
if (!this.value) {
|
if (!this.value) {
|
||||||
this.do_warn("Resource error", "This resource is empty");
|
this.do_warn("Resource error", "This resource is empty");
|
||||||
} else {
|
} else {
|
||||||
window.open(this.value);
|
var url = $.trim(this.value);
|
||||||
|
if(/^www\./i.test(url))
|
||||||
|
url = 'http://'+url;
|
||||||
|
window.open(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue