* [ui] add language data to files table.

This commit is contained in:
sunhao
2024-11-01 14:30:59 +08:00
committed by 谢杞钰
parent 54ad56010d
commit 96fc7e991a
2 changed files with 23 additions and 1 deletions
+9 -1
View File
@@ -969,9 +969,9 @@ const commands =
*/
function getTableOptions(options, info)
{
const lang = getLang();
if(info.type === 'doc-list')
{
const lang = getLang();
const tableCols = lang.tableCols;
const canModify = canModifySpace();
options.cols.forEach(col =>
@@ -993,6 +993,14 @@ function getTableOptions(options, info)
$.cookie.set('checkedItem', checkedList, {expires:config.cookieLife, path:config.webRoot});
}
}
if(info.type === 'file-list')
{
const tableCols = lang.fileTableCols;
options.cols.forEach(col =>
{
if(typeof tableCols[col.name] === 'string') col.title = tableCols[col.name];
});
}
return options;
}
+14
View File
@@ -94,6 +94,20 @@ $langData->tableCols['editedBy'] = $lang->doc->editedBy;
$langData->tableCols['editedDate'] = $lang->doc->editedDate;
$langData->tableCols['actions'] = $lang->actions;
/**
* 通过语言项定义附件表格列显示名称。
* Define the files table columns for doc app.
*/
$langData->fileTableCols = array();
$langData->fileTableCols['id'] = $lang->idAB;
$langData->fileTableCols['title'] = $lang->doc->fileTitle;
$langData->fileTableCols['objectName'] = $lang->doc->source;
$langData->fileTableCols['extension'] = $lang->doc->extension;
$langData->fileTableCols['size'] = $lang->doc->size;
$langData->fileTableCols['addedBy'] = $lang->doc->addedBy;
$langData->fileTableCols['addedDate'] = $lang->doc->addedDate;
$langData->fileTableCols['actions'] = $lang->actions;
/**
* 定义文档应用接口链接。
* Define the fetcher links for doc app.