This commit is contained in:
Catouse
2018-07-09 17:30:10 +08:00
9 changed files with 33 additions and 22 deletions
+6 -5
View File
@@ -558,11 +558,12 @@ class product extends control
$output = html::select($field, $plans, $planID, "class='form-control chosen'");
if(count($plans) == 1 and $needCreate)
{
$output .= "<span class='input-group-addon'>";
$output .= html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), $this->lang->productplan->create, '_blank');
$output .= '&nbsp; ';
$output .= html::a("javascript:loadProductPlans($productID)", $this->lang->refresh);
$output .= '</span>';
$output .= "<div class='input-group-btn'>";
$output .= html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch", '', true), "<i class='icon icon-plus'></i>", '', "class='btn btn-icon' data-toggle='modal' data-type='iframe' data-width='95%' title='{$this->lang->productplan->create}'");
$output .= '</div>';
$output .= "<div class='input-group-btn'>";
$output .= html::a("#", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon refresh' data-toggle='tooltip' title='{$this->lang->refresh}' onclick='loadProductPlans($productID)'");
$output .= '</div>';
}
die($output);
}
+2 -2
View File
@@ -38,9 +38,9 @@
if(count($lines) == 1)
{
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line"), $lang->tree->manageLine, '_blank');
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line", '', true), $lang->tree->manageLine, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo '&nbsp; ';
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh, '', "class='refresh'");
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductLines($rootID)'");
echo '</span>';
}
?>
+1
View File
@@ -49,6 +49,7 @@ class productplan extends control
$planID = $this->productplan->create();
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('productplan', $planID, 'opened');
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.$('a.refresh').click()}"));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('productplan', 'browse', "productID=$product&branch=$branch")));
}
+5 -5
View File
@@ -45,9 +45,9 @@
if(count($moduleOptionMenu) == 1)
{
echo "<div class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story&currentModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story&currentModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo '&nbsp; ';
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
echo '</div>';
}
?>
@@ -60,13 +60,13 @@
<div class='input-group' id='planIdBox'>
<?php
echo html::select('plan', $plans, $planID, "class='form-control chosen'");
if(count($plans) != 1)
if(count($plans) == 1)
{
echo "<div class='input-group-btn'>";
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), "<i class='icon icon-plus'></i>", '_blank', "class='btn btn-icon' data-toggle='tooltip' title='{$lang->productplan->create}'");
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch", '', true), "<i class='icon icon-plus'></i>", '', "class='btn btn-icon' data-toggle='modal' data-type='iframe' data-width='95%' title='{$lang->productplan->create}'");
echo '</div>';
echo "<div class='input-group-btn'>";
echo html::a("javascript:loadProductPlans($productID)", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon' data-toggle='tooltip' title='{$lang->refresh}'");
echo html::a("#", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon refresh' data-toggle='tooltip' title='{$lang->refresh}' onclick='loadProductPlans($productID)'");
echo '</div>';
}
?>
+4 -4
View File
@@ -84,9 +84,9 @@
if(count($moduleOptionMenu) == 1)
{
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story&currentModuleID=0&branch=$story->branch"), $lang->tree->manage, '_blank');
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story&currentModuleID=0&branch=$story->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo '&nbsp; ';
echo html::a("javascript:loadProductModules($story->product)", $lang->refresh);
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($story->product)'");
echo '</span>';
}
?>
@@ -102,8 +102,8 @@
if(count($plans) == 1)
{
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('productplan', 'create', "productID=$story->product&branch=$story->branch"), $lang->productplan->create, '_blank');
echo html::a("javascript:loadProductPlans($story->product)", $lang->refresh);
echo html::a($this->createLink('productplan', 'create', "productID=$story->product&branch=$story->branch", '', true), $lang->productplan->create, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductPlans($story->product)'");
echo '</span>';
}
?>
+6 -3
View File
@@ -508,9 +508,12 @@ class taskModel extends model
if($currentTask->left == 0 && $oldTask->left != 0 && $currentTask->consumed != 0)
{
$currentTask->status = 'done';
$currentTask->finishedBy = $this->app->user->account;
$currentTask->finishedDate = $now;
if($oldTask->assignedTo == $teams[count($teams) - 1] && $team[$oldTask->assignedTo]->left == 0 && $team[$oldTask->assignedTo]->consumed != 0)
{
$currentTask->status = 'done';
$currentTask->finishedBy = $this->app->user->account;
$currentTask->finishedDate = $now;
}
}
return $currentTask;
+5 -2
View File
@@ -296,6 +296,9 @@ class tree extends control
if(!empty($_POST))
{
$this->tree->manageChild($rootID, $viewType);
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.$('a.refresh').click()}"));
die(js::reload('parent'));
}
}
@@ -357,9 +360,9 @@ class tree extends control
if(count($optionMenu) == 1 and $needManage)
{
$output .= "<span class='input-group-addon'>";
$output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType&currentModuleID=0&branch=$branch"), $viewType == 'line' ? $this->lang->tree->manageLine : $this->lang->tree->manage, '_blank');
$output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType&currentModuleID=0&branch=$branch", '', true), $viewType == 'line' ? $this->lang->tree->manageLine : $this->lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
$output .= '&nbsp; ';
$output .= $viewType == 'line' ? html::a("javascript:loadProductLines($rootID)", $this->lang->refresh) : html::a("javascript:loadProductModules($rootID)", $this->lang->refresh);
$output .= $viewType == 'line' ? html::a("#", $this->lang->refresh, '', "class='refresh' onclick='loadProductLines($rootID)'") : html::a("#", $this->lang->refresh, '', "class='refresh' onclick='loadProductModules($rootID)'");
$output .= '</span>';
}
die($output);
+2
View File
@@ -17,3 +17,5 @@
#modulesTree li > .list-toggle {top: 0}
#childrenForm table tr > td.text-middle span{display:block; float:left;}
.body-modal #mainMenu{display: none;}
+2 -1
View File
@@ -22,7 +22,8 @@
</a>
<div class="divider"></div>
<div class="page-title">
<span class="text" title='<?php echo $root->name;?>'>
<?php $rootName = $viewType == 'line' ? '' : $root->name;?>
<span class="text" title='<?php echo $rootName;?>'>
<?php
if($viewType == 'doc')
{