Merge lp:~openerp/openobject-client-web/callto_widget into lp:openobject-client-web/5.0

Proposed by Husen Daudi
Status: Rejected
Rejected by: Xavier (Open ERP)
Proposed branch: lp:~openerp/openobject-client-web/callto_widget
Merge into: lp:openobject-client-web/5.0
Diff against target: 77 lines (+34/-0)
4 files modified
openerp/controllers/viewed.py (+1/-0)
openerp/widgets/form.py (+10/-0)
openerp/widgets/templates/callto.mako (+22/-0)
openerp/widgets_search/search.py (+1/-0)
To merge this branch: bzr merge lp:~openerp/openobject-client-web/callto_widget
Reviewer Review Type Date Requested Status
OpenERP R&D Web Team Pending
Review via email: mp+32441@code.launchpad.net

Description of the change

Added widget for callto: protocol.

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

After discussions with noz, we're rejecting for merge into 5.0:

* It's a new feature, and 5.0 is in maintenance
* For trunk, we would prefer a more general URI widget which could take full URIs or an arbitrary URI scheme (maybe with pre-created list of schemes) and an arbitrary path, so we can use the same widget (or inherit from it for specific widgets) for ``callto`` but also ``tel`` or ``dav`` or ``geo`` or ``nntp`` or ``sip``. And then for arbitrary schemes used by mobile platforms (iOS, Android) for requests and data transfers between applications.

Revision history for this message
Husen Daudi (husendaudi) wrote :

Hello Xavier,

In 5.0 GTK client email, callto, SIP protocol widgets are already working.
So its better if you add it in 5.0 web client too as it is not a new feature.
We can say that web team forget to add this in 5.0 development.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> In 5.0 GTK client email, callto, SIP protocol widgets are already working.
I see no sip support in your proposal. Furthermore, as I said above, I won't merge new custom-uri-scheme-only-widgets. Especially if they're just copy/paste of the URL widget with two keywords changed. If you want to get it merged create a URI widget, and then derive it to Callto or Sip if you want to (as well as URL itself).

> So its better if you add it in 5.0 web client too as it is not a new feature.
It is for the web client.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> We can say that web team forget to add this in 5.0 development.
We can, but I still won't merge the callto widget in that state.

Unmerged revisions

2911. By husen <husen@husen-laptop>

Added callto widget

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/controllers/viewed.py'
2--- openerp/controllers/viewed.py 2010-05-19 06:19:37 +0000
3+++ openerp/controllers/viewed.py 2010-08-12 13:43:44 +0000
4@@ -790,6 +790,7 @@
5 'many2many': [],
6 'many2one': [],
7 'email' : [],
8+ 'callto' : [],
9 'url' : [],
10 'image' : ['name', 'string', 'width', 'height', 'required', 'readonly',
11 'domain', 'context', 'nolabel', 'colspan', 'widget', 'eval',
12
13=== modified file 'openerp/widgets/form.py'
14--- openerp/widgets/form.py 2010-06-23 11:32:39 +0000
15+++ openerp/widgets/form.py 2010-08-12 13:43:44 +0000
16@@ -355,6 +355,15 @@
17 if value:
18 self.default = value
19
20+class Callto(TinyInputWidget):
21+ template = "templates/callto.mako"
22+
23+ def __init__(self, **attrs):
24+ super(Callto, self).__init__(**attrs)
25+
26+ def set_value(self, value):
27+ if value:
28+ self.default = value
29
30 class Text(TinyInputWidget):
31 template = "templates/text.mako"
32@@ -937,6 +946,7 @@
33 'url' : URL,
34 'image' : Image,
35 'progressbar' : ProgressBar,
36+ 'callto': Callto,
37 }
38
39 # vim: ts=4 sts=4 sw=4 si et
40
41=== added file 'openerp/widgets/templates/callto.mako'
42--- openerp/widgets/templates/callto.mako 1970-01-01 00:00:00 +0000
43+++ openerp/widgets/templates/callto.mako 2010-08-12 13:43:44 +0000
44@@ -0,0 +1,22 @@
45+% if editable:
46+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
47+ <tr>
48+ <td>
49+ <input type="text" id="${name}" name="${name}" class="${css_class}"
50+ ${py.attrs(attrs, kind=kind, value=value)}/>
51+ </td>
52+ <td width="16" style="padding-left: 2px">
53+ <img width="16" height="16" alt="${_('Go!')}"
54+ src="/static/images/stock/gtk-jump-to.png"
55+ style="cursor: pointer;"
56+ onclick="window.open('callto:' + $('${name}').value).close();"/>
57+ </td>
58+ </tr>
59+ </table>
60+ % if error:
61+ <span class="fielderror">${error}</span>
62+ % endif
63+% else:
64+ <a href="callto: ${value}">${value}</a>
65+% endif
66+
67
68=== modified file 'openerp/widgets_search/search.py'
69--- openerp/widgets_search/search.py 2009-12-31 05:36:21 +0000
70+++ openerp/widgets_search/search.py 2010-08-12 13:43:44 +0000
71@@ -234,6 +234,7 @@
72 'many2many': Char,
73 'many2one': Char,
74 'email' : Char,
75+ 'callto' : Char,
76 'url' : Char,
77 }
78