Browse Source

web_export_view: fix JS selectors for v9

pull/461/head
Simone Orsi 9 years ago
parent
commit
db311ca1fd
  1. 7
      web_export_view/static/src/js/web_export_view.js

7
web_export_view/static/src/js/web_export_view.js

@ -62,14 +62,12 @@ Sidebar.include({
export_columns_names.push(this.string);
}
});
var rows = view.$el.find('.oe_list_content > tbody > tr');
var rows = view.$el.find('.o_list_view > tbody > tr[data-id]');
var export_rows = [];
$.each(rows, function () {
var $row = $(this);
// find only rows with data
if ($row.attr('data-id')) {
var export_row = [];
var checked = $row.find('th input[type=checkbox]').is(':checked');
var checked = $row.find('.o_list_record_selector input[type=checkbox]').is(':checked');
if (children && checked === true) {
$.each(export_columns_keys, function () {
var cell = $row.find('td[data-field="' + this + '"]').get(0);
@ -101,7 +99,6 @@ Sidebar.include({
});
export_rows.push(export_row);
}
}
});
$.blockUI();
view.session.get_file({

Loading…
Cancel
Save