* finish task #6760.
This commit is contained in:
+12
-3
@@ -299,8 +299,15 @@ class bug extends control
|
||||
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID));
|
||||
|
||||
setcookie('bugModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
$location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&browseType=unclosed¶m=0&orderBy=id_desc");
|
||||
if(isset($output['projectID']))
|
||||
{
|
||||
$location = $this->createLink('project', 'bug', "projectID={$output['projectID']}");
|
||||
}
|
||||
else
|
||||
{
|
||||
setcookie('bugModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
$location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&browseType=unclosed¶m=0&orderBy=id_desc");
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') $location = $this->createLink('bug', 'view', "bugID=$bugID");
|
||||
$response['locate'] = $location;
|
||||
$this->send($response);
|
||||
@@ -462,7 +469,9 @@ class bug extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$actions = $this->bug->batchCreate($productID, $branch);
|
||||
die(js::locate($this->session->bugList, 'parent'));
|
||||
|
||||
setcookie('bugModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
die(js::locate($this->createLink('bug', 'browse', "productID={$productID}&branch=$branch&browseType=unclosed¶m=0&orderBy=id_desc"), 'parent'));
|
||||
}
|
||||
|
||||
/* Get product, then set menu. */
|
||||
|
||||
@@ -318,7 +318,7 @@ class doc extends control
|
||||
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
|
||||
$this->action->create('doc', $docID, 'Created', $fileAction);
|
||||
|
||||
$vars = "libID=$libID&browseType=byModule&moduleID={$this->post->module}&orderBy=id_desc&from=$this->from";
|
||||
$vars = "libID={$this->post->lib}&browseType=byModule&moduleID={$this->post->module}&orderBy=id_desc&from=$this->from";
|
||||
$link = $this->createLink('doc', 'browse', $vars);
|
||||
if($this->app->getViewType() == 'xhtml') $link = $this->createLink('doc', 'view', "docID=$docID");
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
|
||||
|
||||
@@ -123,7 +123,6 @@ class story extends control
|
||||
}
|
||||
|
||||
$moduleID = $this->post->module ? $this->post->module : 0;
|
||||
$response['locate'] = $this->createLink('project', 'story', "projectID=$projectID&orderBy=&browseType=byModule&moduleID=0");
|
||||
if($projectID == 0)
|
||||
{
|
||||
setcookie('storyModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
@@ -131,6 +130,11 @@ class story extends control
|
||||
$branchID = $this->post->branch ? $this->post->branch : $branch;
|
||||
$response['locate'] = $this->createLink('product', 'browse', "productID=$productID&branch=$branchID&browseType=unclosed¶m=0&orderBy=id_desc");
|
||||
}
|
||||
else
|
||||
{
|
||||
setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, true);
|
||||
$response['locate'] = $this->createLink('project', 'story', "projectID=$projectID&orderBy=id_desc&browseType=unclosed");
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') $response['locate'] = $this->createLink('story', 'view', "storyID=$storyID");
|
||||
$this->send($response);
|
||||
}
|
||||
@@ -307,8 +311,16 @@ class story extends control
|
||||
die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
setcookie('storyModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
die(js::locate($this->createLink('product', 'browse', "productID=$productID&branch=$branch"), 'parent'));
|
||||
if($project)
|
||||
{
|
||||
setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, false);
|
||||
die(js::locate($this->createLink('project', 'story', "projectID=$project&orderBy=id_desc&browseType=unclosed"), 'parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
setcookie('storyModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
die(js::locate($this->createLink('product', 'browse', "productID=$productID&branch=$branch"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* Set products and module. */
|
||||
|
||||
@@ -376,7 +376,9 @@ class testcase extends control
|
||||
$caseID = $this->testcase->batchCreate($productID, $branch, $storyID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=byModule¶m=$moduleID"), 'parent'));
|
||||
|
||||
setcookie('caseModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
die(js::locate($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=all¶m=0&orderBy=id_desc"), 'parent'));
|
||||
}
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user