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
=== modified file 'addons/openerp/controllers/templates/tree.mako'
--- addons/openerp/controllers/templates/tree.mako 2013-02-07 15:11:59 +0000
+++ addons/openerp/controllers/templates/tree.mako 2014-01-13 13:50:54 +0000
@@ -44,7 +44,8 @@
44 % endfor44 % endfor
45 </select>45 </select>
46 % if tree.expand_button:46 % if tree.expand_button:
47 <button onclick="TREEVIEW.current.expand_all(); return false" title="${_('Expand all tree elements.')}">${_('Expand all')}</button>47 <button onclick="TREEVIEW.current.expand_all(); return false" title="${_('Expand all tree elements.')}" id="expand_button">${_('Expand all')}</button>
48 <button onclick="TREEVIEW.current.collapse_all(); return false" title="${_('Collapse all tree elements.')}" style="display: none;" id="collapse_button">${_('Collapse all')}</button>
48 % endif49 % endif
49 </div>50 </div>
50 % endif51 % endif
5152
=== modified file 'addons/openerp/controllers/tree.py'
--- addons/openerp/controllers/tree.py 2012-11-21 11:18:08 +0000
+++ addons/openerp/controllers/tree.py 2014-01-13 13:50:54 +0000
@@ -145,7 +145,7 @@
145145
146 @expose('json')146 @expose('json')
147 def data(self, ids, model, fields, field_parent=None, icon_name=None,147 def data(self, ids, model, fields, field_parent=None, icon_name=None,
148 domain=[], context={}, sort_by=None, sort_order="asc", fields_info=None, colors={}):148 domain=[], context={}, sort_by=None, sort_order="asc", fields_info=None, colors={}, nolink=False):
149 149
150 if ids == 'None' or ids == '':150 if ids == 'None' or ids == '':
151 ids = []151 ids = []
@@ -226,7 +226,8 @@
226 'children': [],226 'children': [],
227 'items': item227 'items': item
228 }228 }
229229 if nolink=='1':
230 record['action'] = None
230 if icon_name and item.get(icon_name):231 if icon_name and item.get(icon_name):
231 icon = item.pop(icon_name)232 icon = item.pop(icon_name)
232 record['icon'] = icons.get_icon(icon)233 record['icon'] = icons.get_icon(icon)
233234
=== modified file 'addons/openerp/static/javascript/treegrid.js'
--- addons/openerp/static/javascript/treegrid.js 2012-03-09 09:29:10 +0000
+++ addons/openerp/static/javascript/treegrid.js 2014-01-13 13:50:54 +0000
@@ -221,9 +221,18 @@
221 },221 },
222 222
223 expand_all: function() {223 expand_all: function() {
224 this.options.expandall = true;224 this.options.expandall = true;
225 this.render();225 this.render();
226 }226 $('#collapse_button').toggle()
227 $('#expand_button').toggle()
228 },
229
230 collapse_all: function() {
231 this.options.expandall = false;
232 this.render();
233 $('#expand_button').toggle()
234 $('#collapse_button').toggle()
235 },
227 236
228};237};
229238
230239
=== modified file 'addons/openerp/widgets/tree_view.py'
--- addons/openerp/widgets/tree_view.py 2012-05-22 12:06:35 +0000
+++ addons/openerp/widgets/tree_view.py 2014-01-13 13:50:54 +0000
@@ -69,7 +69,7 @@
69 self.toolbar = attrs.get('toolbar', False)69 self.toolbar = attrs.get('toolbar', False)
70 # Set the button to be optional70 # Set the button to be optional
71 self.expand_button = attrs.get('expand_button', False)71 self.expand_button = attrs.get('expand_button', False)
7272 nolink = attrs.get('nolink', '0')
73 ids = []73 ids = []
74 id = res_id74 id = res_id
75 75
@@ -104,7 +104,8 @@
104 field_parent=self.field_parent,104 field_parent=self.field_parent,
105 onselection="onSelection",105 onselection="onSelection",
106 fields_info=fields_info,106 fields_info=fields_info,
107 colors=colors)107 colors=colors,
108 nolink=nolink)
108 self.id = id109 self.id = id
109 self.ids = ids110 self.ids = ids
110111

Subscribers

People subscribed via source and target branches

to all changes: