This commit is contained in:
王怡栋
2022-04-19 16:11:49 +08:00
9 changed files with 38 additions and 21 deletions
+2 -3
View File
@@ -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;}
+23 -7
View File
@@ -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()
{
+1 -1
View File
@@ -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;?>&nbsp;</span>
<?php
/* Fix bug#17342,由于默认分支的后续功能没做,暂时隐藏设置默认分支的功能 */
+1 -1
View File
@@ -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' : '') + '&param=skipParent'), function(data)
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=noclosed|' + (config.currentMethod == 'create' ? 'unexpired' : '') + '&param=skipParent'), function(data)
{
if(data)
{
+6 -4
View File
@@ -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');
+1 -1
View File
@@ -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');
}
}
+1 -1
View File
@@ -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&param=skipParent'), function(data)
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=unexpired|noclosed&param=skipParent'), function(data)
{
if(data)
{
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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)