Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -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 .= ' ';
|
||||
$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);
|
||||
}
|
||||
|
||||
@@ -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 ' ';
|
||||
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh, '', "class='refresh'");
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductLines($rootID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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")));
|
||||
}
|
||||
|
||||
|
||||
@@ -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¤tModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story¤tModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
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>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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¤tModuleID=0&branch=$story->branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story¤tModuleID=0&branch=$story->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
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>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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¤tModuleID=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¤tModuleID=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 .= ' ';
|
||||
$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);
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user