This commit is contained in:
liugang
2018-05-14 16:49:24 +08:00
9 changed files with 250 additions and 229 deletions
+6 -6
View File
@@ -525,7 +525,7 @@ class testtask extends control
if(!empty($_POST))
{
$changes = $this->testtask->activate($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -533,8 +533,8 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isonlybody()) die(js::reload('parent.parent'));
die(js::locate($this->createLink('testtask', 'view', "taskID=$taskID"), 'parent'));
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID")));
}
/* Get task info. */
@@ -609,7 +609,7 @@ class testtask extends control
if(!empty($_POST))
{
$changes = $this->testtask->block($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -617,8 +617,8 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isonlybody()) die(js::reload('parent.parent'));
die(js::locate($this->createLink('testtask', 'view', "taskID=$taskID"), 'parent'));
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID")));
}
/* Get task info. */
+1 -1
View File
@@ -1,6 +1,6 @@
$(document).ready(function()
{
$('#startForm, #closeForm').ajaxForm(
$('#startForm, #closeForm, #activateForm, #blockForm').ajaxForm(
{
finish:function(response)
{
+21 -24
View File
@@ -12,31 +12,28 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div class='container mw-800px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['testtask']);?> <strong><?php echo $testtask->id;?></strong></span>
<strong><?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?></strong>
<small class='text-success'> <?php echo $lang->testtask->activate;?> <?php echo html::icon($lang->icons['start']);?></small>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $testtask->id;?></span>
<?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
<small><?php echo $lang->arrow . $lang->testtask->activate;?></small>
</div>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='text-left'><?php echo $lang->comment;?></th>
</tr>
<tr>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td class='text-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>
</table>
</form>
<div class='main'>
<?php include '../../common/view/action.html.php';?>
<form class='load-indicator main-form' method='post' id='activateForm'>
<table class='table table-form'>
<tr>
<th class='w-45px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+21 -22
View File
@@ -13,30 +13,29 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div class='container mw-800px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['testtask']);?> <strong><?php echo $testtask->id;?></strong></span>
<strong><?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?></strong>
<small class='text-success'> <?php echo $lang->testtask->block;?> <?php echo html::icon($lang->icons['pause']);?></small>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $testtask->id;?></span>
<?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
<small> <?php echo $lang->arrow . $lang->testtask->block;?></small>
</h2>
</div>
</div>
<form class='load-indicator main-form' method='post' id='blockForm'>
<table class='table table-form'>
<tr>
<th class='w-45px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>
</table>
</form>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='text-left'><?php echo $lang->comment;?></th>
</tr>
<tr>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td class='text-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>
</table>
</form>
<div class='main'>
<?php include '../../common/view/action.html.php';?>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>