* Adjust my requiremt recall action hint. bug #49460.

This commit is contained in:
wangyuting
2024-05-17 16:21:37 +08:00
parent 8019dffb3e
commit a724fc384c
3 changed files with 26 additions and 1 deletions
+21
View File
@@ -17,3 +17,24 @@ $(document).off('click', '.batch-btn').on('click', '.batch-btn', function()
postAndLoadPage(url, form);
}
});
/**
* 根据状态变更操作按钮的语言项。
* Change recall btn lang of object status.
*
* @param object result
* @param object info
* @access public
* @return object
*/
window.onRenderCell = function(result, {row, col})
{
if(col.name == 'actions')
{
for(index in row.data.actions)
{
if(row.data.actions[index].name == 'recall') row.data.actions[index].hint = (row.data.status == 'changing' ? recallChange : recall
}
}
return result;
}
+4
View File
@@ -12,6 +12,9 @@ namespace zin;
include 'header.html.php';
jsVar('recall', $lang->story->recall);
jsVar('recallChange', $lang->story->recallChange);
featureBar
(
set::current($type),
@@ -79,6 +82,7 @@ dtable
set::userMap($users),
set::fixedLeftWidth('44%'),
set::checkable($canBatchAction ? true : false),
set::onRenderCell(jsRaw('window.renderCell')),
set::orderBy($orderBy),
set::sortLink(createLink('my', $app->rawMethod, "mode={$mode}&type={$type}&param={$param}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
set::footToolbar($footToolbar),
+1 -1
View File
@@ -3233,7 +3233,7 @@ class storyModel extends model
}
if($action == 'recallchange') return $story->status == 'changing';
if($action == 'recall') return $story->status == 'reviewing';
if($action == 'recall') return $story->status == 'reviewing' || $story->status == 'changing';
if($action == 'close') return $story->status != 'closed';
if($action == 'activate') return $story->status == 'closed';
if($action == 'assignto') return $story->status != 'closed';