Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-579621-msh into lp:openerp-web/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-579621-msh/+merge/126215
Hello,
Fixed the issue of URL widget which does not open URL when protocol not defined
in value.
Demo :- Enter any URL for example openerp.com without protocol and click on
button "Open Resource", Here protocol is not defined due to which window.open
method will not open URL properly, hence by default used http same as page view.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-579621-msh/+merge/126215
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-579621-msh.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js 2012-09-24 15:26:28 +0000
+++ addons/web/static/src/js/view_form.js 2012-09-25 10:46:49 +0000
@@ -1591,6 +1591,10 @@
if (!this.value) {
this.do_warn(_t("Resource error"), _t("This resource is empty"));
} else {
+ var s = /(\w+):(.+)/.exec(this.value);
+ if (!s) {
+ this.value = "http://" + this.value;
+ }
window.open(this.value);
}
}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp