Search view groups

bzr revid: fme@openerp.com-20110307162047-xufrqodbvj4h6zwa
This commit is contained in:
Fabien Meghazi
2011-03-07 17:20:47 +01:00
parent 01876da228
commit 2bbba687cd
4 changed files with 56 additions and 6 deletions
+27
View File
@@ -129,6 +129,33 @@ body {
border-bottom-right-radius: 7px;
}
.openerp .searchview_group_string {
display: block;
color: #7D7979;
font-weight: bold;
padding: 2px 0 2px 10px;
margin-top: 4px;
text-decoration: none;
}
.openerp .searchview_group_string:hover {
background-color: #ccc;
}
.openerp .searchview_group.folded .searchview_group_string {
background: url("img/ui/group-folded.png") no-repeat scroll 0 50%;
}
.openerp .searchview_group.folded .searchview_group_content {
display: none;
}
.openerp .searchview_group.expanded .searchview_group_string {
background: url("img/ui/group-expanded.png") no-repeat scroll 0 50%;
}
.openerp .searchview_group.expanded .searchview_group_content {
display: block;
}
.openerp .searchview_group_content {
padding-left: 10px;
}
/* Inputs */
.openerp input[type="text"], .openerp input[type="password"], .openerp select, .openerp textarea {
-moz-box-sizing: border-box;
+29 -6
View File
@@ -154,12 +154,35 @@
</div>
</td>
</t>
<t t-if="node.children and node.tag != 'newline'">
<t t-foreach="node.children" t-as="node">
<t t-call="SearchView.node">
<t t-set="previous_node_type" t-value="node_all[node_index - 1] ? node_all[node_index - 1].tag : ''"/>
<t t-set="next_node_type" t-value="node_all[node_index + 1] ? node_all[node_index + 1].tag : ''"/>
</t>
<t t-if="node.tag == 'group'">
<!-- if group is called without a <newline/> before, the table should be closed.
I think we'll need preprocessing, all those escaped tables are too ugly -->
<td>
<div t-att-class="'searchview_group ' + (node.attrs.expand == '0' ? 'folded' : 'expanded')">
<a class="searchview_group_string" href="#" onclick="$(this).parent().toggleClass('folded expanded')"><t t-esc="node.attrs.string"/></a>
<div class="searchview_group_content">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<t t-call="SearchView.recurse"/>
</tr>
</table>
</div>
</div>
</td>
&lt;/tr&gt;
&lt;/table&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tr&gt;
</t>
<t t-if="node.children and node.tag != 'newline' and node.tag != 'group'">
<t t-call="SearchView.recurse"/>
</t>
</t>
<t t-name="SearchView.recurse" t-trim="inner">
<t t-foreach="node.children" t-as="node">
<t t-call="SearchView.node">
<t t-set="previous_node_type" t-value="node_all[node_index - 1] ? node_all[node_index - 1].tag : ''"/>
<t t-set="next_node_type" t-value="node_all[node_index + 1] ? node_all[node_index + 1].tag : ''"/>
</t>
</t>
</t>
Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B