[IMP] treeview style
bzr revid: xmo@openerp.com-20120116124740-4wurhqtu25rhzdr6
This commit is contained in:
commit
82619428f1
|
@ -1851,15 +1851,28 @@ label.error {
|
|||
}
|
||||
.openerp .oe-treeview-table {
|
||||
width: 100%;
|
||||
background-color : #FFFFFF;
|
||||
border-spacing: 0;
|
||||
}
|
||||
.openerp .oe-treeview-table tr:hover{
|
||||
color: blue;
|
||||
background-color : #D8D8D8;
|
||||
}
|
||||
.treeview-tr, .treeview-td {
|
||||
cursor: pointer;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #CFCCCC;
|
||||
}
|
||||
.oe-number{
|
||||
text-align: right !important;
|
||||
}
|
||||
.treeview-tr span, .treeview-td span {
|
||||
font-size: 90%;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.treeview-tr:first-of-type {
|
||||
background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat;
|
||||
}
|
||||
|
@ -1872,8 +1885,11 @@ label.error {
|
|||
}
|
||||
|
||||
.treeview-header {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
background-color : #D8D8D8;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
padding: 4px 5px;
|
||||
}
|
||||
/* Shortcuts*/
|
||||
.oe-shortcut-toggle {
|
||||
|
|
|
@ -553,16 +553,21 @@
|
|||
t-att-data-id="record.id" t-att-data-level="level + 1">
|
||||
<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="style" t-value="'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;'"/>
|
||||
|
||||
<td t-foreach="fields_view" t-as="field"
|
||||
t-if="!field.attrs.modifiers.tree_invisible"
|
||||
t-att-data-id="record.id"
|
||||
t-att-style="color_for(record) + (!field_index ? 'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;' : '')"
|
||||
t-att-class="class">
|
||||
<span t-if="!field.attrs.modifiers.invisible">
|
||||
t-att-style="color_for(record) + style "
|
||||
t-att-class="(fields[field.attrs.name].type === 'float') or (fields[field.attrs.name].type === 'integer')
|
||||
? (class +' ' +'oe-number') : class">
|
||||
|
||||
<span t-if="!field.attrs.modifiers.invisible" >
|
||||
<t t-esc="render(record[field.attrs.name], fields[field.attrs.name])" />
|
||||
</span>
|
||||
|
||||
<t t-set="class" t-value="'treeview-td'"/>
|
||||
<t t-set="style" t-value="''"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
Loading…
Reference in New Issue