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
=== modified file 'openerp/controllers/viewed.py'
--- openerp/controllers/viewed.py 2010-05-19 06:19:37 +0000
+++ openerp/controllers/viewed.py 2010-08-12 13:43:44 +0000
@@ -790,6 +790,7 @@
790 'many2many': [],790 'many2many': [],
791 'many2one': [],791 'many2one': [],
792 'email' : [],792 'email' : [],
793 'callto' : [],
793 'url' : [],794 'url' : [],
794 'image' : ['name', 'string', 'width', 'height', 'required', 'readonly',795 'image' : ['name', 'string', 'width', 'height', 'required', 'readonly',
795 'domain', 'context', 'nolabel', 'colspan', 'widget', 'eval',796 'domain', 'context', 'nolabel', 'colspan', 'widget', 'eval',
796797
=== modified file 'openerp/widgets/form.py'
--- openerp/widgets/form.py 2010-06-23 11:32:39 +0000
+++ openerp/widgets/form.py 2010-08-12 13:43:44 +0000
@@ -355,6 +355,15 @@
355 if value:355 if value:
356 self.default = value356 self.default = value
357357
358class Callto(TinyInputWidget):
359 template = "templates/callto.mako"
360
361 def __init__(self, **attrs):
362 super(Callto, self).__init__(**attrs)
363
364 def set_value(self, value):
365 if value:
366 self.default = value
358367
359class Text(TinyInputWidget):368class Text(TinyInputWidget):
360 template = "templates/text.mako"369 template = "templates/text.mako"
@@ -937,6 +946,7 @@
937 'url' : URL,946 'url' : URL,
938 'image' : Image,947 'image' : Image,
939 'progressbar' : ProgressBar,948 'progressbar' : ProgressBar,
949 'callto': Callto,
940}950}
941951
942# vim: ts=4 sts=4 sw=4 si et952# vim: ts=4 sts=4 sw=4 si et
943953
=== added file 'openerp/widgets/templates/callto.mako'
--- openerp/widgets/templates/callto.mako 1970-01-01 00:00:00 +0000
+++ openerp/widgets/templates/callto.mako 2010-08-12 13:43:44 +0000
@@ -0,0 +1,22 @@
1% if editable:
2 <table width="100%" border="0" cellpadding="0" cellspacing="0">
3 <tr>
4 <td>
5 <input type="text" id="${name}" name="${name}" class="${css_class}"
6 ${py.attrs(attrs, kind=kind, value=value)}/>
7 </td>
8 <td width="16" style="padding-left: 2px">
9 <img width="16" height="16" alt="${_('Go!')}"
10 src="/static/images/stock/gtk-jump-to.png"
11 style="cursor: pointer;"
12 onclick="window.open('callto:' + $('${name}').value).close();"/>
13 </td>
14 </tr>
15 </table>
16 % if error:
17 <span class="fielderror">${error}</span>
18 % endif
19% else:
20 <a href="callto: ${value}">${value}</a>
21% endif
22
023
=== modified file 'openerp/widgets_search/search.py'
--- openerp/widgets_search/search.py 2009-12-31 05:36:21 +0000
+++ openerp/widgets_search/search.py 2010-08-12 13:43:44 +0000
@@ -234,6 +234,7 @@
234 'many2many': Char,234 'many2many': Char,
235 'many2one': Char,235 'many2one': Char,
236 'email' : Char,236 'email' : Char,
237 'callto' : Char,
237 'url' : Char,238 'url' : Char,
238}239}
239240