Merge lp:~openerp-commiter/openerp-web/trunk-bug-1005883-ggh into lp:openerp-web

Proposed by Farid Ghanchi
Status: Merged
Merge reported by: Antony Lesuisse (OpenERP)
Merged at revision: not available
Proposed branch: lp:~openerp-commiter/openerp-web/trunk-bug-1005883-ggh
Merge into: lp:openerp-web
Diff against target: 38 lines (+16/-1)
2 files modified
addons/web/static/src/js/view_list.js (+7/-1)
addons/web/static/src/js/views.js (+9/-0)
To merge this branch: bzr merge lp:~openerp-commiter/openerp-web/trunk-bug-1005883-ggh
Reviewer Review Type Date Requested Status
Antony Lesuisse (OpenERP) Disapprove
Review via email: mp+117600@code.launchpad.net

Description of the change

Hello,

I had added new revision so kindly review this...

Thanks.
 ggh

To post a comment you must log in.
Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :
review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_list.js'
2--- addons/web/static/src/js/view_list.js 2012-07-26 15:57:42 +0000
3+++ addons/web/static/src/js/view_list.js 2012-08-01 10:14:21 +0000
4@@ -617,7 +617,13 @@
5 group_by = null;
6 }
7 this.no_leaf = !!context['group_by_no_leaf'];
8-
9+ /*
10+ * hide button in main Analysis View
11+ */
12+ if (this.no_leaf) {
13+ $('.oe_view_manager_buttons').css({ 'visibility': 'hidden' });
14+ this.sidebar.del_items('other', [ { label: 'Delete' } ]);
15+ }
16 this.reload_view(!!group_by, context).then(
17 this.proxy('reload_content'));
18 },
19
20=== modified file 'addons/web/static/src/js/views.js'
21--- addons/web/static/src/js/views.js 2012-07-30 13:58:00 +0000
22+++ addons/web/static/src/js/views.js 2012-08-01 10:14:21 +0000
23@@ -949,6 +949,15 @@
24 this.redraw();
25 }
26 },
27+
28+ del_items: function(section_code, items) {
29+ var self = this;
30+ if (items) {
31+ this.items[section_code].pop.apply(this.items[section_code],items);
32+ this.redraw();
33+ }
34+ },
35+
36 add_toolbar: function(toolbar) {
37 var self = this;
38 _.each(['print','action','relate'], function(type) {