Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
.main-col .doc-title .actions a + a {margin-left: 8px;}
|
||||
.main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;}
|
||||
#content .title {max-width: 54%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
#content .detail-content {padding-left: 10px;}
|
||||
#mainContent .scrollbar-hover {max-height: 2000px; overflow: scroll;}
|
||||
#sidebar {width: 275px;}
|
||||
#sidebar>.cell {width: 100%;}
|
||||
|
||||
@@ -27,4 +27,3 @@
|
||||
|
||||
#whitelistBox .checkbox-inline, #whitelistBox .radio-inline {margin-left: 10px; display: inline-block; padding-left: 0px; padding-right: 10px;}
|
||||
.main-table > .table-responsive {padding: 0 1px; background: #fff;}
|
||||
#teams_chosen ul li:first-child {max-width:256px; display: inline-block; vertical-align: middle;}
|
||||
|
||||
@@ -14,5 +14,4 @@
|
||||
.checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] {margin-top: 1px;}
|
||||
|
||||
#lifeTimeTips {display: none;}
|
||||
#teams_chosen ul > li:first-child {max-width: 425px;}
|
||||
#teams_chosen ul .label {margin-top: 3px;}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
$(function()
|
||||
{
|
||||
$('[id^="projects"]').change(function()
|
||||
{
|
||||
executionID = $(this).attr('id').replace('projects', '');
|
||||
$td = $(this).closest('td');
|
||||
if($td.find('[id^="syncStories"]').length == 0)
|
||||
{
|
||||
$td.append("<input type='hidden' id='syncStories" + executionID + "' name='syncStories[" + executionID + "]' value='no' />");
|
||||
}
|
||||
$("#syncStories" + executionID).val(confirm(confirmSyncStories) ? 'yes' : 'no');
|
||||
})
|
||||
});
|
||||
@@ -48,8 +48,11 @@ $(function()
|
||||
{
|
||||
if(systemMode == 'new')
|
||||
{
|
||||
var maxWidth = $('.chosen-container .chosen-drop.chosen-auto-max-width.in').width() - 70;
|
||||
|
||||
$('#teams_chosen ul .label').remove();
|
||||
$('#teams_chosen ul li:first').after(' <label class="label">' + projectCommon + '</label>');
|
||||
$('#teams_chosen ul > li:first').attr('style', 'display: inline-block; vertical-align: middle; max-width: ' + maxWidth + 'px');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -19,10 +19,14 @@ $(function()
|
||||
$(this).siblings('div').find('span').attr('title', tip);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
oldProject = $("#project").val();
|
||||
$('#project').change(function()
|
||||
{
|
||||
if(!confirm('修改所属项目后,执行关联的原项目需求如果要更改所属项目,需手动修改到新项目,是否继续修改?')) $("#project").val(oldProject).trigger("chosen:updated");
|
||||
if($('#submit').closest('td').find('#syncStories').length == 0)
|
||||
{
|
||||
$('#submit').after("<input type='hidden' id='syncStories' name='syncStories' value='no' />");
|
||||
}
|
||||
$("#syncStories").val(confirm(confirmSyncStories) ? 'yes' : 'no');
|
||||
});
|
||||
})
|
||||
|
||||
@@ -315,6 +315,7 @@ $lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon}
|
||||
$lang->execution->confirmDelete = "您确定删除{$lang->executionCommon}[%s]吗?";
|
||||
$lang->execution->confirmUnlinkMember = "您确定从该{$lang->executionCommon}中移除该用户吗?";
|
||||
$lang->execution->confirmUnlinkStory = "您确定从该{$lang->executionCommon}中移除该{$lang->SRCommon}吗?";
|
||||
$lang->execution->confirmSyncStories = "修改所属项目后,执行关联的{$lang->SRCommon}是否同步到新项目中?";
|
||||
$lang->execution->confirmUnlinkExecutionStory = "您确定从该项目中移除该{$lang->SRCommon}吗?";
|
||||
$lang->execution->notAllowedUnlinkStory = "该{$lang->SRCommon}已经与项目下{$lang->executionCommon}相关联,请从{$lang->executionCommon}中移除后再操作。";
|
||||
$lang->execution->notAllowRemoveProducts = "该{$lang->productCommon}中的{$lang->SRCommon}已与该{$lang->executionCommon}进行了关联,请取消关联后再操作。";
|
||||
|
||||
@@ -473,7 +473,7 @@ class executionModel extends model
|
||||
->setDefault('team', $this->post->name)
|
||||
->join('whitelist', ',')
|
||||
->stripTags($this->config->execution->editor->edit['id'], $this->config->allowedTags)
|
||||
->remove('products, branch, uid, plans')
|
||||
->remove('products, branch, uid, plans, syncStories')
|
||||
->get();
|
||||
|
||||
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
@@ -544,7 +544,7 @@ class executionModel extends model
|
||||
{
|
||||
$execution->parent = $execution->project;
|
||||
$execution->path = ",{$execution->project},{$executionID},";
|
||||
$this->changeProject($execution->project, $oldExecution->project, $executionID);
|
||||
$this->changeProject($execution->project, $oldExecution->project, $executionID, $this->post->syncStories);
|
||||
}
|
||||
|
||||
$this->file->updateObjectID($this->post->uid, $executionID, 'execution');
|
||||
@@ -649,7 +649,7 @@ class executionModel extends model
|
||||
{
|
||||
$execution->parent = $execution->project;
|
||||
$execution->path = ",{$execution->project},{$executionID},";
|
||||
$this->changeProject($execution->project, $oldExecution->project, $executionID);
|
||||
$this->changeProject($execution->project, $oldExecution->project, $executionID, isset($_POST['syncStories'][$executionID]) ? $_POST['syncStories'][$executionID] : 'no');
|
||||
}
|
||||
|
||||
$changedAccounts = array();
|
||||
@@ -2104,10 +2104,11 @@ class executionModel extends model
|
||||
* @param int $newProject
|
||||
* @param int $oldProject
|
||||
* @param int $executionID
|
||||
* @param string $syncStories yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function changeProject($newProject, $oldProject, $executionID)
|
||||
public function changeProject($newProject, $oldProject, $executionID, $syncStories = 'no')
|
||||
{
|
||||
if($newProject == $oldProject) return;
|
||||
|
||||
@@ -2157,6 +2158,22 @@ class executionModel extends model
|
||||
$addedAccounts[$account] = $account;
|
||||
}
|
||||
|
||||
/* Sync stories to new project. */
|
||||
if($syncStories == 'yes')
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$projectLinkedStories = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($newProject)->fetchPairs('story', 'story');
|
||||
$executionLinkedStories = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($executionID)->fetchAll();
|
||||
foreach($executionLinkedStories as $linkedStory)
|
||||
{
|
||||
if(isset($projectLinkedStories[$linkedStory->story])) continue;
|
||||
|
||||
$linkedStory->project = $newProject;
|
||||
$this->dao->insert(TABLE_PROJECTSTORY)->data($linkedStory)->exec();
|
||||
$this->action->create('story', $linkedStory->story, 'linked2project', '', $newProject);
|
||||
}
|
||||
}
|
||||
|
||||
if($addedAccounts) $this->loadModel('user')->updateUserView($newProject, 'project', $addedAccounts);
|
||||
}
|
||||
|
||||
@@ -2448,7 +2465,7 @@ class executionModel extends model
|
||||
*/
|
||||
public function getTeamPairsByProject($projectID = 0)
|
||||
{
|
||||
if(empty($projectID)) return array();
|
||||
if(empty($projectID) and $this->config->systemMode == 'new') return array();
|
||||
|
||||
$teams = $this->dao->select('id,name,type')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq(0)
|
||||
|
||||
@@ -132,4 +132,5 @@
|
||||
</form>
|
||||
</div>
|
||||
<?php js::set('weekend', $config->execution->weekend);?>
|
||||
<?php js::set('confirmSyncStories', $lang->execution->confirmSyncStories);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -173,4 +173,5 @@
|
||||
<?php js::set('errorSameProducts', $lang->execution->errorSameProducts);?>
|
||||
<?php js::set('unmodifiableProducts',$unmodifiableProducts);?>
|
||||
<?php js::set('tip', $lang->execution->notAllowRemoveProducts);?>
|
||||
<?php js::set('confirmSyncStories', $lang->execution->confirmSyncStories);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -705,6 +705,7 @@ class upgradeModel extends model
|
||||
$this->appendExec('15_3');
|
||||
case '15_4':
|
||||
$this->saveLogs('Execute 15_4');
|
||||
$this->execSQL($this->getUpgradeFile('15.4'));
|
||||
if(empty($this->config->isINT))
|
||||
{
|
||||
if(!$executeXuanxuan)
|
||||
@@ -908,6 +909,7 @@ class upgradeModel extends model
|
||||
case '15_2': $confirmContent .= file_get_contents($this->getUpgradeFile('15.2'));
|
||||
case '15_3': $confirmContent .= file_get_contents($this->getUpgradeFile('15.3'));
|
||||
case '15_4':
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('15.4'));
|
||||
if(empty($this->config->isINT))
|
||||
{
|
||||
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan4.2.sql';
|
||||
|
||||
Reference in New Issue
Block a user