* Adjust my requiremt recall action hint. bug #49460.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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}¶m={$param}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
|
||||
set::footToolbar($footToolbar),
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user