* Finish task #5294.

This commit is contained in:
Yagami
2019-02-22 15:01:32 +08:00
parent 3e857beeae
commit 466667de7e
6 changed files with 15 additions and 4 deletions

View File

@@ -41,3 +41,9 @@ $(function()
setTimeout($.resetToolbarPosition, 50);
});
})
function deleteFile(fileID)
{
if(!fileID) return;
hiddenwin.location.href =createLink('file', 'delete', 'fileID=' + fileID);
}

View File

@@ -78,6 +78,7 @@ $lang->doc->addType = 'Add';
$lang->doc->childType = 'Child';
$lang->doc->collect = 'Add Favorites';
$lang->doc->cancelCollection = 'Remove Favorites';
$lang->doc->deleteFile = 'Detele File'
$lang->doc->libName = 'Name';
$lang->doc->libType = 'Category';

View File

@@ -78,6 +78,7 @@ $lang->doc->addType = '增加分类';
$lang->doc->childType = '子分类';
$lang->doc->collect = '收藏';
$lang->doc->cancelCollection = '取消收藏';
$lang->doc->deleteFile = '删除附件';
$lang->doc->libName = '文档库名称';
$lang->doc->libType = '文档库类型';

View File

@@ -44,7 +44,6 @@
<th><?php echo $lang->doclib->control;?></th>
<td colspan='2'>
<?php echo html::radio('acl', $lang->doc->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")'")?>
<span class='text-warning' id='noticeAcl'><?php echo $lang->doc->noticeAcl['lib']['product']['open'];?></span>
</td>
</tr>
</tr>
@@ -61,6 +60,10 @@
</div>
</td>
</tr>
<tr>
<th></th>
<td colspan='2'><span class='text-warning' id='noticeAcl'><?php echo $lang->doc->noticeAcl['lib']['product']['open'];?></span></td>
</tr>
<tr>
<td class='text-center form-actions' colspan='3'><?php echo html::submitButton();?></td>
</tr>

View File

@@ -40,7 +40,7 @@
<td class="c-name"><?php echo $doc->title;?></td>
<td class="c-num text-right"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo $doc->editedDate == '0000-00-00 00:00:00' ? formatTime($doc->addedDate, 'm-d H:i') : formatTime($doc->editedDate, 'm-d H:i');?></td>
<td class="c-datetime"><?php echo $doc->editedDate == '0000-00-00 00:00:00' ? formatTime($doc->addedDate, 'y-m-d') : formatTime($doc->editedDate, 'y-m-d');?></td>
</tr>
<?php endforeach;?>
</tbody>
@@ -174,7 +174,7 @@
<tr data-url="<?php echo $this->createLink('doc', 'view', "docID={$doc->id}");?>">
<td class="c-name"><?php echo $doc->title;?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate) ? formatTime($doc->editedDate, 'm-d H:i') : formatTime($doc->addedDate, 'm-d H:i');?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate) ? formatTime($doc->editedDate, 'y-m-d') : formatTime($doc->addedDate, 'y-m-d');?></td>
</tr>
<?php endforeach;?>
</tbody>

View File

@@ -117,7 +117,7 @@ js::set('sysurl', common::getSysUrl());
<img onload="setImageSize(this, 0)" src="<?php echo $this->createLink('file', 'read', "fileID={$file->id}");?>" alt="<?php echo $file->title?>">
</a>
<span class='right-icon'>
<?php if(common::hasPriv('file', 'delete')) echo html::a('###', "<i class='icon icon-trash'></i>", '', "class='btn-icon' onclick='deleteFile($file->id)' title='$lang->delete'");?>
<?php if(common::hasPriv('file', 'delete')) echo html::a('###', "<i class='icon icon-trash'></i>" . ' ' . $lang->doc->deleteFile, '', "class='btn-icon' onclick='deleteFile($file->id)'");?>
</span>
</div>
<?php unset($doc->files[$file->id]);?>