Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
+23
-10
@@ -20,27 +20,40 @@ class projectEntry extends entry
|
||||
$this->sendError(400, 'error');
|
||||
}
|
||||
|
||||
public function put($productID)
|
||||
public function put($projectID)
|
||||
{
|
||||
$oldProduct = $this->loadModel('product')->getByID($productID);
|
||||
$oldProject = $this->loadModel('project')->getByID($projectID);
|
||||
$linkedProducts = $this->project->getProducts($projectID);
|
||||
|
||||
/* Set $_POST variables. */
|
||||
$fields = 'program,line,name,PO,QD,RD,type,desc,whitelist,status,acl';
|
||||
$this->batchSetPost($fields, $oldProduct);
|
||||
$fields = 'name,begin,end,acl,parent,desc,PM,whitelist';
|
||||
$this->batchSetPost($fields, $oldProject);
|
||||
|
||||
$control = $this->loadController('product', 'edit');
|
||||
$control->edit($productID);
|
||||
$products = array();
|
||||
$plans = array();
|
||||
foreach($linkedProducts as $product)
|
||||
{
|
||||
$products[] = $product->id;
|
||||
$plans[] = $product->plan;
|
||||
}
|
||||
$this->setPost('products', $products);
|
||||
$this->setPost('plans', $plans);
|
||||
|
||||
$control = $this->loadController('project', 'edit');
|
||||
$control->edit($projectID);
|
||||
|
||||
$data = $this->getData();
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
if(!isset($data->result)) return $this->sendError(400, 'error');
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
$project = $this->project->getByID($projectID);
|
||||
$this->send(200, $project);
|
||||
}
|
||||
|
||||
public function delete($productID)
|
||||
public function delete($projectID)
|
||||
{
|
||||
$control = $this->loadController('product', 'delete');
|
||||
$control->delete($productID, 'yes');
|
||||
$control = $this->loadController('project', 'delete');
|
||||
$control->delete($projectID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
|
||||
@@ -892,7 +892,14 @@ class baseControl
|
||||
$data = (array) $data;
|
||||
if(helper::isAjaxRequest() or $this->viewType == 'json')
|
||||
{
|
||||
print(json_encode($data));
|
||||
/* Process for zh-cn in json. */
|
||||
foreach($data as $key => $value)
|
||||
{
|
||||
if(!is_string($value)) continue;
|
||||
$data[$key] = urlencode($value);
|
||||
}
|
||||
|
||||
print(urldecode(json_encode($data)));
|
||||
$response = helper::removeUTF8Bom(ob_get_clean());
|
||||
|
||||
if(defined('RUN_MODE') and RUN_MODE == 'api') return print($response);
|
||||
|
||||
@@ -177,8 +177,7 @@ class html extends baseHTML
|
||||
}
|
||||
}
|
||||
|
||||
$string = '';
|
||||
$string .= "<select name='$name' {$id} $attrib>\n";
|
||||
$string = "<select name='$name' {$id} $attrib>\n";
|
||||
|
||||
/* The options. */
|
||||
if(is_array($selectedItems)) $selectedItems = implode(',', $selectedItems);
|
||||
|
||||
@@ -517,7 +517,8 @@ class gitlab
|
||||
if(!scm::checkRevision($version)) return array();
|
||||
$api = "commits";
|
||||
|
||||
if(empty($count)) $count = 1;
|
||||
if(empty($count)) $count = 100;
|
||||
|
||||
$params = array();
|
||||
$params['ref_name'] = $branch;
|
||||
$params['per_page'] = $count;
|
||||
@@ -625,6 +626,7 @@ class gitlab
|
||||
if(count($results) < 100) break;
|
||||
}
|
||||
|
||||
$files = array();
|
||||
foreach($allResults as $row)
|
||||
{
|
||||
$file = new stdclass();
|
||||
|
||||
@@ -941,7 +941,8 @@ class actionModel extends model
|
||||
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $objectType == 'makeup' ? '`zt_overtime`' : $this->config->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$field = zget($this->config->action->objectNameFields, $objectType, '');
|
||||
if(empty($field)) continue;
|
||||
if($table != TABLE_TODO)
|
||||
{
|
||||
$objectName = array();
|
||||
|
||||
@@ -336,7 +336,7 @@ class backup extends control
|
||||
if($statusFile)
|
||||
{
|
||||
$this->app->loadLang('extension');
|
||||
$this->view->error = sprintf($this->lang->extension->noticeOkFile, preg_replace('/^' . str_replace('/', '\\/', dirname($this->app->getBasePath()) . DS) . '/', '', $statusFile));
|
||||
$this->view->error = sprintf($this->lang->extension->noticeOkFile, str_replace(dirname($this->app->getBasePath()) . DS, '', $statusFile));
|
||||
die($this->display());
|
||||
}
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Project';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
$lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -375,7 +375,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Project';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -365,7 +365,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Projects';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
$lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -365,7 +365,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Projects';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
$lang->block->modules['project']->availableBlocks->projectteam = 'ProjectHuman Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'ProjectHuman Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -4,9 +4,9 @@ $config->bug->batchCreate = 10;
|
||||
$config->bug->longlife = 7;
|
||||
$config->bug->removeFields = 'objectTypeList,productList,executionList,gitlabID,gitlabProjectID';
|
||||
|
||||
$config->bug->create = new stdclass();
|
||||
$config->bug->edit = new stdclass();
|
||||
$config->bug->resolve = new stdclass();
|
||||
$config->bug->create = new stdclass();
|
||||
$config->bug->edit = new stdclass();
|
||||
$config->bug->resolve = new stdclass();
|
||||
$config->bug->create->requiredFields = 'title,openedBuild';
|
||||
$config->bug->edit->requiredFields = $config->bug->create->requiredFields;
|
||||
$config->bug->resolve->requiredFields = 'resolution';
|
||||
|
||||
@@ -88,7 +88,7 @@ class bugModel extends model
|
||||
if(!dao::isError())
|
||||
{
|
||||
$bugID = $this->dao->lastInsertID();
|
||||
|
||||
|
||||
$this->loadModel('gitlab')->apiCreateIssue($this->post->gitlab, $this->post->gitlabProject, 'bug', $bugID, $bug);
|
||||
|
||||
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');
|
||||
@@ -278,9 +278,9 @@ class bugModel extends model
|
||||
|
||||
/**
|
||||
* Create bug from gitlab issue.
|
||||
*
|
||||
* @param object $bug
|
||||
* @param int $executionID
|
||||
*
|
||||
* @param object $bug
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return int|bool
|
||||
*/
|
||||
@@ -675,7 +675,7 @@ class bugModel extends model
|
||||
if(!empty($bug->resolvedBy)) $this->loadModel('score')->create('bug', 'resolve', $bugID);
|
||||
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');
|
||||
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
@@ -862,7 +862,7 @@ class bugModel extends model
|
||||
$this->loadModel('gitlab');
|
||||
foreach($activateBugs as $bugID => $bug)
|
||||
{
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
if($relation) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'bug', (Object)$bug, $bugID);
|
||||
@@ -904,7 +904,7 @@ class bugModel extends model
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
$bug = $this->getById($bugID); // get full bug object to update issue.
|
||||
$bug = $this->getById($bugID); // Get full bug object to update issue.
|
||||
$bug->assignee_id = $this->gitlab->getGitlabUserID($relation->gitlabID, $bug->assignedTo);
|
||||
if($bug->assignee_id != '')
|
||||
{
|
||||
@@ -967,7 +967,7 @@ class bugModel extends model
|
||||
$bug->lastEditedDate = $now;
|
||||
$bug->confirmed = 1;
|
||||
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
if($relation) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'bug', $bug, $bugID);
|
||||
@@ -1259,7 +1259,7 @@ class bugModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
|
||||
@@ -218,7 +218,6 @@ class caselibModel extends model
|
||||
{
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)
|
||||
->where('lib')->eq((int)$libID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib == 'project')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('product')->eq(0)
|
||||
->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi()
|
||||
|
||||
@@ -1739,7 +1739,8 @@ EOD;
|
||||
{
|
||||
/* Check program priv. */
|
||||
$viewProjects = trim($this->app->user->view->projects, ',');
|
||||
if($this->session->project and $viewProjects and strpos(",{$viewProjects},", ",{$this->session->project},") === false and !$this->app->user->admin) $this->loadModel('project')->accessDenied();
|
||||
$accessDenied = ($this->session->project and $viewProjects and strpos(",{$viewProjects},", ",{$this->session->project},") === false);
|
||||
if($accessDenied and !$this->app->user->admin) $this->loadModel('project')->accessDenied();
|
||||
$this->resetProgramPriv($module, $method);
|
||||
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method, false);
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ class custom extends control
|
||||
{
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
$this->loadModel('setting')->setItem('system.common.global.changedMode', 'yes');
|
||||
$this->setting->setItem('system.common.global.changedMode', 'yes');
|
||||
|
||||
$sprintConcept = isset($this->config->custom->sprintConcept) ? $this->config->custom->sprintConcept : '0';
|
||||
if($mode == 'new')
|
||||
|
||||
@@ -231,8 +231,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
$lang->custom->moduleName['execution'] = $lang->custom->execution;
|
||||
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
|
||||
|
||||
$lang->custom->conceptOptions = new stdclass;
|
||||
$lang->custom->conceptOptions->story = array();
|
||||
|
||||
@@ -231,8 +231,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
$lang->custom->moduleName['execution'] = $lang->custom->execution;
|
||||
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
|
||||
|
||||
$lang->custom->conceptOptions = new stdclass;
|
||||
$lang->custom->conceptOptions->story = array();
|
||||
|
||||
@@ -231,8 +231,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Kế hoạch';
|
||||
$lang->custom->moduleName['execution'] = $lang->custom->execution;
|
||||
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Sự kết hợp quản lý nào phù hợp với công ty của bạn?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Sự kết hợp quản lý nào phù hợp với công ty của bạn?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
|
||||
|
||||
$lang->custom->conceptOptions = new stdclass;
|
||||
$lang->custom->conceptOptions->story = array();
|
||||
|
||||
@@ -66,7 +66,7 @@ var $SRBox = $('.table-form .SRBox');
|
||||
$SRBox.each(function(i)
|
||||
{
|
||||
var $this = $(this);
|
||||
var name = $this.html();
|
||||
var name = $this.html();
|
||||
$SRBox.each(function(j)
|
||||
{
|
||||
if(j <= i) return;
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
if($sysObject == 'required') continue;
|
||||
common::printLink('custom', $sysObject, "", "<span class='text'>{$lang->custom->$sysObject}</span>", '', "class='btn btn-link' id='{$sysObject}Tab'");
|
||||
}
|
||||
|
||||
common::printLink('custom', 'mode', "", "<span class='text'>{$lang->custom->mode}</span>", '', "class='btn btn-link' id='modeTab'");
|
||||
|
||||
common::printLink('custom', 'mode', "", "<span class='text'>{$lang->custom->mode}</span>", '', "class='btn btn-link' id='modeTab'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -488,7 +488,7 @@ class doc extends control
|
||||
if($doc->contentType == 'markdown')
|
||||
{
|
||||
$doc->content = $this->doc->processMarkdown($doc->content);
|
||||
$doc->digest = $this->doc->processMarkdown($$doc->digest);
|
||||
$doc->digest = $this->doc->processMarkdown($doc->digest);
|
||||
}
|
||||
|
||||
/* Check priv when lib is product or project. */
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<?php js::set('extra', $extra);?>
|
||||
<style>
|
||||
#navTabs {position: sticky; top: 0; background: #fff; z-index: 950;}
|
||||
#navTabs>li>span {display: inline-block; margin-left: -6px;}
|
||||
#navTabs>li>a {padding: 8px 10px; display: inline-block}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>span {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li {padding: 0px 10px; display: inline-block}
|
||||
#navTabs>li>span {display: inline-block;}
|
||||
#navTabs>li>a {padding: 8px 0px; display: inline-block}
|
||||
#navTabs>li.active>a {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb; }
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border: none;}
|
||||
|
||||
@@ -111,8 +112,8 @@ foreach($executions as $projectID => $projectExecutions)
|
||||
<?php $tabActive = ($myExecutions and ($tabActive == 'closed' or $tabActive == 'myExecution')) ? 'myExecution' : 'other';?>
|
||||
<?php if($myExecutions): ?>
|
||||
<ul class="nav nav-tabs" id="navTabs">
|
||||
<li class="<?php if($tabActive == 'myExecution') echo 'active';?>"><?php echo html::a('#myExecution', $lang->execution->involved, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="text-muted"><?php echo $myExecutions;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="text-muted"><?php echo $others;?></span><li>
|
||||
<li class="<?php if($tabActive == 'myExecution') echo 'active';?>"><?php echo html::a('#myExecution', $lang->execution->involved, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="label label-light label-badge"><?php echo $myExecutions;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="label label-light label-badge"><?php echo $others;?></span><li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<div class="tab-content" id="tabContent">
|
||||
@@ -139,10 +140,10 @@ $(function()
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li').click(function()
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
$(this).find('span').show();
|
||||
$(this).siblings('li').find('span').hide();
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
|
||||
$("#dropMenu .search-box").width('auto');
|
||||
})
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<?php
|
||||
if(common::hasPriv('execution', 'task'))
|
||||
{
|
||||
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title=$execution->name");
|
||||
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title='{$execution->name}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -139,13 +139,19 @@ class group extends control
|
||||
/* Get the group data by id. */
|
||||
$group = $this->group->getByID($groupID);
|
||||
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF($this->config->systemMode != 'classic')->andWhere('type')->eq('project')->fi()
|
||||
->orderBy('order_desc')
|
||||
->fetchPairs('id', 'name');
|
||||
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageView;
|
||||
$this->view->position[] = $group->name;
|
||||
$this->view->position[] = $this->lang->group->manageView;
|
||||
|
||||
$this->view->group = $group;
|
||||
$this->view->programs = $this->dao->select('*')->from(TABLE_PROGRAM)->where('deleted')->eq('0')->andWhere('type')->eq('program')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
$this->view->projects = $this->config->systemMode == 'classic' ? $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->orderBy('order_desc')->fetchPairs('id', 'name') : $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere('type')->eq('project')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
$this->view->projects = $projects;
|
||||
$this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
|
||||
$navGroup = array();
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Admin Konto';
|
||||
$lang->install->password = 'Admin Passwort';
|
||||
$lang->install->errorEmptyPassword = 'Passwort sollte nicht leer sein.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Admin';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'System Administrator';
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Admin Account';
|
||||
$lang->install->password = 'Admin Password';
|
||||
$lang->install->errorEmptyPassword = 'Password should not be blank.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Admin';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'System Admin';
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Compte Admin';
|
||||
$lang->install->password = 'Mot de Passe Admin';
|
||||
$lang->install->errorEmptyPassword = 'Password ne doit pas être vide.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Admin';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'Administrateur';
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Tài khoản quản trị';
|
||||
$lang->install->password = 'Mật khẩu quản trị';
|
||||
$lang->install->errorEmptyPassword = 'Mật khẩu không nên là blank.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Quản trị';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'Quản trị hệ thống';
|
||||
|
||||
@@ -123,14 +123,14 @@ $lang->install->save2File = '<div class="alert alert-warning">拷贝上
|
||||
$lang->install->saved2File = '配置信息已经成功保存到" <strong>%s</strong> "中。您后面还可继续修改此文件。';
|
||||
$lang->install->errorNotSaveConfig = '还没有保存配置文件';
|
||||
|
||||
$lang->install->getPriv = '设置帐号';
|
||||
$lang->install->company = '公司名称';
|
||||
$lang->install->account = '管理员帐号';
|
||||
$lang->install->password = '管理员密码';
|
||||
$lang->install->getPriv = '设置帐号';
|
||||
$lang->install->company = '公司名称';
|
||||
$lang->install->account = '管理员帐号';
|
||||
$lang->install->password = '管理员密码';
|
||||
$lang->install->errorEmptyPassword = '密码不能为空';
|
||||
|
||||
$lang->install->selectedMode = '选择模式';
|
||||
$lang->install->selectedModeTips = '后续您还可以去后台-自定义-模式中进行调整';
|
||||
$lang->install->selectedMode = '选择模式';
|
||||
$lang->install->selectedModeTips = '后续您还可以去后台-自定义-模式中进行调整';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = '管理员';
|
||||
$lang->install->groupList['ADMIN']['desc'] = '系统管理员';
|
||||
|
||||
@@ -123,14 +123,14 @@ $lang->install->save2File = '<div class="alert alert-warning">拷貝上
|
||||
$lang->install->saved2File = '配置信息已經成功保存到" <strong>%s</strong> "中。您後面還可繼續修改此檔案。';
|
||||
$lang->install->errorNotSaveConfig = '還沒有保存配置檔案';
|
||||
|
||||
$lang->install->getPriv = '設置帳號';
|
||||
$lang->install->company = '公司名稱';
|
||||
$lang->install->account = '管理員帳號';
|
||||
$lang->install->password = '管理員密碼';
|
||||
$lang->install->getPriv = '設置帳號';
|
||||
$lang->install->company = '公司名稱';
|
||||
$lang->install->account = '管理員帳號';
|
||||
$lang->install->password = '管理員密碼';
|
||||
$lang->install->errorEmptyPassword = '密碼不能為空';
|
||||
|
||||
$lang->install->selectedMode = '選擇模式';
|
||||
$lang->install->selectedModeTips = '後續您還可以去後臺-自定義-模式中進行調整';
|
||||
$lang->install->selectedMode = '選擇模式';
|
||||
$lang->install->selectedModeTips = '後續您還可以去後臺-自定義-模式中進行調整';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = '管理員';
|
||||
$lang->install->groupList['ADMIN']['desc'] = '系統管理員';
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
<?php js::set('extra', $extra);?>
|
||||
<style>
|
||||
#navTabs {position: sticky; top: 0; background: #fff; z-index: 950;}
|
||||
#navTabs>li>span {display: inline-block; margin-left: -6px;}
|
||||
#navTabs>li>a {padding: 8px 10px; display: inline-block}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>span {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li {padding: 0px 10px; display: inline-block}
|
||||
#navTabs>li>span {display: inline-block;}
|
||||
#navTabs>li>a {padding: 8px 0px; display: inline-block}
|
||||
#navTabs>li.active>a {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb; }
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border: none;}
|
||||
|
||||
#tabContent {margin-top: 10px;}
|
||||
#tabContent {margin-top: 10px; z-index: 900;}
|
||||
#tabContent ul {list-style: none; margin: 0}
|
||||
#tabContent .tab-pane>ul {padding-left: 7px;}
|
||||
#tabContent .tab-pane>ul>li.hide-in-search {position: relative;}
|
||||
@@ -23,7 +24,7 @@
|
||||
#tabContent li>a {margin-top: 5px;display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
|
||||
#tabContent li>a.selected {color: #e9f2fb; background-color: #0c64eb;}
|
||||
|
||||
#swapper li.hide-in-search a:focus, #swapper li.hide-in-search a:hover {color: #838a9d; cursor: default;}
|
||||
#swapper li.hide-in-search>a:focus, #swapper li.hide-in-search>a:hover {color: #838a9d; cursor: default;}
|
||||
#swapper li ul li a:focus, #swapper li ul li a:hover, .noProgram li a:focus, .noProgram li a:hover {background: #0c64eb; color: #fff;}
|
||||
</style>
|
||||
<?php
|
||||
@@ -116,8 +117,8 @@ foreach($products as $programID => $programProducts)
|
||||
<?php $tabActive = ($myProducts and ($tabActive == 'closed' or $tabActive == 'myProduct')) ? 'myProduct' : 'other';?>
|
||||
<?php if($myProducts): ?>
|
||||
<ul class="nav nav-tabs" id="navTabs">
|
||||
<li class="<?php if($tabActive == 'myProduct') echo 'active';?>"><?php echo html::a('#myProduct', $lang->product->mine, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="text-muted"><?php echo $myProducts;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->product->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="text-muted"><?php echo $others;?></span><li>
|
||||
<li class="<?php if($tabActive == 'myProduct') echo 'active';?>"><?php echo html::a('#myProduct', $lang->product->mine, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="label label-light label-badge"><?php echo $myProducts;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->product->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="label label-light label-badge"><?php echo $others;?></span><li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<div class="tab-content" id="tabContent">
|
||||
@@ -146,10 +147,10 @@ $(function()
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li').click(function()
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
$(this).find('span').show();
|
||||
$(this).siblings('li').find('span').hide();
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
|
||||
$("#dropMenu .search-box").width('auto');
|
||||
})
|
||||
|
||||
@@ -1416,12 +1416,19 @@ class project extends control
|
||||
|
||||
/* Delete the execution under the project. */
|
||||
$executionIdList = $this->loadModel('execution')->getByProject($projectID);
|
||||
if(empty($executionIdList)) die(js::reload('parent'));
|
||||
|
||||
if(empty($executionIdList))
|
||||
{
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->in(array_keys($executionIdList))->exec();
|
||||
foreach($executionIdList as $executionID => $execution) $this->action->create('execution', $executionID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->user->updateUserView($executionIdList, 'sprint');
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
|
||||
|
||||
$this->session->set('project', '');
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
<?php js::set('method', $method);?>
|
||||
<style>
|
||||
#navTabs {position: sticky; top: 0; background: #fff; z-index: 950;}
|
||||
#navTabs>li>span {display: inline-block; margin-left: -6px;}
|
||||
#navTabs>li>a {padding: 8px 10px; display: inline-block}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>span {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb; }
|
||||
#navTabs>li {padding: 0px 10px; display: inline-block}
|
||||
#navTabs>li>span {display: inline-block;}
|
||||
#navTabs>li>a {padding: 8px 0px; display: inline-block}
|
||||
#navTabs>li.active>a {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb;}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border: none;}
|
||||
|
||||
#tabContent {margin-top: 10px; z-index: 900;}
|
||||
@@ -118,8 +119,8 @@ foreach($projects as $programID => $programProjects)
|
||||
<?php $tabActive = ($myProjects and ($tabActive == 'closed' or $tabActive == 'myProject')) ? 'myProject' : 'other';?>
|
||||
<?php if($myProjects): ?>
|
||||
<ul class="nav nav-tabs" id="navTabs">
|
||||
<li class="<?php if($tabActive == 'myProject') echo 'active';?>"><?php echo html::a('#myProject', $lang->project->myProject, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="text-muted"><?php echo $myProjects;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="text-muted"><?php echo $others;?></span><li>
|
||||
<li class="<?php if($tabActive == 'myProject') echo 'active';?>"><?php echo html::a('#myProject', $lang->project->myProject, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="label label-light label-badge"><?php echo $myProjects;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="label label-light label-badge"><?php echo $others;?></span><li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<div class="tab-content" id="tabContent">
|
||||
@@ -147,10 +148,10 @@ $(function()
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li').click(function()
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
$(this).find('span').show();
|
||||
$(this).siblings('li').find('span').hide();
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
|
||||
$("#dropMenu .search-box").width('auto');
|
||||
})
|
||||
|
||||
@@ -406,3 +406,5 @@ $lang->story->categoryList['safe'] = 'Safe';
|
||||
$lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->sync2Gitlab = 'Mit Gitlab synchronisieren';
|
||||
|
||||
@@ -446,7 +446,7 @@ class testcaseModel extends model
|
||||
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
|
||||
->beginIF($auto == 'unit')->andWhere('t1.auto')->eq('unit')->fi()
|
||||
->orderBy($sort)
|
||||
->page($pager)
|
||||
->page($pager, 't1.id')
|
||||
->fetchAll();
|
||||
}
|
||||
elseif($browseType == 'bysuite')
|
||||
|
||||
@@ -165,6 +165,20 @@ class upgrade extends control
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
|
||||
/* Update sprint concept. */
|
||||
$sprintConcept = 0;
|
||||
if(isset($this->config->custom->sprintConcept))
|
||||
{
|
||||
if($this->config->custom->sprintConcept == 2 and $mode == 'new') $sprintConcept = 1;
|
||||
}
|
||||
elseif(isset($this->config->custom->productProject))
|
||||
{
|
||||
list($productConcept, $projectConcept) = explode('_', $this->config->custom->productProject);
|
||||
if($mode == 'classic') $sprintConcept = $projectConcept;
|
||||
if($mode == 'new' and $projectConcept == 2) $sprintConcept = 1;
|
||||
}
|
||||
$this->setting->setItem('system.custom.sprintConcept', $sprintConcept);
|
||||
|
||||
if($mode == 'classic') $this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
if($mode == 'new') $this->locate(inlink('mergeTips'));
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ div.divider {vertical-align: middle;}
|
||||
|
||||
.main-row {margin-top: 20px; padding: 20px; background: #f1f1f1;}
|
||||
.main-row .side-col .nav li.active div a {background: #006af1; color: #fff; border-radius: 4px;}
|
||||
.main-row .side-col .nav li div a {width: 80%; display: inline-block; padding: 8px 15px;}
|
||||
.main-row .side-col .nav li div a {width: 80%; display: inline-block; padding: 5px 15px; margin-bottom: 5px;}
|
||||
|
||||
#lineBox > .cell {height: 700px;}
|
||||
#source > .cell {padding: 0; position: relative; height: 700px;}
|
||||
|
||||
+158
-159
@@ -1,37 +1,5 @@
|
||||
$(function()
|
||||
{
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var checkedProduct = true;
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
var productNum = $("[id^='products\[" + productLine + "\]']").length;
|
||||
var checkedProductNum = $("[id^='products\[" + productLine + "\]']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
$("[id^='productLines\[" + productLine + "\]']").prop('checked', checkedProduct);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
$('#checkAllProjects').prop('checked', checkedProduct);
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
var checkedProduct = true;
|
||||
var productNum = $("[id^='products'").length;
|
||||
var checkedProductNum = $("[id^='products']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
$('#checkAllProjects').prop('checked', checkedProduct);
|
||||
}
|
||||
else if($('[id^=sprints]').length > 0)
|
||||
{
|
||||
var checkedProject = true;
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checkedProject = false;
|
||||
$('#checkAllProjects').prop('checked', checkedProject);
|
||||
}
|
||||
|
||||
/* Define drag to select relevant parameters. */
|
||||
var options = {
|
||||
selector: 'input',
|
||||
@@ -44,104 +12,119 @@ $(function()
|
||||
var checkedLines = true;
|
||||
var checkedProduct = true;
|
||||
var checkedProject = true;
|
||||
var type = $('[data-id=' + e.id + ']').attr('name');
|
||||
|
||||
/* Select the product line of the current page. */
|
||||
if($('.nav li.active').find('[id^=productLines]').prop('checked'))
|
||||
if(typeof(type) != 'undefined' && type.indexOf('productLines') > -1)
|
||||
{
|
||||
var lineID = $('.nav li.active').attr('lineid');
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$("[id^='products\[" + lineID + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + lineID + "\]'").prop('checked', true);
|
||||
if($('.nav li.currentPage').find('[id^=productLines]').prop('checked'))
|
||||
{
|
||||
var lineID = $('.nav li.active').attr('lineid');
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$("[id^='products\[" + lineID + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + lineID + "\]'").prop('checked', true);
|
||||
}
|
||||
}
|
||||
|
||||
/* All products selected. */
|
||||
if($('[id^=productLines]').length > 0)
|
||||
if(typeof(type) != 'undefined' && type.indexOf('products') > -1)
|
||||
{
|
||||
$("[id^='products\[" + lineID + "\]']").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProduct = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('[data-product=' + $(this).val() +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', checkedProduct);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("[id^=products]").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProduct = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('[data-product=' + $(this).val() +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
|
||||
/* All projects selected. */
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
$("[id^='sprints\[" + lineID + "\]']").each(function()
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
$("[id^='products\[" + lineID + "\]']").each(function()
|
||||
{
|
||||
checkedProject = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
$("[id^=sprints]").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProject = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checkedProject = false;
|
||||
}
|
||||
$('#checkAllProjects').prop('checked', checkedProject);
|
||||
|
||||
/* All product lines selected. */
|
||||
$('[name^=productLines]').each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedLines = false;
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProduct = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('[data-product=' + $(this).val() +']').prop('checked', true);
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
var productLine = $(this).val();
|
||||
$("[id^='products\[" + productLine + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + productLine + "\]']").prop('checked', true);
|
||||
$("[id^=products]").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProduct = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('[data-product=' + $(this).val() +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
$('#checkAllLines').prop('checked', checkedLines);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
}
|
||||
|
||||
/* All projects selected. */
|
||||
if(typeof(type) != 'undefined' && type.indexOf('sprints') > -1)
|
||||
{
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
$("[id^='sprints\[" + lineID + "\]']").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProject = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
$("[id^=sprints]").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProject = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checkedProject = false;
|
||||
}
|
||||
$('#checkAllProjects').prop('checked', checkedProject);
|
||||
}
|
||||
|
||||
/* All product lines selected. */
|
||||
if(typeof(type) != 'undefined' && type.indexOf('productLines') > -1)
|
||||
{
|
||||
$('[name^=productLines]').each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedLines = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productLine = $(this).val();
|
||||
$('[lineid=' + productLine + ']').addClass('active');
|
||||
$("[id^='products\[" + productLine + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + productLine + "\]']").prop('checked', true);
|
||||
}
|
||||
})
|
||||
$('#checkAllLines').prop('checked', checkedLines);
|
||||
}
|
||||
|
||||
/* If the project is checked, the relevant form will be displayed according to the selected mode. */
|
||||
hiddenProject();
|
||||
@@ -166,6 +149,7 @@ $(function()
|
||||
$('[name^=productLines]').prop('checked', true);
|
||||
$('[name^=products]').prop('checked', true);
|
||||
$('[name^=sprints]').prop('checked', true);
|
||||
$('.main-row .side-col .nav li').addClass('active');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -174,6 +158,7 @@ $(function()
|
||||
$('[name^=productLines]').prop('checked', false);
|
||||
$('[name^=products]').prop('checked', false);
|
||||
$('[name^=sprints]').prop('checked', false);
|
||||
$('.main-row .side-col .nav li').removeClass('active');
|
||||
}
|
||||
|
||||
/* If the project is checked, the relevant form will be displayed according to the selected mode. */
|
||||
@@ -243,6 +228,7 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
}
|
||||
$('[data-line=' + value + ']').prop('checked', true);
|
||||
$('[lineid=' + value + ']').addClass('active');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -253,6 +239,7 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', false);
|
||||
}
|
||||
$('[data-line=' + value + ']').prop('checked', false);
|
||||
$('[lineid=' + value + ']').removeClass('active');
|
||||
}
|
||||
|
||||
/* Determine whether all product line buttons are selected. */
|
||||
@@ -306,19 +293,29 @@ $(function()
|
||||
$('#end').removeAttr('disabled');
|
||||
}
|
||||
|
||||
var currentLine = $(this).closest('li').attr('lineid');
|
||||
$(this).closest('li').addClass('currentPage');
|
||||
|
||||
/* Active current li and remove active before li. */
|
||||
$(this).closest('ul').find('li').removeClass('active');
|
||||
$(this).closest('li').addClass('active');
|
||||
$('[id^=productLines]').each(function()
|
||||
{
|
||||
var lineID = $(this).val();
|
||||
if($("[id^='productLines\[" + lineID +"\]'").prop('checked') || lineID == currentLine)
|
||||
{
|
||||
$(this).closest('li').addClass('active');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).closest('li').removeClass('currentPage');
|
||||
$(this).closest('li').removeClass('active');
|
||||
}
|
||||
})
|
||||
|
||||
/* Show current data and hide before data. */
|
||||
var target = $(this).attr('data-target');
|
||||
$('.lineBox').addClass('hidden');
|
||||
$(target).removeClass('hidden');
|
||||
$('#source').find('.lineBox :checkBox').prop('checked', false);
|
||||
|
||||
/* The first group of products is selected by default. */
|
||||
var firstProduct = $(target).find(":checkbox:first").prop('checked', true);
|
||||
$('[data-product=' + firstProduct.val() + ']').prop('checked', true);
|
||||
|
||||
/* Replace program name. */
|
||||
$('#programName').val($(this).text());
|
||||
@@ -346,10 +343,15 @@ $(function()
|
||||
}
|
||||
else if($(this).closest("li").find('[id^=productLines]').prop('checked'))
|
||||
{
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$('[data-line=' + productLine + ']').prop('checked', true);
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
var objectNum = $('[data-line='+ productLine +']').length;
|
||||
var checkedObjectNum = $('[data-line='+ productLine +']:checked').length;
|
||||
if(objectNum == checkedObjectNum)
|
||||
{
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$('[data-line=' + productLine + ']').prop('checked', true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,42 +359,30 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', false);
|
||||
}
|
||||
|
||||
/* Determine whether all products and all projects buttons are selected. */
|
||||
var checkedProduct = true;
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
var productNum = $("[id^='products\[" + productLine + "\]'").length;
|
||||
var checkedProductNum = $("[id^='products\[" + productLine + "\]']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
$('#checkAllProjects').prop('checked', checkedProduct);
|
||||
$("[id^='productLines\[" + productLine + "\]']").prop('checked', checkedProduct);
|
||||
|
||||
/* Determines whether to display an project related form control. */
|
||||
hiddenProject();
|
||||
|
||||
/* If the product line is selected, the product and project are selected by default. */
|
||||
$('[id^=productLines]').each(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('[data-line=' + $(this).val() +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$('[name^=products]').change(function()
|
||||
{
|
||||
setProgramByProduct($(this));
|
||||
|
||||
var checked = true;
|
||||
var lineID = $(this).attr('data-line');
|
||||
var checked = true;
|
||||
var checkedLine = true;
|
||||
var lineID = $(this).attr('data-line');
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var productNum = $("[id^='products\[" + lineID + "\]'").length;
|
||||
var checkedProductNum = $("[id^='products\[" + lineID + "\]']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checked = false;
|
||||
if(checkedProductNum > 0) $('[lineid=' + lineID + ']').addClass('active');
|
||||
if(checkedProductNum == 0)
|
||||
{
|
||||
$('[lineid=' + lineID + ']').removeClass('active');
|
||||
checkedLine = false;
|
||||
}
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', checkedLine);
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
@@ -403,7 +393,6 @@ $(function()
|
||||
}
|
||||
|
||||
$('#checkAllProducts').prop('checked', checked);
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', checked);
|
||||
|
||||
value = $(this).val();
|
||||
if($(this).prop('checked'))
|
||||
@@ -443,6 +432,16 @@ $(function()
|
||||
|
||||
$('[name^=sprints]').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
if(lineID && $('[data-lineid=' + lineID + ']').length > 0 && !$('[data-lineid=' + lineID + ']').prop('checked')) $('[data-lineid=' + lineID + ']').prop('checked', true);
|
||||
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
|
||||
setProgramByProduct($(':checkbox[data-productid=' + productID + ']'));
|
||||
}
|
||||
|
||||
var checked = true;
|
||||
var checkedProduct = true;
|
||||
if($('[id^=productLines]').length > 0)
|
||||
@@ -456,6 +455,15 @@ $(function()
|
||||
var productNum = $("[id^='products\[" + lineID + "\]'").length;
|
||||
var checkedProductNum = $("[id^='products\[" + lineID + "\]']:checked").length;
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
|
||||
var checkedLine = true;
|
||||
if(checkedProductNum > 0) $('[lineid=' + lineID + ']').addClass('active');
|
||||
if(checkedProductNum == 0)
|
||||
{
|
||||
$('[lineid=' + lineID + ']').removeClass('active');
|
||||
checkedLine = false;
|
||||
}
|
||||
$("[id^='productLines\["+ lineID +"\]").prop('checked', checkedLine);
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
@@ -480,15 +488,6 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', checked);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
if(lineID && $('[data-lineid=' + lineID + ']').length > 0 && !$('[data-lineid=' + lineID + ']').prop('checked')) $('[data-lineid=' + lineID + ']').prop('checked', true);
|
||||
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
|
||||
setProgramByProduct($(':checkbox[data-productid=' + productID + ']'));
|
||||
}
|
||||
setProgramBegin(programBegin);
|
||||
setProgramEnd(programEnd);
|
||||
setProjectPM();
|
||||
|
||||
@@ -66,7 +66,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
|
||||
@@ -69,7 +69,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
|
||||
@@ -67,7 +67,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
|
||||
@@ -67,7 +67,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
<?php foreach($lineGroups[$line->id] as $productID => $product):?>
|
||||
<div class='lineGroup'>
|
||||
<div class='productList'>
|
||||
<?php echo html::checkBox("products[$line->id]", array($productID => $product->name), $i == 0 ? $product->id : 0, "title='{$product->name}' data-productid='{$product->id}' data-line='{$line->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}' class='tile'");?>
|
||||
<?php echo html::checkBox("products[$line->id]", array($productID => $product->name), '', "title='{$product->name}' data-productid='{$product->id}' data-line='{$line->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}' class='tile'");?>
|
||||
<?php echo html::hidden("productIdList[$line->id][$productID]", $productID);?>
|
||||
</div>
|
||||
<div class='projectList'>
|
||||
<div class='scroll-handle'>
|
||||
<?php if(isset($productGroups[$productID])):?>
|
||||
<?php foreach($productGroups[$productID] as $sprint):?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => $sprint->name), $i == 0 ? $sprint->id : 0, "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}' class='tile'");?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => $sprint->name), '', "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}' class='tile'");?>
|
||||
<?php echo html::hidden("sprintIdList[$line->id][$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
<?php foreach($noMergedProducts as $productID => $product):?>
|
||||
<div class='lineGroup'>
|
||||
<div class='productList'>
|
||||
<?php echo html::checkBox("products", array($product->id => $product->name), $isChecked ? $product->id : '', "data-productid='{$product->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}'");?>
|
||||
<?php echo html::checkBox("products", array($product->id => $product->name), '', "data-productid='{$product->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}'");?>
|
||||
</div>
|
||||
<div class='projectList'>
|
||||
<div class='scroll-handle'>
|
||||
<?php if(isset($productGroups[$productID])):?>
|
||||
<?php foreach($productGroups[$productID] as $sprint):?>
|
||||
<?php echo html::checkBox("sprints[$productID]", array($sprint->id => $sprint->name), $isChecked ? $sprint->id : '', "data-product='{$productID}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::checkBox("sprints[$productID]", array($sprint->id => $sprint->name), '', "data-product='{$productID}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::hidden("sprintIdList[$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class='line-groups sprintGroup'>
|
||||
<?php foreach($noMergedSprints as $sprintID => $sprint):?>
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => $sprint->name), $sprint->id, "data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => $sprint->name), '', "data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user