* [bug#64612,done,0.2h] fix bug.
This commit is contained in:
@@ -5,18 +5,18 @@
|
||||
window.getDeliverableFileActions = function(file, deliverable)
|
||||
{
|
||||
let actions = [];
|
||||
if(canDownload && typeof file.id != 'undefined') actions[0] = {icon: 'download', key: 'download', url: $.createLink('file', 'download', 'id=' + file.id), target: '_blank'};
|
||||
|
||||
if(!onlyShow)
|
||||
{
|
||||
actions[1] = {icon: 'edit', key: 'rename'};
|
||||
if(!isTemplate) actions[2] = {icon: 'trash', key: 'delete'};
|
||||
}
|
||||
|
||||
/* 可以预览的文件。 */
|
||||
if(['txt', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'mp4'].includes(file.extension) && canDownload && typeof file.id != 'undefined')
|
||||
{
|
||||
actions[3] = {icon: 'eye', key: 'view', url: $.createLink('file', 'download', `fileID=${file.id}&mouse=left`), 'data-toggle' : 'modal', 'data-size' : 'lg'};
|
||||
actions[0] = {icon: 'eye', key: 'view', url: $.createLink('file', 'download', `fileID=${file.id}&mouse=left`), 'data-toggle' : 'modal', 'data-size' : 'lg'};
|
||||
}
|
||||
|
||||
if(canDownload && typeof file.id != 'undefined') actions[1] = {icon: 'download', key: 'download', url: $.createLink('file', 'download', 'id=' + file.id), target: '_blank'};
|
||||
|
||||
if(!onlyShow)
|
||||
{
|
||||
actions[2] = {icon: 'edit', key: 'rename'};
|
||||
if(!isTemplate) actions[3] = {icon: 'trash', key: 'delete'};
|
||||
}
|
||||
|
||||
return actions;
|
||||
|
||||
Reference in New Issue
Block a user