* improve UI of productplan/view.

This commit is contained in:
Catouse
2018-05-29 15:41:12 +08:00
parent 564f445984
commit 9c5739bd86
5 changed files with 65 additions and 83 deletions
+3 -14
View File
@@ -1,14 +1,6 @@
.tabs{position:relative;}
.tabs .nav-tabs>li{margin-bottom:0px;}
.tabs .tab-content .tab-pane .action{position: absolute; right: 0px; top: 0px;}
.tabs .tab-content .tab-pane #queryBox{margin:0px; border-left:1px solid #ddd; border-right:1px solid #ddd;}
.tabs .tab-content .tab-pane #queryBox form{padding-left:0px;}
.hide-side .col-main {width: 100%;}
.hide-side .col-side .main-side {width: 0; display: none;}
#unlinkBugList, #unlinkStoryList{margin-bottom:5px;}
.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;}
.dropdown-menu > .menu-search .input-group {width:100%;}
.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666}
@@ -19,12 +11,9 @@
.dropdown-list > li > a:focus {color: #1a4f85;text-decoration: none;background-color: #ddd;}
.checkbox.btn{margin-top:0px}
#unlinkStoryList, #unlinkBugList{border:1px solid #ddd;}
.table-footer .text {line-height: 30px;}
.table-footer .table-actions {margin-right: 10px;}
#planInfo > div {padding-top: 15px;}
#queryBox form {margin: 0px !important;}
#moreOrLite {right: 0px !important;}
.linkBox #searchForm .form-actions {padding-bottom: 5px;}
.linkBox .table-header {padding: 8px 15px; border-bottom: 1px solid #cbd0db;}
#unlinkStoryList, #unlinkBugList {border-top: 1px solid #cbd0db;}
+7 -8
View File
@@ -1,17 +1,16 @@
function showLink(planID, type, orderBy, param)
function showLink(buildID, type, param)
{
var method = type == 'story' ? 'linkStory' : 'linkBug';
$.get(createLink('productplan', method, 'planID=' + planID + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy)), function(data)
{
var obj = type == 'story' ? '.tab-pane#stories .linkBox' : '.tab-pane#bugs .linkBox';
$(obj).html(data);
$('#' + type + 'List').closest('form').hide();
var formID = type == 'story' ? '#unlinkedStoriesForm' : '#unlinkedBugsForm';
$('[data-ride="table"]').table();
var $pane = $(type == 'story' ? '#stories' : '#bugs');
$pane.find('.main-table').hide();
var $linkBox = $pane.find('.linkBox').html(data).removeClass('hidden');
$linkBox.find('[data-ride="table"]').table();
$.toggleQueryBox(true, $linkBox.find('#queryBox'));
});
}
$(function()
{
if(link == 'true') showLink(planID, type, orderBy, param);
+6 -9
View File
@@ -13,8 +13,8 @@
<div id='queryBox' class='show'></div>
<div id='unlinkBugList'>
<form class='main-table table-bug' data-ride='table' method='post' id='unlinkedBugsForm' target='hiddenwin' action='<?php echo $this->createLink('productplan', 'linkBug', "planID=$plan->id&browseType=$browseType&param=$param&orderBy=$orderBy")?>'>
<div class='table-header'>
<div class='table-statistic'><?php echo html::icon('unlink');?> &nbsp;<strong><?php echo $lang->productplan->unlinkedBugs;?></strong></div>
<div class='table-header hl-primary text-primary strong'>
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedBugs;?>
</div>
<table class='table'>
<thead>
@@ -64,13 +64,10 @@
<?php echo html::submitButton($lang->productplan->linkBug, '', 'btn');?>
</div>
<?php endif;?>
<?php echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=$orderBy"), $lang->goback, '', "class='btn'");?>
<div class="btn-toolbar">
<?php echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=$orderBy"), $lang->goback, '', "class='btn'");?>
</div>
<div class='table-statistic'></div>
</div>
</form>
</div>
<script>
$(function()
{
ajaxGetSearchForm('#bugs .linkBox #queryBox');
})
</script>
+7 -10
View File
@@ -13,8 +13,8 @@
<div id='queryBox' class='show'></div>
<div id='unlinkStoryList'>
<form class="main-table table-story" data-ride="table" method="post" target='hiddenwin' id='unlinkedStoriesForm' action="<?php echo $this->createLink('productplan', 'linkStory', "planID=$plan->id&browseType=$browseType&param=$param&orderBy=$orderBy")?>">
<div class='table-header'>
<div class='table-statistic'><?php echo html::icon('unlink');?> &nbsp;<strong><?php echo $lang->productplan->unlinkedStories;?></strong></div>
<div class='table-header hl-primary text-primary strong'>
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedStories;?>
</div>
<table class='table'>
<thead>
@@ -72,13 +72,10 @@
<?php echo html::submitButton($lang->productplan->linkStory, '', 'btn');?>
</div>
<?php endif;?>
<?php echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=$orderBy"), $lang->goback, '', "class='btn'");?>
<div class="btn-toolbar">
<?php echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=$orderBy"), $lang->goback, '', "class='btn'");?>
</div>
<div class='table-statistic'></div>
</div>
</form>
</div>
<script>
$(function()
{
ajaxGetSearchForm('#stories .linkBox #queryBox');
})
</script>
</div>
+42 -42
View File
@@ -57,22 +57,22 @@
</div>
</div>
<div id='mainContent' class='main-content'>
<div class='tabs'>
<div class='tabs' id='tabsNav'>
<ul class='nav nav-tabs'>
<li class='<?php if($type == 'story') echo 'active'?>'><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story']) . ' ' . $lang->productplan->linkedStories;?></a></li>
<li class='<?php if($type == 'story') echo 'active'?>'><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-primary') . ' ' . $lang->productplan->linkedStories;?></a></li>
<?php if($config->global->flow != 'onlyStory'):?>
<li class='<?php if($type == 'bug') echo 'active'?>'><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug']) . ' ' . $lang->productplan->linkedBugs;?></a></li>
<li class='<?php if($type == 'bug') echo 'active'?>'><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->productplan->linkedBugs;?></a></li>
<?php endif;?>
<li><a href='#planInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan']) . ' ' . $lang->productplan->view;?></a></li>
<li><a href='#planInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan'], 'text-info') . ' ' . $lang->productplan->view;?></a></li>
</ul>
<div class='tab-content'>
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
<?php if(common::hasPriv('productplan', 'linkStory')):?>
<?php $canOrder = common::hasPriv('project', 'storySort');?>
<div class='action'>
<?php echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-sm btn-primary'");?>
<div class='actions'>
<?php echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
</div>
<div class='linkBox'></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
<form class='main-table table-story' data-ride='table' method='post' target='hiddenwin' action="<?php echo inlink('batchUnlinkStory', "planID=$plan->id&orderBy=$orderBy");?>">
<table class='table has-sort-head' id='storyList'>
@@ -333,10 +333,10 @@
</div>
<div id='bugs' class='tab-pane <?php if($type == 'bug') echo 'active';?>'>
<?php if(common::hasPriv('productplan', 'linkBug')):?>
<div class='action'>
<?php echo html::a("javascript:showLink($plan->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-sm btn-primary'");?>
<div class='actions'>
<?php echo html::a("javascript:showLink($plan->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-primary'");?>
</div>
<div class='linkBox'></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
<form class='main-table table-bug' data-ride='table' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "planID=$plan->id&orderBy=$orderBy");?>">
<table class='table has-sort-head' id='bugList'>
@@ -407,38 +407,38 @@
</form>
</div>
<div id='planInfo' class='tab-pane'>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->productplan->basicInfo;?></div>
<div class='detail-content'>
<table class='table table-data table-condensed table-borderless'>
<tr>
<th class='w-80px strong'><?php echo $lang->productplan->title;?></th>
<td><?php echo $plan->title;?></td>
</tr>
<?php if($product->type != 'normal'):?>
<tr>
<th><?php echo $lang->product->branch;?></th>
<td><?php echo $branches[$plan->branch];?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->productplan->begin;?></th>
<td><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
</tr>
<tr>
<th><?php echo $lang->productplan->end;?></th>
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
</tr>
<tr>
<th><?php echo $lang->productplan->desc;?></th>
<td><?php echo $plan->desc;?></td>
</tr>
</table>
</div>
</div>
<?php include '../../common/view/action.html.php';?>
</div>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->productplan->basicInfo;?></div>
<div class='detail-content'>
<table class='table table-data table-condensed table-borderless'>
<tr>
<th class='w-80px strong'><?php echo $lang->productplan->title;?></th>
<td><?php echo $plan->title;?></td>
</tr>
<?php if($product->type != 'normal'):?>
<tr>
<th><?php echo $lang->product->branch;?></th>
<td><?php echo $branches[$plan->branch];?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->productplan->begin;?></th>
<td><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
</tr>
<tr>
<th><?php echo $lang->productplan->end;?></th>
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
</tr>
<tr>
<th><?php echo $lang->productplan->desc;?></th>
<td><?php echo $plan->desc;?></td>
</tr>
</table>
</div>
</div>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
</div>
</div>