Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
tianshujie98
2020-08-07 17:02:37 +08:00
38 changed files with 83 additions and 46 deletions
+1
View File
@@ -1079,6 +1079,7 @@ class actionModel extends model
*
* @param array $actions
* @param string $direction
* @param string $type
* @access public
* @return array
*/
+6 -1
View File
@@ -247,11 +247,16 @@ function loadProductStories(productID)
*/
function loadProductProjects(productID)
{
required = $('#project_chosen').hasClass('required');
branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
link = createLink('product', 'ajaxGetProjects', 'productID=' + productID + '&projectID=' + oldProjectID + '&branch=' + branch);
$('#projectIdBox').load(link, function(){$(this).find('select').chosen()});
$('#projectIdBox').load(link, function()
{
$(this).find('select').chosen();
if(required) $(this).addClass('required');
});
}
/**
+5 -1
View File
@@ -195,7 +195,11 @@ js::set('flow', $config->global->flow);
}
$priList = $lang->bug->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
+6 -6
View File
@@ -28,16 +28,16 @@ tbody tr td:first-child input{display:none;}
<?php common::printBack($browseLink, 'btn btn-secondary');?>
<div class='divider'></div>
<div class='page-title'>
<span class='text' title='<?php echo $build->name;?>'>
<span class='text' title='<?php echo $build->name;?>'>
<?php echo html::a('javascript:void(0)', "<span class='label label-id'>{$build->id}</span> " . $build->name . " <span class='caret'></span>", '', "data-toggle='dropdown' class='btn btn-link btn-active-text'");?>
<?php
<?php
echo "<ul class='dropdown-menu'>";
foreach($buildPairs as $id => $name)
{
{
echo '<li' . ($id == $build->id ? " class='active'" : '') . '>';
echo html::a($this->createLink('build', 'view', "buildID=$id"), $name);
echo '</li>';
}
}
echo '</ul>';
?>
</span>
@@ -246,7 +246,7 @@ tbody tr td:first-child input{display:none;}
<?php echo html::submitButton($lang->build->batchUnlink, '', 'btn');?>
</div>
<?php endif;?>
<div class='text'><?php echo sprintf($lang->build->resolvedBugs, $countBugs);?></div>
<div class='table-statistic'><?php echo sprintf($lang->build->resolvedBugs, $countBugs);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'bug';
@@ -313,7 +313,7 @@ tbody tr td:first-child input{display:none;}
</table>
<div class='table-footer'>
<?php if($countGeneratedBugs):?>
<div class='text'><?php echo sprintf($lang->build->createdBugs, $countGeneratedBugs);?></div>
<div class='table-statistic'><?php echo sprintf($lang->build->createdBugs, $countGeneratedBugs);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'generatedBug';
+1
View File
@@ -207,6 +207,7 @@ js::set('flow', $config->global->flow);
<?php endif;?>
</div>
</div>
<div class='table-statistic'></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
+5 -1
View File
@@ -91,7 +91,11 @@
}
$priList = $lang->testcase->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
-1
View File
@@ -17,4 +17,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
+1 -1
View File
@@ -13,7 +13,7 @@
<?php include 'header.html.php';?>
<?php js::set('confirmDelete', $lang->entry->confirmDelete);?>
<div id='mainContent'>
<form id='ajaxForm' class='main-table' method='post'>
<form id='ajaxForm' class='main-table' method='post' data-ride='table'>
<table id='entryList' class='table has-sort-head table-fix'>
<thead>
<tr>
-1
View File
@@ -18,4 +18,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
+1 -1
View File
@@ -26,7 +26,7 @@
?>
</div>
</div>
<div id="mainContent" class='main-table'>
<div id="mainContent" class='main-table' data-ride='table'>
<?php if(empty($tasks)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span></p>
+1 -1
View File
@@ -616,7 +616,7 @@ class product extends control
if($number === '')
{
die(html::select('project', $projects, $projectID, 'class=form-control onchange=loadProjectRelated(this.value)'));
die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProjectRelated(this.value)'"));
}
else
{
-1
View File
@@ -19,4 +19,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
-1
View File
@@ -19,4 +19,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
+3 -3
View File
@@ -143,13 +143,13 @@ js::set('foldAll', $lang->project->treeLevel['root']);
$link = $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'");
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "&storyID=0&moduleID=''"));
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
?>
<?php else:?>
<?php
echo "<div class='btn-group dropdown-hover'>";
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "&storyID=0&moduleID=''"));
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create} </span><span class='caret'>", '', "class='btn btn-primary'");
?>
<ul class='dropdown-menu'>
@@ -183,7 +183,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<p>
<span class="text-muted"><?php echo $lang->task->noTask;?></span>
<?php if(common::hasPriv('task', 'create', $checkObject)):?>
<?php echo html::a($this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "&storyID=0&moduleID=''")), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
+3 -3
View File
@@ -148,7 +148,7 @@
}
?>
</div>
<div class='text'><?php echo sprintf($lang->release->finishStories, $countStories);?></div>
<div class='table-statistic'><?php echo sprintf($lang->release->finishStories, $countStories);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'story';
@@ -226,7 +226,7 @@
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
</div>
<div class='text'><?php echo sprintf($lang->release->resolvedBugs, $countBugs);?></div>
<div class='table-statistic'><?php echo sprintf($lang->release->resolvedBugs, $countBugs);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'bug';
@@ -317,7 +317,7 @@
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
</div>
<div class='text'><?php echo sprintf($lang->release->createdBugs, $countLeftBugs);?></div>
<div class='table-statistic'><?php echo sprintf($lang->release->createdBugs, $countLeftBugs);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'leftBug';
+1 -1
View File
@@ -2350,7 +2350,7 @@ class storyModel extends model
$moduleNames = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($modules)->fetchPairs();*/
/* Format these stories. */
$storyPairs = array('' => '');
$storyPairs = array(0 => '');
$i = 0;
foreach($stories as $story)
{
+5 -1
View File
@@ -133,7 +133,11 @@
$priList = $lang->story->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
+2
View File
@@ -581,10 +581,12 @@ class task extends control
$muletipleTasks = $this->dao->select('root , account')->from(TABLE_TEAM)->where('type')->eq('task')->andWhere('root')->in($taskIDList)->fetchGroup('root', 'account');
$tasks = $this->task->getByList($taskIDList);
$this->loadModel('action');
foreach($tasks as $taskID => $task)
{
if(isset($muletipleTasks[$taskID]) and $task->assignedTo != $this->app->user->account) continue;
if(isset($muletipleTasks[$taskID]) and !isset($muletipleTasks[$taskID][$this->post->assignedTo])) continue;
$changes = $this->task->assign($taskID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('task', $taskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
-1
View File
@@ -1,6 +1,5 @@
$(function()
{
$("#story, #mailto").chosen();
$('.record-estimate-toggle').modalTrigger({width:900, type:'iframe', afterHide: function(){parent.location.href=parent.location.href;}});
})
+12 -1
View File
@@ -89,6 +89,17 @@
<tr>
<?php $disableAssignedTo = (isset($teams[$taskID]) and $tasks[$taskID]->assignedTo != $this->app->user->account) ? "disabled='disabled'" : '';?>
<?php $disableHour = isset($teams[$taskID]) ? "disabled='disabled'" : '';?>
<?php
if(isset($teams[$taskID]))
{
$taskMembers = array_intersect_key($members, $teams[$taskID]);
$taskMembers = array('' => '', 'ditto' => $this->lang->task->ditto) + $taskMembers;
}
else
{
$taskMembers = $members;
}
?>
<td><?php echo $taskID . html::hidden("taskIDList[$taskID]", $taskID);?></td>
<td style='overflow:visible' title='<?php echo $tasks[$taskID]->name?>'>
<div class="input-control has-icon-right">
@@ -103,7 +114,7 @@
</div>
</td>
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$taskID]", $modules, $tasks[$taskID]->module, "class='form-control chosen'")?></td>
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $members, $tasks[$taskID]->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></td>
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $taskMembers, $tasks[$taskID]->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></td>
<td><?php echo html::select("types[$taskID]", $typeList, $tasks[$taskID]->type, "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$taskID]", $statusList, $tasks[$taskID]->status, "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$taskID]", $priList, $tasks[$taskID]->pri, "class='form-control'");?></td>
+1 -1
View File
@@ -78,7 +78,7 @@
<span id='storyBox'><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('project', 'linkStory', "projectID=$project->id"), $lang->project->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($project->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
<?php else:?>
<div class='input-group'>
<?php echo html::select('story', array($task->story => $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
</div>
<?php endif;?>
+1 -1
View File
@@ -147,7 +147,7 @@
<th><?php echo $lang->task->mailto;?></th>
<td>
<div class='input-group'>
<?php echo html::select('mailto[]', $project->acl == 'private' ? $members : $users, str_replace(' ' , '', $task->mailto), 'class="form-control" multiple');?>
<?php echo html::select('mailto[]', $project->acl == 'private' ? $members : $users, str_replace(' ' , '', $task->mailto), 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
+5 -1
View File
@@ -108,7 +108,11 @@
}
$priList = $lang->testcase->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri])) $pri = reset($priList);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
+1
View File
@@ -229,6 +229,7 @@ class testsuite extends control
}
else
{
$suite = $this->testsuite->getById($suiteID);
if($suite->type == 'private' and $suite->addedBy != $this->app->user->account and !$this->app->user->admin) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
$this->testsuite->delete($suiteID);
+1 -1
View File
@@ -26,7 +26,7 @@
</div>
</div>
<?php endif;?>
<div id='mainContent' class='main-table'>
<div id='mainContent' class='main-table' data-ride='table'>
<?php if(empty($suites)):?>
<div class="table-empty-tip">
<p>
+3 -3
View File
@@ -5,8 +5,8 @@ $config->testtask->edit = new stdclass();
$config->testtask->create->requiredFields = 'project,build,begin,end,name';
$config->testtask->edit->requiredFields = 'project,build,begin,end,name';
$config->testtask->importunitresult = new stdclass();
$config->testtask->importunitresult->requiredFields = 'project,build,begin,end,name,resultFile';
$config->testtask->importUnitResult = new stdclass();
$config->testtask->importUnitResult->requiredFields = 'project,build,begin,end,name,resultFile';
$config->testtask->editor = new stdclass();
$config->testtask->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
@@ -16,7 +16,7 @@ $config->testtask->editor->start = array('id' => 'comment', 'tools' =
$config->testtask->editor->close = array('id' => 'report,comment', 'tools' => 'simpleTools');
$config->testtask->editor->block = array('id' => 'comment', 'tools' => 'simpleTools');
$config->testtask->editor->activate = array('id' => 'comment', 'tools' => 'simpleTools');
$config->testtask->editor->importunitresult = array('id' => 'desc', 'tools' => 'simpleTools');
$config->testtask->editor->importUnitResult = array('id' => 'desc', 'tools' => 'simpleTools');
$config->testtask->datatable = new stdclass();
$config->testtask->datatable->defaultField = array('id', 'pri', 'title', 'type', 'assignedTo', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'stepNumber','actions');
+1 -1
View File
@@ -27,7 +27,7 @@
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='mainContent' class='main-table'>
<div id='mainContent' class='main-table' data-ride='table'>
<?php if(empty($tasks)):?>
<div class="table-empty-tip">
<p>
@@ -82,7 +82,7 @@
<td colspan='2'>
<div id='mailtoGroup' class='input-group'>
<?php
echo html::select('mailto[]', $users, '', "multiple class='form-control'");
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
echo $this->fetch('my', 'buildContactLists');
?>
</div>
+4 -1
View File
@@ -1024,10 +1024,13 @@ class user extends control
*/
public function ajaxGetContactUsers($contactListID)
{
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
$users = $this->user->getPairs('devfirst|nodeleted', $list ? $list->userList : '', $this->config->maxCount);
if(isset($this->config->user->moreLink)) $this->config->moreLinks['mailto[]'] = $this->config->user->moreLink;
if(!$contactListID) return print(html::select('mailto[]', $users, '', "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
return print(html::select('mailto[]', $users, $list->userList, "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
}
-1
View File
@@ -18,4 +18,3 @@
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8'; }
.margin-l-50px {margin-left: 50px;}
+2
View File
@@ -66,6 +66,7 @@ class userModel extends model
*
* @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname, can be sets of theme
* @param string $usersToAppended account1,account2
* @param int $maxCount
* @access public
* @return array
*/
@@ -96,6 +97,7 @@ class userModel extends model
->orderBy($orderBy)
->beginIF($maxCount)->limit($maxCount)->fi()
->fetchAll('account');
if($maxCount and $maxCount == count($users))
{
if(is_array($usersToAppended)) $usersToAppended = join(',', $usersToAppended);
+1 -1
View File
@@ -13,7 +13,7 @@
<?php include 'header.html.php';?>
<?php js::set('confirmDelete', $lang->webhook->confirmDelete);?>
<div id='mainContent'>
<form class='main-table' id='ajaxForm' method='post'>
<form class='main-table' id='ajaxForm' method='post' data-ride='table'>
<table id='webhookList' class='table has-sort-head table-fixed'>
<thead>
<tr>
+1 -1
View File
@@ -141,7 +141,7 @@ function setMailto(mailto, contactListID)
{
$('#' + mailto).replaceWith(users);
$('#' + mailto + '_chosen').remove();
$('.picker').remove();
$('.picker').remove();
if($("[data-pickertype='remote']").length == 0 && $('.picker-select').length == 0)
{
+3 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/*!
* ZUI: 选择器 - v1.9.2 - 2020-07-31
* ZUI: 选择器 - v1.9.2 - 2020-08-06
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2020 cnezsoft.com; Licensed MIT
File diff suppressed because one or more lines are too long
+1
View File
@@ -57,3 +57,4 @@ a.showMoreImage:hover{opacity: 1;}
.color-darkblue{background:rgb(0,0,139)}
.color-darkblue:hover{background:rgb(0,0,139)}
.color-darkblue:focus{background:rgb(0,0,139)}
.margin-l-50px{margin-left:50px;}
File diff suppressed because one or more lines are too long