Skip to content

Commit

Permalink
feature: artifact support, handle no artifact attached in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi committed Oct 24, 2018
1 parent 8c07e8e commit 9b76e49
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions src/ProcessManagerBundle/Resources/public/pimcore/js/processes.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,29 @@ pimcore.plugin.processmanager.processes = Class.create({
{
text : t('processmanager_artifact_download'),
xtype:'actioncolumn',
width:50,
items: [
{
iconCls : 'pimcore_icon_download',
tooltip: t('processmanager_artifact_download'),
handler: function(grid, rowIndex) {
var id = grid.getStore().getAt(rowIndex).get('artifact');
pimcore.helpers.download("/admin/asset/download?id=" + id)
}.bind(this)
width: 50,
renderer: function(value, metadata, record) {
var artifact = record.data.artifact;
if (!artifact) {
return;
}
]

var id = Ext.id();
Ext.defer(function () {
if (Ext.get(id)) {
new Ext.button.Button({
renderTo: id,
iconCls: 'pimcore_icon_download',
cls: 'processmanager_artifact_download',
handler: function () {
pimcore.helpers.download("/admin/asset/download?id=" + artifact)
}
});
}
}, 50);

return Ext.String.format('<span id="{0}"></span>', id);
}
},
{
xtype:'actioncolumn',
Expand Down

0 comments on commit 9b76e49

Please sign in to comment.