[FIX] restore attachement, part2 very beginning of add
bzr revid: al@openerp.com-20120417014323-vp1cn1k5en5ogmdq
This commit is contained in:
@@ -757,7 +757,6 @@ session.web.Sidebar = session.web.Widget.extend({
|
||||
var section = $(this).data('section');
|
||||
var index = $(this).data('index');
|
||||
$(this).closest('ul').hide();
|
||||
console.log('click item',section,index);
|
||||
var item = self.items[section][index];
|
||||
if (item.callback) {
|
||||
item.callback.apply(self, [item]);
|
||||
@@ -876,8 +875,12 @@ session.web.Sidebar = session.web.Widget.extend({
|
||||
a.url = prefix + a.id + '&t=' + (new Date().getTime());
|
||||
}
|
||||
});
|
||||
this.items['files'] = attachments;
|
||||
this.redraw();
|
||||
attachments.push( { label: _t("Add..."), callback: self.on_attachment_add } );
|
||||
self.items['files'] = attachments;
|
||||
self.redraw();
|
||||
},
|
||||
on_attachment_add: function(e) {
|
||||
this.$element.find('.oe_sidebar_add').show();
|
||||
},
|
||||
on_attachment_changed: function(e) {
|
||||
return;
|
||||
|
||||
@@ -519,6 +519,9 @@
|
||||
<t t-raw="item.label"/>
|
||||
</a>
|
||||
</li>
|
||||
<li t-if="section.name == 'files'" class="oe_sidebar_add" style="display:none;">
|
||||
Input type file stuff
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user