[IMP] vieweditor :- node have no attributes then edit icon not display.
bzr revid: ysa@tinyerp.com-20111111104409-bvpizxka5a0i20dd
This commit is contained in:
parent
7d12fedaa3
commit
0b3900d31f
|
@ -295,7 +295,11 @@ openerp.web.ViewEditor = openerp.web.Widget.extend({
|
|||
}
|
||||
}
|
||||
}).start().open();
|
||||
this.edit_xml_dialog.$element.html(QWeb.render('view_editor', {'data': one_object['main_object']}));
|
||||
var no_property_att = [];
|
||||
_.each(_PROPERTIES, function(val, key) {
|
||||
if (! val.length) no_property_att.push(key);
|
||||
});
|
||||
this.edit_xml_dialog.$element.html(QWeb.render('view_editor', {'data': one_object['main_object'], 'no_properties': no_property_att}));
|
||||
this.edit_xml_dialog.$element.find("tr[id^='viewedit-']").click(function() {
|
||||
self.edit_xml_dialog.$element.find("tr[id^='viewedit-']").removeClass('ui-selected');
|
||||
$(this).addClass('ui-selected');
|
||||
|
|
|
@ -1293,7 +1293,8 @@
|
|||
<img id="side-remove" src="/web/static/src/img/icons/gtk-remove.png" style="cursor: pointer;"/>
|
||||
</td>
|
||||
<td width="20%">
|
||||
<img t-if="rec.att_list.length"
|
||||
|
||||
<img t-if="rec.att_list.length and !_.include(no_properties, rec.att_list[0])"
|
||||
id="side-edit" src="/web/static/src/img/icons/gtk-edit.png" style="cursor: pointer;"/>
|
||||
</td>
|
||||
<td width="20%">
|
||||
|
|
Loading…
Reference in New Issue