* close modal in xuanxuan.
This commit is contained in:
@@ -190,6 +190,13 @@ class html extends baseHTML
|
||||
*/
|
||||
class js extends baseJS
|
||||
{
|
||||
static public function closeXXModal($window = 'self')
|
||||
{
|
||||
$js = "<script>";
|
||||
$js .= "$window.window.callXXCCommand('closeModal');";
|
||||
$js .= '</script>';
|
||||
return $js;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -294,6 +294,7 @@ class bug extends control
|
||||
$this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID");
|
||||
}
|
||||
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal());
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID));
|
||||
|
||||
$location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&type=byModule¶m={$this->post->module}");
|
||||
@@ -600,6 +601,7 @@ class bug extends control
|
||||
$actionID = $this->action->create('bug', $bugID, $action, $fileAction . $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal('parent'));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID));
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if($bug->toTask != 0)
|
||||
|
||||
@@ -310,6 +310,7 @@ class doc extends control
|
||||
$this->send(array('result' => 'fail', 'message' => sprintf($this->lang->duplicate, $this->lang->doc->common), 'locate' => $this->createLink('doc', 'view', "docID=$docID")));
|
||||
}
|
||||
$this->action->create('doc', $docID, 'Created');
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal());
|
||||
|
||||
$vars = "libID=$libID&browseType=byModule&moduleID={$this->post->module}&orderBy=id_desc&from=$this->from";
|
||||
$link = $this->createLink('doc', 'browse', $vars);
|
||||
@@ -385,6 +386,7 @@ class doc extends control
|
||||
$actionID = $this->action->create('doc', $docID, $action, $fileAction . $this->post->comment);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal());
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'view', "docID=$docID")));
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ class story extends control
|
||||
$this->action->create('todo', $todoID, 'finished', '', "STORY:$storyID");
|
||||
}
|
||||
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal());
|
||||
if($this->post->newStory)
|
||||
{
|
||||
$response['message'] = $this->lang->story->successSaved . $this->lang->story->newStory;
|
||||
@@ -424,6 +425,7 @@ class story extends control
|
||||
$actionID = $this->action->create('story', $storyID, $action, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal('parent'));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
die(array('status' => 'success', 'data' => $storyID));
|
||||
@@ -607,6 +609,7 @@ class story extends control
|
||||
$actionID = $this->action->create('story', $storyID, $action, $fileAction . $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal('parent'));
|
||||
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -751,6 +754,7 @@ class story extends control
|
||||
{
|
||||
$this->action->create('story', $storyID, 'Closed', '', ucfirst($this->post->closedReason));
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal('parent'));
|
||||
die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ class task extends control
|
||||
}
|
||||
|
||||
/* If link from no head then reload*/
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal());
|
||||
if(isonlybody())
|
||||
{
|
||||
$response['locate'] = 'reload';
|
||||
@@ -310,6 +311,7 @@ class task extends control
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal('parent'));
|
||||
if($task->fromBug != 0)
|
||||
{
|
||||
foreach($changes as $change)
|
||||
|
||||
@@ -562,6 +562,7 @@ class testcase extends control
|
||||
$actionID = $this->action->create('case', $caseID, $action, $fileAction . $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal('parent'));
|
||||
die(js::locate($this->createLink('testcase', 'view', "caseID=$caseID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -855,6 +855,8 @@ class testtask extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal());
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['locate'] = 'reload';
|
||||
$response['target'] = 'parent';
|
||||
|
||||
@@ -62,6 +62,7 @@ class todo extends control
|
||||
$this->send(array('result' => 'success', 'id' => $todoID, 'name' => $todo->name, 'pri' => $todo->pri, 'priName' => $this->lang->todo->priList[$todo->pri], 'time' => date(DT_DATE4, strtotime($todo->date)) . ' ' . $todo->begin));
|
||||
}
|
||||
|
||||
if($this->app->getViewType() == 'xhtml') die(js::closeXXModal('parent'));
|
||||
if(isonlybody()) die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent.parent'));
|
||||
die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user