Merge branch 'zentaopms_9.8' of https://github.com/easysoft/zentaopms into zentaopms_9.8

This commit is contained in:
daitingting
2018-03-29 16:58:25 +08:00
12 changed files with 51 additions and 13 deletions
-1
View File
@@ -922,7 +922,6 @@ class commonModel extends model
$queryCondition = $this->session->$queryCondition;
$orderBy = $type . 'OrderBy';
$orderBy = $this->session->$orderBy;
$orderBy = str_replace('`left`', 'left', $orderBy); // process the `left` to left.
if(empty($queryCondition) or $this->session->$typeOnlyCondition)
{
+1 -1
View File
@@ -105,7 +105,7 @@
}
else
{
echo html::commonButton("<i class='icon-ok'></i> " . $lang->extension->installed, "disabled='disabled'", 'text-success');
echo html::commonButton("<i class='icon-ok'></i> " . $lang->extension->installed, "disabled='disabled'", 'btn text-success');
}
}
else
+2 -1
View File
@@ -52,7 +52,8 @@
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-date'> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<?php $style = $this->app->clientLang == 'en' ? "style='width:80px'" : '';?>
<th class='w-pri' <?php echo $style;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
<th class='w-hour'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->todo->endAB);?></th>
+3 -1
View File
@@ -229,7 +229,8 @@ class product extends control
die(js::locate($this->createLink($this->moduleName, 'browse', "productID=$productID"), 'parent'));
}
$this->product->setMenu($this->products, key($this->products));
$rootID = key($this->products);
$this->product->setMenu($this->products, $rootID);
$this->view->title = $this->lang->product->create;
$this->view->position[] = $this->view->title;
@@ -238,6 +239,7 @@ class product extends control
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst|noclosed');
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst|noclosed');
$this->view->lines = array('') + $this->loadModel('tree')->getLinePairs();
$this->view->rootID = $rootID;
unset($this->lang->product->typeList['']);
$this->display();
+15
View File
@@ -0,0 +1,15 @@
/**
* Load product Lines.
*
* @param $rootID
* @access public
* @return void
*/
function loadProductLines(rootID)
{
link = createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + rootID + '&viewtype=line' + '&branch=0' + '&rootModuleID=0&returnType=html&fieldID=&needManage=true');
$('#lineIdBox').load(link, function()
{
$(this).find('select').chosen(defaultChosenOptions)
});
}
+12 -2
View File
@@ -32,8 +32,18 @@
</tr>
<tr>
<th><?php echo $lang->product->line;?></th>
<td><?php echo html::select('line', $lines, '', "class='form-control chosen'");?></td>
<td><?php if(!$lines) common::printLink('tree', 'browse', "rootID=&view=line", $lang->tree->manageLine);?></td>
<td>
<div class='input-group' id='lineIdBox'>
<?php
echo html::select('line', $lines, '', "class='form-control chosen'");
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line"), $lang->tree->manageLine, '_blank');
echo '&nbsp; ';
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh);
echo '</span>';
?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->product->PO;?></th>
+1 -1
View File
@@ -1462,7 +1462,7 @@ class story extends control
foreach(explode(',', $story->plan) as $planID)
{
if(empty($planID)) continue;
if(isset($relatedPlans[$planID]))$plans .= $relatedPlans[$planID] . "(#$planID) ";
if(isset($relatedPlans[$planID]))$plans .= $relatedPlans[$planID] . "(#$planID)";
}
$story->plan = $plans;
}
+2 -2
View File
@@ -688,8 +688,8 @@ class testsuiteModel extends model
if($stepData->type == 'step') $parentStepID = 0;
}
}
$oldCase->steps = $this->joinStep($oldStep);
$caseData->steps = $this->joinStep($steps);
$oldCase->steps = $this->testcase->joinStep($oldStep);
$caseData->steps = $this->testcase->joinStep($steps);
$changes = common::createChanges($oldCase, $caseData);
$actionID = $this->action->create('case', $caseID, 'Edited');
$this->action->logHistory($actionID, $changes);
+6 -3
View File
@@ -24,10 +24,12 @@ class tree extends control
*/
public function browse($rootID, $viewType, $currentModuleID = 0, $branch = 0)
{
$this->loadModel('product');
/* According to the type, set the module root and modules. */
if(strpos('story|bug|case|line', $viewType) !== false)
if(strpos('story|bug|case', $viewType) !== false)
{
$product = $this->loadModel('product')->getById($rootID);
$product = $this->product->getById($rootID);
if(empty($product)) $this->locate($this->createLink('product', 'create'));
if(!empty($product->type) && $product->type != 'normal')
{
@@ -350,13 +352,14 @@ class tree extends control
$changeFunc = '';
if($viewType == 'task' or $viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'";
$field = $fieldID ? "modules[$fieldID]" : 'module';
if($viewType == 'line') $field = 'line';
$output = html::select("$field", $optionMenu, '', "class='form-control' $changeFunc");
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"), $this->lang->tree->manage, '_blank');
$output .= '&nbsp; ';
$output .= html::a("javascript:loadProductModules($rootID)", $this->lang->refresh);
$output .= $viewType == 'line' ? html::a("javascript:loadProductLines($rootID)", $this->lang->refresh) : html::a("javascript:loadProductModules($rootID)", $this->lang->refresh);
$output .= '</span>';
}
die($output);
+1 -1
View File
@@ -210,7 +210,7 @@ class userModel extends model
if(strtolower($_POST['account']) == 'guest') return false;
$user = fixer::input('post')
->setDefault('join', '0000-00-00')
->setDefault('join', '0000-00-00' )
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))
->setIF($this->post->password1 == false, 'password', '')
->setIF($this->post->email != false, 'email', trim($this->post->email))
+4
View File
@@ -51,6 +51,10 @@
<th><?php echo $lang->user->password2;?></th>
<td><?php echo html::password('password2', '', "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th><?php echo $lang->user->join;?></th>
<td><?php echo html::input('join', date('Y-m-d'), "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->user->role;?></th>
<td><?php echo html::select('role', $lang->user->roleList, '', "class='form-control' onchange='changeGroup(this.value)'");?></td>
+4
View File
@@ -34,6 +34,10 @@
<th><?php echo $lang->user->role;?></th>
<td><?php echo html::select('role', $lang->user->roleList, $user->role, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->user->join;?></th>
<td><?php echo html::input('join', $user->join, "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->group->priv;?></th>
<td colspan='3'><?php echo html::select('groups[]', $groups, $userGroups, 'size=3 multiple=multiple class="form-control chosen"');?></td>