[imp] editable list wip
bzr revid: nicolas.vanhoren@openerp.com-20120327162513-7d4a58skbe0inv8n
This commit is contained in:
parent
dcb5133a05
commit
078c2a4e8e
|
@ -388,8 +388,18 @@ openerp.web.list_editable = function (openerp) {
|
|||
|
||||
var xml = openerp.web.json_node_to_xml(this.fvg.arch);
|
||||
var $xml = $(xml);
|
||||
|
||||
if (this.view.editable_list.options.selectable)
|
||||
$("<td>").appendTo($element);
|
||||
if (this.view.editable_list.options.isClarkGable)
|
||||
$("<td>").appendTo($element);
|
||||
|
||||
$xml.children().each(function(i, el) {
|
||||
$td = $("<td>");
|
||||
var modifiers = JSON.parse($(el).attr("modifiers") || "{}");
|
||||
// TODO: handle #{td.classname} #{td.element_class}
|
||||
var $td = $("<td class='oe_form_frame_cell oe-field-cell'>");
|
||||
if (modifiers.tree_invisible === true)
|
||||
$td.hide();
|
||||
var tag_name = el.tagName.toLowerCase();
|
||||
var key = tag_name;
|
||||
if (tag_name === "field") {
|
||||
|
|
|
@ -711,10 +711,6 @@
|
|||
<button type="button" name="delete"></button>
|
||||
</td>
|
||||
</tr>
|
||||
<t t-name="ListView.row.form">
|
||||
<th t-if="widget.editable_list.options.selectable"></th>
|
||||
<th t-if="widget.editable_list.options.isClarkGable"></th>
|
||||
</t>
|
||||
|
||||
<t t-name="FormView">
|
||||
<div class="oe_formview">
|
||||
|
@ -1545,21 +1541,6 @@
|
|||
<td t-if="edited and !options.deletable" class="oe-listview-padding"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-name="ListView.row.frame">
|
||||
<t t-foreach="widget.table" t-as="row">
|
||||
<t t-foreach="row" t-as="td">
|
||||
<td t-att-colspan="td.colspan gt 1 ? td.colspan : undefined"
|
||||
t-att-valign="td.table ? 'top' : undefined"
|
||||
t-attf-class="oe_form_frame_cell #{td.classname} #{td.element_class} oe-field-cell"
|
||||
>
|
||||
<t t-raw="td.render()"/>
|
||||
</td>
|
||||
</t>
|
||||
</t>
|
||||
<td>
|
||||
<button class="oe-edit-row-save" type="button"> </button>
|
||||
</td>
|
||||
</t>
|
||||
<t t-name="view_editor">
|
||||
<table class="oe_view_editor">
|
||||
<t t-call="view_editor.row"/>
|
||||
|
|
Loading…
Reference in New Issue