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

This commit is contained in:
wangyidong
2019-11-20 16:52:34 +08:00
17 changed files with 128 additions and 69 deletions
-5
View File
@@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = 'Script-Test';
$lang->bug->typeList['designdefect'] = 'Design Fehler';
$lang->bug->typeList['others'] = 'Andere';
$lang->bug->discardedTypeList['interface'] = 'UI Optimierung';
$lang->bug->discardedTypeList['newfeature'] = 'Neues Feature';
$lang->bug->discardedTypeList['designchange'] = 'Design Änderung';
$lang->bug->discardedTypeList['trackthings'] = 'Arbeit Verfolgen';
$lang->bug->statusList[''] = '';
$lang->bug->statusList['active'] = 'Aktiv';
$lang->bug->statusList['resolved'] = 'Gelöst';
-5
View File
@@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = 'TestScript';
$lang->bug->typeList['designdefect'] = 'DesignDefect';
$lang->bug->typeList['others'] = 'Others';
$lang->bug->discardedTypeList['interface'] = 'Interface';
$lang->bug->discardedTypeList['designchange'] = 'DesignChange';
$lang->bug->discardedTypeList['newfeature'] = 'NewFeature';
$lang->bug->discardedTypeList['trackthings'] = 'Tracking';
$lang->bug->statusList[''] = '';
$lang->bug->statusList['active'] = 'Active';
$lang->bug->statusList['resolved'] = 'Resolved';
-5
View File
@@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = 'Script automatisation';
$lang->bug->typeList['designdefect'] = 'Erreur de Design';
$lang->bug->typeList['others'] = 'Autres';
$lang->bug->discardedTypeList['interface'] = 'Interface';
$lang->bug->discardedTypeList['designchange'] = 'Design Change';
$lang->bug->discardedTypeList['newfeature'] = 'Nouvelle fonctionnalité';
$lang->bug->discardedTypeList['trackthings'] = 'Tracking';
$lang->bug->statusList[''] = '';
$lang->bug->statusList['active'] = 'Actif';
$lang->bug->statusList['resolved'] = 'Résolu';
-5
View File
@@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = '测试脚本';
$lang->bug->typeList['designdefect'] = '设计缺陷';
$lang->bug->typeList['others'] = '其他';
$lang->bug->discardedTypeList['interface'] = '界面优化';
$lang->bug->discardedTypeList['designchange'] = '设计变更';
$lang->bug->discardedTypeList['newfeature'] = "新增{$lang->storyCommon}";
$lang->bug->discardedTypeList['trackthings'] = '事务跟踪';
$lang->bug->statusList[''] = '';
$lang->bug->statusList['active'] = '激活';
$lang->bug->statusList['resolved'] = '已解决';
+2 -2
View File
@@ -28,14 +28,14 @@ class datatable extends control
* @access public
* @return void
*/
public function ajaxSave()
public function ajaxSave($type = '')
{
if(!empty($_POST))
{
$account = $this->app->user->account;
if($account == 'guest') $this->send(array('result' => 'fail', 'target' => $target, 'message' => 'guest.'));
$name = 'datatable.' . $this->post->target . '.' . $this->post->name;
$name = $type == 'allModule' ? 'project.task.allModule' : 'datatable.' . $this->post->target . '.' . $this->post->name;
$this->loadModel('setting')->setItem($account . '.' . $name, $this->post->value);
if($this->post->global) $this->setting->setItem('system.' . $name, $this->post->value);
+1 -1
View File
@@ -19,7 +19,7 @@ $lang->datatable->branch = 'Branch';
$lang->datatable->platform = 'Platform';
$lang->datatable->showModule = 'Show module names on the list page';
$lang->datatable->showModuleAB = 'Show Module Names';
$lang->datatable->showModuleAB = 'Show modules in the list';
$lang->datatable->showModuleList[] = 'N/A';
$lang->datatable->showModuleList['base'] = 'Base Node';
$lang->datatable->showModuleList['end'] = 'End Node';
+5 -5
View File
@@ -22,21 +22,21 @@ function convertStringToDate(dateString)
*/
function computeEndDate(delta)
{
beginDate = $('#begin').val();
var beginDate = $('#begin').val();
if(!beginDate) return;
delta = parseInt(delta);
var delta = parseInt(delta);
beginDate = convertStringToDate(beginDate);
if((delta == 7 || delta == 14) && (beginDate.getDay() == 1))
{
delta = (weekend == 2) ? (delta - 2) : (delta - 1);
}
currentBeginDate = beginDate.toString('yyyy-MM-dd');
endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd');
var currentBeginDate = beginDate.toString('yyyy-MM-dd');
var endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd');
$('#begin').val(currentBeginDate);
$('#end').val(endDate);
$('#end').val(endDate).datetimepicker('update');
}
$('#begin').on('change', function()
+2 -1
View File
@@ -189,6 +189,7 @@ class project extends control
$memberPairs = array();
foreach($this->view->teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
$extra = (isset($this->config->project->task->allModule) && $this->config->project->task->allModule == 1) ? 'allModule' : '';
$showModule = !empty($this->config->datatable->projectTask->showModule) ? $this->config->datatable->projectTask->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($projectID, 'task', $showModule) : array();
@@ -209,7 +210,7 @@ class project extends control
$this->view->productID = $productID;
$this->view->modules = $this->tree->getTaskOptionMenu($projectID);
$this->view->moduleID = $moduleID;
$this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'));
$this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra);
$this->view->memberPairs = $memberPairs;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
$this->view->setShowModule = true;
+5 -37
View File
@@ -1,10 +1,8 @@
$(function()
{
var boardID = '';
var onlybody = config.requestType == 'GET' ? "&onlybody=yes" : "?onlybody=yes";
var isFirefox = $.zui.browser.firefox;
$.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
var $kanban = $('#kanban');
var kanbanModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width:800});
var stageMap =
{
@@ -18,34 +16,6 @@ $(function()
}
};
// Get scrollbar width
var getScrollbarWidth = function ()
{
var outer = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.width = "100px";
outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
document.body.appendChild(outer);
var widthNoScroll = outer.offsetWidth;
// force scrollbars
outer.style.overflow = "scroll";
// add innerdiv
var inner = document.createElement("div");
inner.style.width = "100%";
outer.appendChild(inner);
var widthWithScroll = inner.offsetWidth;
// remove divs
outer.parentNode.removeChild(outer);
return widthNoScroll - widthWithScroll;
};
var scrollbarWidth = getScrollbarWidth();
var fixBoardWidth = function()
{
var $table = $kanban.find('.table');
@@ -53,12 +23,12 @@ $(function()
var $cBoards = $table.find('thead>tr>th.c-board:not(.c-side)');
var boardCount = $cBoards.length;
var $cSide = $table.find('thead>tr>th.c-board.c-side');
var totalWidth = kanbanWidth - scrollbarWidth;
var totalWidth = kanbanWidth;
if ($cSide.length) totalWidth = totalWidth - ($cSide.outerWidth() + 5);
var cBoardWidth = Math.floor(totalWidth/boardCount) - 16;
$cBoards.not(':last').width(cBoardWidth);
$cBoards.first().width(cBoardWidth + 5);
$kanban.find('.boards > .board').width(cBoardWidth + 16 - 22);
$cBoards.width(cBoardWidth);
$kanban.find('.boards > .board').width(cBoardWidth);
};
fixBoardWidth();
$(window).on('resize', fixBoardWidth);
@@ -70,12 +40,10 @@ $(function()
if(selfClose == 1) $kanban.load(location.href + ' #kanban', fixBoardWidth);
};
var lastOperation;
var dropTo = function(id, from, to, type)
{
if(stageMap[type][from] && stageMap[type][from][to])
{
lastOperation = {id: id, from: from, to: to};
$.post(createLink(type, stageMap[type][from][to], 'stage=' + to), {'storyIDList[]':[id]}, function()
{
refresh();
+1
View File
@@ -72,6 +72,7 @@ $lang->project->effort = 'Effort';
$lang->project->relatedMember = 'Team';
$lang->project->watermark = 'Exported by ZenTao';
$lang->project->viewByUser = 'By User';
$lang->project->showAllModule = "Show {$lang->productCommon} modules";
$lang->project->start = 'Start';
$lang->project->activate = 'Activate';
+4
View File
@@ -72,6 +72,10 @@ $lang->project->effort = '日志';
$lang->project->relatedMember = '相关成员';
$lang->project->watermark = '由禅道导出';
$lang->project->viewByUser = '按用户查看';
$lang->project->showAllModule = "是否显示完整{$lang->productCommon}模块";
$lang->project->showAllModuleList[0] = '不显示';
$lang->project->showAllModuleList[1] = '显示';
$lang->project->start = "开始";
$lang->project->activate = "激活";
+1 -1
View File
@@ -2378,7 +2378,7 @@ class projectModel extends model
$this->config->project->search['actionURL'] = $actionURL;
$this->config->project->search['queryID'] = $queryID;
$this->config->project->search['params']['project']['values'] = array(''=>'', $projectID => $projects[$projectID], 'all' => $this->lang->project->allProject);
$this->config->project->search['params']['module']['values'] = $this->loadModel('tree')->getTaskOptionMenu($projectID, $startModuleID = 0);
$this->config->project->search['params']['module']['values'] = $this->loadModel('tree')->getTaskOptionMenu($projectID, 0, 0, 'allModule');
$this->loadModel('search')->setSearchParams($this->config->project->search);
}
+35
View File
@@ -166,6 +166,7 @@ js::set('browseType', $browseType);
<div class="text-center">
<?php common::printLink('tree', 'browsetask', "rootID=$projectID&productID=0", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
<hr class="space-sm" />
<?php echo html::a('#showAllModuleModal', $lang->project->showAllModule, '', "data-toggle='modal' class='text-secondary small'");?><br/>
</div>
</div>
</div>
@@ -338,6 +339,24 @@ js::set('browseType', $browseType);
<?php endif;?>
</div>
</div>
<div class="modal fade" id="showAllModuleModal" tabindex="-1" role="dialog">
<div class="modal-dialog w-600px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><i class="icon-cog"></i> <?php echo $lang->project->showAllModule;?></h4>
</div>
<div class="modal-body">
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->createLink('datatable', 'ajaxSave')?>'>
<p>
<span><?php echo html::radio('showAllModule', $lang->project->showAllModuleList, isset($config->project->task->allModule) ? $config->project->task->allModule : 0);?></span>
<button type='button' id='setShowAllModule' class='btn btn-primary'><?php echo $lang->save?></button>
</p>
</form>
</div>
</div>
</div>
</div>
<?php js::set('replaceID', 'taskList')?>
<script>
$(function()
@@ -408,6 +427,22 @@ $(function()
.replace('%left%', checkedLeft.toFixed(1));
}
})
$('#setShowAllModule').click(function()
{
var name = 'allModule';
var value = $('#showAllModuleModal input[name="showAllModule"]:checked').val();
$.ajax(
{
type: "POST",
dataType: 'json',
data: {name: name, value: value},
success:function(){window.location.reload();},
url: '<?php echo $this->createLink('datatable', 'ajaxSave', 'type=allModule')?>'
});
});
});
</script>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -226,7 +226,7 @@ class tree extends control
$this->view->newModule = $newModule;
$this->view->currentProject = $currentProject;
$this->view->projectModules = $this->tree->getTaskOptionMenu($currentProject, $productID);
$this->view->modules = $this->tree->getTaskTreeMenu($rootID, $productID, $rooteModuleID = 0, array('treeModel', 'createTaskManageLink'));
$this->view->modules = $this->tree->getTaskTreeMenu($rootID, $productID, $rooteModuleID = 0, array('treeModel', 'createTaskManageLink'), 'allModule');
$this->view->sons = $this->tree->getTaskSons($rootID, $productID, $currentModuleID);
$this->view->parentModules = $parentModules;
$this->view->currentModuleID = $currentModuleID;
+2 -1
View File
@@ -1706,7 +1706,8 @@ class treeModel extends model
while($module = $stmt->fetch())
{
/* Ignore useless module for task. */
if($keepModules and !isset($keepModules[$module->id])) continue;
$allModule = (isset($this->config->project->task->allModule) and ($this->config->project->task->allModule == 1));
if($keepModules and !isset($keepModules[$module->id]) and !$allModule) continue;
if(isset($parent[$module->id]))
{
$module->children = $parent[$module->id]->children;
+25
View File
@@ -23,5 +23,30 @@ $config->upgrade->bearychat['zh-tw'] = '倍洽';
$config->upgrade->bearychat['en'] = 'Bearychat';
$config->upgrade->bearychat['de'] = 'Bearychat';
$config->upgrade->discardedBugTypes['de']['interface'] = 'UI Optimierung';
$config->upgrade->discardedBugTypes['de']['newfeature'] = 'Neues Feature';
$config->upgrade->discardedBugTypes['de']['designchange'] = 'Design Änderung';
$config->upgrade->discardedBugTypes['de']['trackthings'] = 'Arbeit Verfolgen';
$config->upgrade->discardedBugTypes['en']['interface'] = 'Interface';
$config->upgrade->discardedBugTypes['en']['designchange'] = 'DesignChange';
$config->upgrade->discardedBugTypes['en']['newfeature'] = 'NewFeature';
$config->upgrade->discardedBugTypes['en']['trackthings'] = 'Tracking';
$config->upgrade->discardedBugTypes['fr']['interface'] = 'Interface';
$config->upgrade->discardedBugTypes['fr']['designchange'] = 'Design Change';
$config->upgrade->discardedBugTypes['fr']['newfeature'] = 'Nouvelle fonctionnalité';
$config->upgrade->discardedBugTypes['fr']['trackthings'] = 'Tracking';
$config->upgrade->discardedBugTypes['zh-cn']['interface'] = '界面优化';
$config->upgrade->discardedBugTypes['zh-cn']['designchange'] = '设计变更';
$config->upgrade->discardedBugTypes['zh-cn']['newfeature'] = "新增需求";
$config->upgrade->discardedBugTypes['zh-cn']['trackthings'] = '事务跟踪';
$config->upgrade->discardedBugTypes['zh-tw']['interface'] = '界面優化';
$config->upgrade->discardedBugTypes['zh-tw']['designchange'] = '設計變更';
$config->upgrade->discardedBugTypes['zh-tw']['newfeature'] = "新增需求";
$config->upgrade->discardedBugTypes['zh-tw']['trackthings'] = '事務跟蹤';
$config->delete['10.6'][] = 'module/chat/ext/control/extensions.php';
$config->delete['10.6'][] = 'module/common/ext/model/xuanxuan.php';
+44
View File
@@ -3444,4 +3444,48 @@ class upgradeModel extends model
public function appendExec($zentaoVersion)
{
}
/**
* Fix bug typeList.
*
* @access public
* @return bool
*/
public function fixBugTypeList()
{
foreach($this->config->upgrade->discardedBugTypes as $langCode => $types)
{
$bugs = $this->dao->select('type')->from(TABLE_BUG)->where('type')->in(array_keys($types))->fetchAll('type');
if(empty($bugs)) return true;
$usedTypes = array_keys($bugs);
$customedTypeList = $this->dao->select('*')->from(TABLE_LANG)
->where('lang')->in("$langCode,all")
->andWhere('module')->eq('bug')
->andWhere('section')->eq('typeList')
->fetchPairs('`key`');
$typesToSave = array_diff($usedTypes, $customedTypeList);
if(empty($typesToSave)) continue;
$langs = array();
foreach($typesToSave as $type) $langs[$type] = $types[$type];
if(empty($customedTypeList))
{
$lang = new stdclass;
$lang->bug = new stdclass;
$lang->productCommon = '';
$lang->projectCommon = '';
$lang->more = '';
$langFile = $this->app->getModuleRoot() . DS . 'bug' . DS . 'lang' . DS . $langCode . '.php';
if(is_file($langFile)) include $langFile;
$langs = array_merge($lang->bug->typeList, $langs);
}
foreach($langs as $type => $typeName) $this->loadModel('custom')->setItem("{$langCode}.bug.typeList.{$type}.1", $typeName);
}
return true;
}
}