Merge lp:~therp-nl/web-addons/6.1-web_url_target_new into lp:~webaddons-core-editors/web-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 17
Proposed branch: lp:~therp-nl/web-addons/6.1-web_url_target_new
Merge into: lp:~webaddons-core-editors/web-addons/6.1
Diff against target: 73 lines (+59/-0)
2 files modified
web_url_target_new/__openerp__.py (+41/-0)
web_url_target_new/static/src/js/web_url_target_new.js (+18/-0)
To merge this branch: bzr merge lp:~therp-nl/web-addons/6.1-web_url_target_new
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) Approve
Guewen Baconnier @ Camptocamp code review, no test Approve
Holger Brunn (Therp) Needs Information
Review via email: mp+163207@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

do I understand correctly that this makes all links on forms opening a new window? And if so, is this what we want to have?

review: Needs Information
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

No, just the links of the URL widget (i.e. the partner's website).

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

LGTM

review: Approve (code review, no test)
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'web_url_target_new'
2=== added file 'web_url_target_new/__init__.py'
3=== added file 'web_url_target_new/__openerp__.py'
4--- web_url_target_new/__openerp__.py 1970-01-01 00:00:00 +0000
5+++ web_url_target_new/__openerp__.py 2013-05-09 19:12:25 +0000
6@@ -0,0 +1,41 @@
7+# -*- coding: utf-8 -*-
8+##############################################################################
9+#
10+# OpenERP, Open Source Management Solution
11+# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27+
28+{
29+ 'name': 'Open URLs in new tab',
30+ 'description': '''
31+This module adds target=_blank to the URL widget in readonly mode.
32+
33+This module is compatible with OpenERP 6.1.
34+''',
35+ 'version': '6.1.1',
36+ 'author': 'Therp BV',
37+ 'category': 'Usability',
38+ 'website': 'http://therp.nl',
39+ 'email': 'info@therp.nl',
40+ 'license': 'AGPL-3',
41+ 'depends': [
42+ 'web',
43+ ],
44+ 'js': [
45+ 'static/src/js/web_url_target_new.js'
46+ ],
47+}
48
49=== added directory 'web_url_target_new/static'
50=== added directory 'web_url_target_new/static/src'
51=== added directory 'web_url_target_new/static/src/js'
52=== added file 'web_url_target_new/static/src/js/web_url_target_new.js'
53--- web_url_target_new/static/src/js/web_url_target_new.js 1970-01-01 00:00:00 +0000
54+++ web_url_target_new/static/src/js/web_url_target_new.js 2013-05-09 19:12:25 +0000
55@@ -0,0 +1,18 @@
56+/*
57+
58+ Copyright (C) 2013 Therp BV
59+ License: GNU AFFERO GENERAL PUBLIC LICENSE
60+ Version 3 or any later version
61+
62+*/
63+
64+openerp.web_url_target_new = function (openerp) {
65+ openerp.web.page.FieldUrlReadonly.include({
66+
67+ set_value: function(value) {
68+ this._super(value);
69+ this.$element.find('a').attr('target', '_blank')
70+ },
71+
72+ });
73+}

Subscribers

People subscribed via source and target branches