[im]Corrected url issue

bzr revid: dhr@tinyerp.com-20120411122315-idrxfs4wkd0ejuli
This commit is contained in:
Dharti Ratani (OpenERP) 2012-04-11 17:53:15 +05:30
parent 876f092244
commit 8d985d9cf0
1 changed files with 5 additions and 1 deletions

View File

@ -1577,7 +1577,11 @@ openerp.web.form.FieldUrl = openerp.web.form.FieldChar.extend({
if (!this.value) {
this.do_warn("Resource error", "This resource is empty");
} else {
window.open(this.value);
var url = $.trim(this.value);
if(url.toLowerCase().search("http://") != -1)
window.open(url);
else
window.open('http://'+url);
}
}
});