Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -4,9 +4,8 @@
|
||||
|
||||
a.setDefault {padding-left: 8px !important}
|
||||
|
||||
td.flex {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center;}
|
||||
td.flex .label-primary {min-width: 40px;}
|
||||
td.flex .setDefault {min-width: 120px;}
|
||||
td.branchName > span.text-ellipsis {display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
|
||||
td.branchName > span {vertical-align: middle;}
|
||||
|
||||
#mergeBranch .form-actions {padding-top: 20px;}
|
||||
.modal-body {padding-top: 0;}
|
||||
|
||||
@@ -37,13 +37,29 @@ $(function()
|
||||
}
|
||||
});
|
||||
|
||||
$('td.c-name.flex').mouseenter(function()
|
||||
{
|
||||
$(this).find('.setDefault').removeClass('hidden');
|
||||
}).mouseleave(function()
|
||||
{
|
||||
$(this).find('.setDefault').addClass('hidden');
|
||||
});
|
||||
//$('td.c-name.flex').mouseenter(function()
|
||||
//{
|
||||
// $(this).find('.setDefault').removeClass('hidden');
|
||||
// if($(this).find('span.label-primary').length > 0)
|
||||
// {
|
||||
// $(this).find('span.text-ellipsis').css('max-width', 'calc(100% - 50px)');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $(this).find('span.text-ellipsis').css('max-width', 'calc(100% - 120px)');
|
||||
// }
|
||||
//}).mouseleave(function()
|
||||
//{
|
||||
// $(this).find('.setDefault').addClass('hidden');
|
||||
// if($(this).find('span.label-primary').length > 0)
|
||||
// {
|
||||
// $(this).find('span.text-ellipsis').css('max-width', 'calc(100% - 50px)');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $(this).find('span.text-ellipsis').css('max-width', '100%');
|
||||
// }
|
||||
//});
|
||||
|
||||
$("input[id*='branchIDList']").change(function()
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<?php echo $isMain ? '' : '<i class="icon icon-move"></i>';?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='c-name flex branchName' title='<?php echo $branch->name;?>'>
|
||||
<td class='c-name branchName' title='<?php echo $branch->name;?>'>
|
||||
<span class="text-ellipsis"><?php echo $branch->name;?> </span>
|
||||
<?php
|
||||
/* Fix bug#17342,由于默认分支的后续功能没做,暂时隐藏设置默认分支的功能 */
|
||||
|
||||
@@ -184,7 +184,7 @@ function loadPlans(product, branchID)
|
||||
var branchID = typeof(branchID) == 'undefined' ? 0 : branchID;
|
||||
var index = $(product).attr('id').replace('products', '');
|
||||
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=' + (config.currentMethod == 'create' ? 'unexpired' : '') + '¶m=skipParent'), function(data)
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=noclosed|' + (config.currentMethod == 'create' ? 'unexpired' : '') + '¶m=skipParent'), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
|
||||
@@ -181,12 +181,12 @@ class productplanModel extends model
|
||||
*
|
||||
* @param array|int $product
|
||||
* @param int|string|array $branch
|
||||
* @param string $expired
|
||||
* @param string $param unexpired|noclosed
|
||||
* @param bool $skipParent
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairs($product = 0, $branch = '', $expired = '', $skipParent = false)
|
||||
public function getPairs($product = 0, $branch = '', $param = '', $skipParent = false)
|
||||
{
|
||||
$date = date('Y-m-d');
|
||||
$plans = $this->dao->select('t1.id,t1.title,t1.parent,t1.begin,t1.end,t2.name as branchName,t3.type as productType')->from(TABLE_PRODUCTPLAN)->alias('t1')
|
||||
@@ -195,7 +195,8 @@ class productplanModel extends model
|
||||
->where('t1.product')->in($product)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($branch !== '')->andWhere('t1.branch')->in($branch)->fi()
|
||||
->beginIF($expired == 'unexpired')->andWhere('t1.end')->ge($date)->fi()
|
||||
->beginIF(strpos($param, 'unexpired') !== false)->andWhere('t1.end')->ge($date)->fi()
|
||||
->beginIF(strpos($param, 'noclosed') !== false)->andWhere('t1.status')->ne('closed')->fi()
|
||||
->orderBy('t1.begin desc')
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -223,7 +224,7 @@ class productplanModel extends model
|
||||
*
|
||||
* @param array|int $product
|
||||
* @param int $branch
|
||||
* @param string $param skipParent|withMainPlan|unexpired
|
||||
* @param string $param skipParent|withMainPlan|unexpired|noclosed
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -236,6 +237,7 @@ class productplanModel extends model
|
||||
->where('product')->in($product)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF(strpos($param, 'unexpired') !== false)->andWhere('end')->ge($date)->fi()
|
||||
->beginIF(strpos($param, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
->beginIF($branch !== 'all' or $branch !== '')->andWhere("branch")->in($branch)->fi()
|
||||
->orderBy('begin desc')
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -480,7 +480,7 @@ class project extends control
|
||||
$products = $this->product->getProducts($copyProjectID);
|
||||
foreach($products as $product)
|
||||
{
|
||||
$productPlans[$product->id] = $this->loadModel('productplan')->getPairs($product->id);
|
||||
$productPlans[$product->id] = $this->loadModel('productplan')->getPairs($product->id, '', 'noclosed');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ function loadPlans(product, branchID)
|
||||
|
||||
if(productID != 0)
|
||||
{
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=unexpired¶m=skipParent'), function(data)
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=unexpired|noclosed¶m=skipParent'), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
|
||||
@@ -347,7 +347,7 @@ class story extends control
|
||||
$this->view->users = $users;
|
||||
$this->view->moduleID = $moduleID ? $moduleID : (int)$this->cookie->lastStoryModule;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch, 'skipParent|unexpired'));
|
||||
$this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch, 'skipParent|unexpired|noclosed'));
|
||||
$this->view->planID = $planID;
|
||||
$this->view->source = $source;
|
||||
$this->view->sourceNote = $sourceNote;
|
||||
@@ -536,7 +536,7 @@ class story extends control
|
||||
}
|
||||
$this->view->titles = $titles;
|
||||
}
|
||||
$plans = $this->loadModel('productplan')->getPairsForStory($productID, ($branch === 'all' or !in_array($branch, array_keys($branches))) ? 0 : $branch, 'skipParent|unexpired');
|
||||
$plans = $this->loadModel('productplan')->getPairsForStory($productID, ($branch === 'all' or !in_array($branch, array_keys($branches))) ? 0 : $branch, 'skipParent|unexpired|noclosed');
|
||||
$plans['ditto'] = $this->lang->story->ditto;
|
||||
|
||||
$priList = (array)$this->lang->story->priList;
|
||||
|
||||
@@ -326,7 +326,7 @@ $(function()
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.module-name {display: inline-block; max-width: 410px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
|
||||
.module-name {display: inline-block; max-width: calc(100% - 85px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
|
||||
</style>
|
||||
<?php
|
||||
if(strpos($viewType, 'doc') !== false)
|
||||
|
||||
Reference in New Issue
Block a user