* Fix my bug and my story click action bug.
This commit is contained in:
@@ -178,11 +178,12 @@ $config->my->task->actionList['close']['hint'] = $lang->task->close;
|
||||
$config->my->task->actionList['close']['url'] = array('module' => 'task', 'method' => 'close', 'params' => 'taskID={id}');
|
||||
$config->my->task->actionList['close']['data-toggle'] = 'modal';
|
||||
|
||||
$config->my->task->actionList['record']['icon'] = 'time';
|
||||
$config->my->task->actionList['record']['text'] = $lang->task->logEfforts;
|
||||
$config->my->task->actionList['record']['hint'] = $lang->task->logEfforts;
|
||||
$config->my->task->actionList['record']['url'] = array('module' => 'task', 'method' => 'recordEstimate', 'params' => 'taskID={id}');
|
||||
$config->my->task->actionList['record']['data-toggle'] = 'modal';
|
||||
$config->my->task->actionList['record']['icon'] = 'time';
|
||||
$config->my->task->actionList['record']['text'] = $lang->task->logEfforts;
|
||||
$config->my->task->actionList['record']['hint'] = $lang->task->logEfforts;
|
||||
$config->my->task->actionList['record']['url'] = array('module' => 'task', 'method' => 'recordWorkhour', 'params' => 'taskID={id}');
|
||||
$config->my->task->actionList['record']['data-toggle'] = 'modal';
|
||||
$config->my->task->actionList['record']['data-position'] = 'center';
|
||||
|
||||
$config->my->task->actionList['edit']['icon'] = 'edit';
|
||||
$config->my->task->actionList['edit']['text'] = $lang->task->edit;
|
||||
|
||||
@@ -56,7 +56,7 @@ $footToolbar = $canBatchAction ? array('items' => array
|
||||
$assignedToItems = array();
|
||||
foreach ($memberPairs as $key => $value)
|
||||
{
|
||||
$assignedToItems[] = array('text' => $value, 'class' => 'batch-btn ajax-btn', 'data-url' => createLink('bug', 'batchAssignTo', "assignedTo=$key&productID=0&type=my"));
|
||||
$assignedToItems[] = array('text' => $value, 'class' => 'batch-btn ajax-btn not-open-url', 'data-url' => createLink('bug', 'batchAssignTo', "assignedTo=$key&productID=0&type=my"));
|
||||
}
|
||||
|
||||
menu
|
||||
|
||||
@@ -26,10 +26,10 @@ $canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
$canBatchAction = $canBatchEdit || $canBatchReview || $canBatchAssignTo || $canBatchClose;
|
||||
$footToolbar = array('items' => array
|
||||
(
|
||||
$canBatchEdit ? array('text' => $lang->edit, 'className' => 'batch-btn', 'data-url' => helper::createLink('story', 'batchEdit', "productID=0&executionID=0&branch=0&storyType=story&from={$app->rawMethod}")) : null,
|
||||
$canBatchReview ? array('caret' => 'up', 'text' => $lang->story->review, 'url' => '#navReview', 'data-toggle' => 'dropdown', 'data-placement' => 'top-start') : null,
|
||||
$canBatchEdit ? array('text' => $lang->edit, 'className' => 'batch-btn', 'data-url' => helper::createLink('story', 'batchEdit', "productID=0&executionID=0&branch=0&storyType=story&from={$app->rawMethod}")) : null,
|
||||
$canBatchReview ? array('caret' => 'up', 'text' => $lang->story->review, 'url' => '#navReview', 'data-toggle' => 'dropdown', 'data-placement' => 'top-start') : null,
|
||||
$canBatchAssignTo ? array('caret' => 'up', 'text' => $lang->story->assignedTo, 'url' => '#navAssignedTo', 'data-toggle' => 'dropdown', 'data-placement' => 'top-start') : null,
|
||||
$canBatchClose ? array('text' => $lang->story->close, 'className' => 'batch-btn ajax-btn', 'data-url' => helper::createLink('story', 'batchClose', "productID=0&executionID=0&storyType=story&from={$app->rawMethod}")) : null,
|
||||
$canBatchClose ? array('text' => $lang->story->close, 'className' => 'batch-btn', 'data-url' => helper::createLink('story', 'batchClose', "productID=0&executionID=0&storyType=story&from={$app->rawMethod}")) : null,
|
||||
), 'btnProps' => array('size' => 'sm', 'btnType' => 'secondary'));
|
||||
|
||||
if($canBatchReview)
|
||||
@@ -38,7 +38,7 @@ if($canBatchReview)
|
||||
foreach($lang->story->reasonList as $key => $reason)
|
||||
{
|
||||
if(!$key || $key == 'subdivided' || $key == 'duplicate') continue;
|
||||
$rejectItems[] = array('text' => $reason, 'class' => 'batch-btn ajax-btn', 'data-url' => helper::createLink('story', 'batchReview', "result=reject&reason={$key}&storyType=story"));
|
||||
$rejectItems[] = array('text' => $reason, 'class' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('story', 'batchReview', "result=reject&reason={$key}&storyType=story"));
|
||||
}
|
||||
|
||||
$reviewItems = array();
|
||||
@@ -51,7 +51,7 @@ if($canBatchReview)
|
||||
}
|
||||
else
|
||||
{
|
||||
$reviewItems[] = array('text' => $result, 'class' => 'batch-btn ajax-btn', 'data-url' => helper::createLink('story', 'batchReview', "result={$key}&reason=&storyType=story"));
|
||||
$reviewItems[] = array('text' => $result, 'class' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('story', 'batchReview', "result={$key}&reason=&storyType=story"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ if($canBatchAssignTo)
|
||||
foreach($users as $key => $value)
|
||||
{
|
||||
if(empty($key) || $key == 'closed') continue;
|
||||
$assignedToItems[] = array('text' => $value, 'class' => 'batch-btn ajax-btn', 'data-url' => helper::createLink('story', 'batchAssignTo', "storyType=story&assignedTo={$key}"));
|
||||
$assignedToItems[] = array('text' => $value, 'class' => 'batch-btn ajax-btn not-open-url', 'data-url' => helper::createLink('story', 'batchAssignTo', "storyType=story&assignedTo={$key}"));
|
||||
}
|
||||
|
||||
menu
|
||||
|
||||
@@ -975,9 +975,10 @@ class story extends control
|
||||
$storyIdList = array_unique($storyIdList);
|
||||
$this->story->batchReview($storyIdList, $result, $reason);
|
||||
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
|
||||
echo js::reload('parent');
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('score')->create('ajax', 'batchOther');
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+12
-33
@@ -1007,46 +1007,25 @@ class testtask extends control
|
||||
* Delete a test task.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @param string $confirm yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($taskID, $confirm = 'no')
|
||||
public function delete($taskID)
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
return print(js::confirm($this->lang->testtask->confirmDelete, inlink('delete', "taskID=$taskID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$task = $this->testtask->getByID($taskID);
|
||||
$this->testtask->delete(TABLE_TESTTASK, $taskID);
|
||||
$task = $this->testtask->getByID($taskID);
|
||||
$this->testtask->delete(TABLE_TESTTASK, $taskID);
|
||||
|
||||
$message = $this->executeHooks($taskID);
|
||||
if($message) $response['message'] = $message;
|
||||
$message = $this->executeHooks($taskID);
|
||||
if($message) $response['message'] = $message;
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
if(dao::isError()) return $this->send(array('result' => 'success', 'message' => dao::getError()));
|
||||
|
||||
$browseList = $this->createLink('testtask', 'browse', "productID=$task->product");
|
||||
if($this->app->tab == 'execution') $browseList = $this->createLink('execution', 'testtask', "executionID=$task->execution");
|
||||
if($this->app->tab == 'project') $browseList = $this->createLink('project', 'testtask', "projectID=$task->project");
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
return print(js::locate($browseList, 'parent'));
|
||||
}
|
||||
$browseList = $this->createLink('testtask', 'browse', "productID=$task->product");
|
||||
if($this->app->tab == 'execution') $browseList = $this->createLink('execution', 'testtask', "executionID=$task->execution");
|
||||
if($this->app->tab == 'project') $browseList = $this->createLink('project', 'testtask', "projectID=$task->project");
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $this->app->methodName == 'view' ? $browseList : true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user