*
This commit is contained in:
@@ -2502,6 +2502,13 @@ class execution extends control
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
//public function deleteBug($bugID, $confirm = 'no')
|
||||
//{
|
||||
// if($confirm == 'no')
|
||||
// {
|
||||
// return print();
|
||||
// }
|
||||
//}
|
||||
|
||||
/**
|
||||
* Manage products.
|
||||
|
||||
@@ -548,7 +548,7 @@ function renderBugItem(item, $item, col)
|
||||
if(scaleSize <= 1)
|
||||
{
|
||||
var $actions = $item.find('.actions');
|
||||
if(!$actions.length && (priv.canEditBug || priv.canResolveBug || priv.canConfirmBug || priv.canCopyBug || priv.canToStoryBug))
|
||||
if(!$actions.length && (priv.canEditBug || priv.canResolveBug || priv.canConfirmBug || priv.canCopyBug || priv.canToStoryBug || priv.canDeleteBug))
|
||||
{
|
||||
$actions = $([
|
||||
'<div class="actions">',
|
||||
@@ -1089,6 +1089,7 @@ function createTaskMenu(options)
|
||||
if(priv.canActivateTask && (task.$col.type == 'developed' || task.$col.type == 'canceled' || task.$col.type == 'closed')) items.push({label: executionLang.activate, icon: 'magic', url: createLink('task', 'activate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCreateTask) items.push({label: taskLang.copy, icon: 'copy', url: createLink('task', 'create', 'executionID=' + executionID + '&storyID=' + '0' + '&moduleID=' + '0' + '&taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCancelTask && (task.$col.type == 'wait' || task.$col.type == 'developing' || task.$col.type == 'pause')) items.push({label: taskLang.cancel, icon: 'cancel', url: createLink('task', 'cancel', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canDeleteTask) items.push({label: taskLang.delete, icon: 'trash', url: createLink('task', 'delete', 'bugID=' + bug.id, '', 'true'), attrs: {'target': 'hiddenwin'}});
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -1108,6 +1109,7 @@ function createBugMenu(options)
|
||||
if(priv.canCopyBug) items.push({label: bugLang.copy, icon: 'copy', url: createLink('bug', 'create', 'productID=' + productID + '&branch=' + '' + '&extras=bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canToStoryBug && (bug.$col.type != 'closed')) items.push({label: bugLang.toStory, icon: 'lightbulb', url: createLink('story', 'create', 'product=' + productID + '&branch=' + '0' + '&module=' + '0' + '&story=' + '0' + '&execution=' + '0' + '&bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canActivateBug && (bug.$col.type == 'fixed') || bug.$col.type == 'testing' || bug.$col.type == 'tested' || bug.$col.type == 'closed') items.push({label: bugLang.activate, icon: 'magic', url: createLink('bug', 'activate', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canDeleteBug) items.push({label: bugLang.delete, icon: 'trash', url: createLink('bug', 'delete', 'bugID=' + bug.id, '', 'true'), attrs: {'target': 'hiddenwin'}});
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ js::set('priv',
|
||||
'canResolveBug' => common::hasPriv('bug', 'resolve'),
|
||||
'canCopyBug' => common::hasPriv('bug', 'create'),
|
||||
'canEditBug' => common::hasPriv('bug', 'edit'),
|
||||
'canDeleteBug' => common::hasPriv('bug', 'delete'),
|
||||
'canActivateBug' => common::hasPriv('bug', 'activate'),
|
||||
'canAssignTask' => common::hasPriv('task', 'assignto'),
|
||||
'canFinishTask' => common::hasPriv('task', 'finish'),
|
||||
@@ -96,10 +97,12 @@ js::set('priv',
|
||||
'canStartTask' => common::hasPriv('task', 'start'),
|
||||
'canRestartTask' => common::hasPriv('task', 'restart'),
|
||||
'canEditTask' => common::hasPriv('task', 'edit'),
|
||||
'canDeleteTask' => common::hasPriv('task', 'delete'),
|
||||
'canRecordEstimateTask' => common::hasPriv('task', 'recordEstimate'),
|
||||
'canToStoryBug' => common::hasPriv('story', 'create'),
|
||||
'canAssignStory' => common::hasPriv('story', 'assignto'),
|
||||
'canEditStory' => common::hasPriv('story', 'edit'),
|
||||
'canDeleteStory' => common::hasPriv('story', 'delete'),
|
||||
'canChangeStory' => common::hasPriv('story', 'change'),
|
||||
'canUnlinkStory' => common::hasPriv('execution', 'unlinkStory'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user