summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-07-12 09:42:37 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-07-12 09:42:37 +0200
commit30c39193163e3cedb060cdac2738765d45c07be0 (patch)
treec9f281a0f654fd0675ee9d085a43d58768cc1c7e /addons/web/static/src/xml/base.xml
parentb0b5a5988f613350d16d50d09adc9c12eb15022a (diff)
parent7f11f69f05855535678a60cabf5a2c8ec2d4d100 (diff)
[IMP] made tree view nicer
bzr revid: nicolas.vanhoren@openerp.com-20120712074237-xugmbw19wjjoes9l
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml18
1 files changed, 10 insertions, 8 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 2c8b2dd72d4..aa04df98f04 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -535,14 +535,16 @@
</t>
<t t-name="TreeView">
- <select t-if="toolbar" style="width: 30%">
- </select>
- <table class="oe_tree_table">
+ <div class = "tree_header">
+ <select t-if="toolbar" ></select>
+ <button id = "tree_view_collapse">Collapse All</button>
+ <button id = "tree_view_expand">Expand All</button>
+ </div>
+ <table class="oe-treeview-table">
<thead>
<tr>
<th t-foreach="fields_view" t-as="field"
- t-if="!field.attrs.modifiers.tree_invisible"
- class="treeview-header">
+ t-if="!field.attrs.modifiers.tree_invisible">
<t t-esc="fields[field.attrs.name].string" />
</th>
</tr>
@@ -554,11 +556,11 @@
<tr t-name="TreeView.rows"
t-foreach="records" t-as="record"
t-att-id="'treerow_' + record.id"
- t-att-data-id="record.id" t-att-data-level="level + 1">
+ t-att-data-id="record.id" t-att-data-level="level">
<t t-set="children" t-value="record[children_field]"/>
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
- <t t-set="rank" t-value="'oe_tree_first'"/>
- <t t-set="style" t-value="'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;'"/>
+ <t t-set="rank" t-value="'oe-treeview-first'"/>
+ <t t-set="style" t-value="'background-position: ' + 19*(level-1) + 'px; padding-left: ' + 19*(level-1) + 'px;'"/>
<td t-foreach="fields_view" t-as="field"
t-if="!field.attrs.modifiers.tree_invisible"