Browse Source

fix

pull/64/head
Mathias Markl 7 years ago
parent
commit
e80cd77314
  1. 3
      muk_web_export_attachment/static/src/js/sidebar_export.js

3
muk_web_export_attachment/static/src/js/sidebar_export.js

@ -33,7 +33,6 @@ Sidebar.include({
var export_action = this._rpc({ var export_action = this._rpc({
route: '/web/attachment/export_action', route: '/web/attachment/export_action',
}).then(function (result) { }).then(function (result) {
console.log(result);
self.export_action = result; self.export_action = result;
}); });
var export_formats = this._rpc({ var export_formats = this._rpc({
@ -48,7 +47,7 @@ Sidebar.include({
var res = this._super.apply(this, arguments); var res = this._super.apply(this, arguments);
var exportable = false; var exportable = false;
_.each(this.items.files ,function (attachment) { _.each(this.items.files ,function (attachment) {
if(self.export_formats.includes((/(?:\.([^.]+))?$/).exec(attachment.name)[1])) {
if(self.export_formats.includes((/(?:\.([^.]+))?$/).exec(attachment.name.replace(/\s\(\d+\)$/, ""))[1])) {
attachment.exportable = 'exportable'; attachment.exportable = 'exportable';
exportable = true; exportable = true;
} else { } else {

Loading…
Cancel
Save