[ADD] Added Import link on top of listview
bzr revid: fme@openerp.com-20120509154941-5nr1pstkcuayt0qm
This commit is contained in:
parent
2f3bc2c359
commit
8a1015b610
|
@ -264,7 +264,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
self.reload_content();
|
||||
});
|
||||
|
||||
// Add button
|
||||
// Add button and Import link
|
||||
if (!this.$buttons) {
|
||||
this.$buttons = $(QWeb.render("ListView.buttons", {'widget':self}));
|
||||
if (this.options.$buttons) {
|
||||
|
@ -275,6 +275,10 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
this.$buttons.find('.oe_list_add')
|
||||
.click(this.proxy('do_add_record'))
|
||||
.prop('disabled', grouped && this.options.editable);
|
||||
this.$buttons.on('click', '.oe_list_button_import', function() {
|
||||
self.on_sidebar_import();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// Pager
|
||||
|
|
|
@ -653,6 +653,7 @@
|
|||
<button type="button" class="oe_button oe_list_add oe_form_button_hi" t-if="widget.options.addable">
|
||||
<t t-esc="widget.options.addable"/>
|
||||
</button>
|
||||
<span class="oe_fade">or</span> <a href="#" class="oe_bold oe_list_button_import">Import</a>
|
||||
</t>
|
||||
</div>
|
||||
<t t-name="ListView.pager">
|
||||
|
|
Loading…
Reference in New Issue