Skip to content

Commit

Permalink
256# tmp fix for xlsx export #256
Browse files Browse the repository at this point in the history
  • Loading branch information
jtwogw committed Mar 19, 2024
1 parent c2e5969 commit 2ed21e8
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/Resources/public/js/searchConfig/resultPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ pimcore.bundle.advancedObjectSearch.searchConfig.resultPanel = Class.create(pimc
var jobs = [];

var fields = this.getGridConfig().columns;
var fieldKeys = Object.keys(fields);
var fieldKeys = this.fieldsKeys2(fields); // Object.keys(fields);


//create the ids array which contains chosen rows to export
var ids = [];
Expand Down Expand Up @@ -509,7 +510,8 @@ pimcore.bundle.advancedObjectSearch.searchConfig.resultPanel = Class.create(pimc
var rdata = Ext.decode(response.responseText);

var fields = this.getGridConfig().columns;
var fieldKeys = Object.keys(fields);
var fieldKeys = this.fieldsKeys2(fields); // Object.keys(fields);


if (rdata.success && rdata.jobs) {
this.exportProcess(rdata.jobs, rdata.fileHandle, fieldKeys, true, settings, exportType);
Expand All @@ -518,6 +520,26 @@ pimcore.bundle.advancedObjectSearch.searchConfig.resultPanel = Class.create(pimc
}.bind(this)
});
},

//temp fix

fieldsKeys2: function(fields )
{
var fieldKeys = Object.keys(fields);
var fieldKeys2 = [];
for(var i = 0; i < fieldKeys.length; i++) {
var field = fields[fieldKeys[i]];
if(!field.hidden) {
var fc = {
key: fieldKeys[i],
label: field.fieldConfig.label,

};
fieldKeys2.push(fc);
}
}
return JSON.stringify(fieldKeys2);
},

openColumnConfig: function () {
var fields = this.getGridConfig().columns;
Expand Down

0 comments on commit 2ed21e8

Please sign in to comment.