Merge lp:~unifield-team/unifield-web/web-uf-1718 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4729
Proposed branch: lp:~unifield-team/unifield-web/web-uf-1718
Merge into: lp:unifield-web
Diff against target: 84 lines (+20/-8)
4 files modified
addons/openerp/controllers/templates/tree.mako (+2/-1)
addons/openerp/controllers/tree.py (+3/-2)
addons/openerp/static/javascript/treegrid.js (+12/-3)
addons/openerp/widgets/tree_view.py (+3/-2)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/web-uf-1718
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+201403@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/templates/tree.mako'
2--- addons/openerp/controllers/templates/tree.mako 2013-02-07 15:11:59 +0000
3+++ addons/openerp/controllers/templates/tree.mako 2014-01-13 13:50:54 +0000
4@@ -44,7 +44,8 @@
5 % endfor
6 </select>
7 % if tree.expand_button:
8- <button onclick="TREEVIEW.current.expand_all(); return false" title="${_('Expand all tree elements.')}">${_('Expand all')}</button>
9+ <button onclick="TREEVIEW.current.expand_all(); return false" title="${_('Expand all tree elements.')}" id="expand_button">${_('Expand all')}</button>
10+ <button onclick="TREEVIEW.current.collapse_all(); return false" title="${_('Collapse all tree elements.')}" style="display: none;" id="collapse_button">${_('Collapse all')}</button>
11 % endif
12 </div>
13 % endif
14
15=== modified file 'addons/openerp/controllers/tree.py'
16--- addons/openerp/controllers/tree.py 2012-11-21 11:18:08 +0000
17+++ addons/openerp/controllers/tree.py 2014-01-13 13:50:54 +0000
18@@ -145,7 +145,7 @@
19
20 @expose('json')
21 def data(self, ids, model, fields, field_parent=None, icon_name=None,
22- domain=[], context={}, sort_by=None, sort_order="asc", fields_info=None, colors={}):
23+ domain=[], context={}, sort_by=None, sort_order="asc", fields_info=None, colors={}, nolink=False):
24
25 if ids == 'None' or ids == '':
26 ids = []
27@@ -226,7 +226,8 @@
28 'children': [],
29 'items': item
30 }
31-
32+ if nolink=='1':
33+ record['action'] = None
34 if icon_name and item.get(icon_name):
35 icon = item.pop(icon_name)
36 record['icon'] = icons.get_icon(icon)
37
38=== modified file 'addons/openerp/static/javascript/treegrid.js'
39--- addons/openerp/static/javascript/treegrid.js 2012-03-09 09:29:10 +0000
40+++ addons/openerp/static/javascript/treegrid.js 2014-01-13 13:50:54 +0000
41@@ -221,9 +221,18 @@
42 },
43
44 expand_all: function() {
45- this.options.expandall = true;
46- this.render();
47- }
48+ this.options.expandall = true;
49+ this.render();
50+ $('#collapse_button').toggle()
51+ $('#expand_button').toggle()
52+ },
53+
54+ collapse_all: function() {
55+ this.options.expandall = false;
56+ this.render();
57+ $('#expand_button').toggle()
58+ $('#collapse_button').toggle()
59+ },
60
61 };
62
63
64=== modified file 'addons/openerp/widgets/tree_view.py'
65--- addons/openerp/widgets/tree_view.py 2012-05-22 12:06:35 +0000
66+++ addons/openerp/widgets/tree_view.py 2014-01-13 13:50:54 +0000
67@@ -69,7 +69,7 @@
68 self.toolbar = attrs.get('toolbar', False)
69 # Set the button to be optional
70 self.expand_button = attrs.get('expand_button', False)
71-
72+ nolink = attrs.get('nolink', '0')
73 ids = []
74 id = res_id
75
76@@ -104,7 +104,8 @@
77 field_parent=self.field_parent,
78 onselection="onSelection",
79 fields_info=fields_info,
80- colors=colors)
81+ colors=colors,
82+ nolink=nolink)
83 self.id = id
84 self.ids = ids
85

Subscribers

People subscribed via source and target branches

to all changes: