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

This commit is contained in:
wangyidong
2018-05-24 09:35:01 +08:00
22 changed files with 112 additions and 45 deletions
+1
View File
@@ -1,3 +1,4 @@
.block-statistic .nav-stacked {overflow: auto; max-height: 220px;}
.nav > li > .btn {padding: 0 5px; line-height: 24px; margin: 3px; color: #3C4353;}
.dashboard .panel-body {max-height: 400px; overflow: auto;}
.dashboard .panel.table-scrolled .table-header-fixed {border-bottom: 1px solid #ddd; box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 4px 0 rgba(0,0,0,0.025);}
+17 -5
View File
@@ -69,10 +69,10 @@ function resizeBlock(event)
*/
function initTableHeader()
{
$('#dashboard .panel-block').each(function()
$('#dashboard .table-fixed-head').each(function()
{
var $panel = $(this);
var $table = $panel.find('.table:first');
var $table = $(this);
var $panel = $table.closest('.panel');
if(!$table.length || !$table.children('thead').length || ($panel.find('#assigntomeBlock').length && $panel.find('#assigntomeBlock > div').length > 1)) return;
var isFixed = $panel.find('.panel-body').height() < $table.outerHeight();
@@ -87,7 +87,7 @@ function initTableHeader()
var tableWidth = $table.width();
if(!$header.length)
{
$header = $('<div class="table-header-fixed" style="position: absolute; left: 0; top: 0; right: 0;"><table class="table table-fixed"></table></div>').css('right', $panel.width() - tableWidth).css('min-width', tableWidth);
$header = $('<div class="table-header-fixed" style="position: absolute; left: 0; top: 0; right: 0; padding: 10px 10px 0; background: #fff;"><table class="table table-fixed no-margin"></table></div>').css('right', $panel.width() - tableWidth - 20).css('min-width', tableWidth);
var $oldTableHead = $table.find('thead');
$oldTableHead.find('th').each(function(idx)
{
@@ -123,6 +123,16 @@ function initTableHeader()
$fixedTh.eq(idx).width($(this).width());
});
}
var timeoutCall = null;
$table.parent().off('scroll.initTableHeader').on('scroll.initTableHeader', function()
{
clearTimeout(timeoutCall);
var $tableContainer = $(this);
timeoutCall = setTimeout(function() {
$panel.toggleClass('table-scrolled', $tableContainer.scrollTop() > 0);
}, 200);
});
});
}
@@ -182,5 +192,7 @@ $(function()
// // $dashboard.find('ul.dashboard-actions').addClass('hide').children('li').addClass('right').appendTo($('#modulemenu > .nav'));
// $dashboard.find('[data-toggle=tooltip]').tooltip({container: 'body'});
// initTableHeader();
initTableHeader();
});
+5 -3
View File
@@ -12,7 +12,7 @@
?>
<style>
.block-bugs .c-id {width: 55px;}
.block-bugs .c-level {width: 50px;text-align: center;}
.block-bugs .c-level {width: 60px;text-align: center;}
.block-bugs .c-pri {width: 35px;text-align: center;}
.block-bugs .c-deadline {width: 95px;}
.block-bugs .c-status {width: 80px;}
@@ -21,7 +21,7 @@
.block-bugs.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<table class='table table-borderless table-fixed-head table-hover block-bugs <?php if(!$longBlock) echo 'block-sm'?>'>
<table class='table table-borderless table-fixed-head table-hover tablesorter block-bugs <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
<th class='c-id-xs'><?php echo $lang->idAB?></th>
@@ -44,7 +44,9 @@
<?php if($longBlock):?>
<td class='c-pri'><span class='label-pri label-pri-<?php echo $bug->pri?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri)?></span></td>
<?php endif;?>
<td class='c-severity'><span class='label-severity' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo zget($lang->bug->severityList, $bug->severity);?>'></span></td>
<td class='c-severity'>
<span class='label-severity' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'></span>
</td>
<td class='c-name' style='color: <?php echo $bug->color?>' title='<?php echo $bug->title?>'><?php echo $bug->title?></td>
<td class='c-status' title='<?php echo zget($lang->bug->statusList, $bug->status)?>'>
<span class="status-<?php echo $bug->status?>">
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-builds'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-builds'>
<thead>
<tr>
<th class='w-id text-center'><?php echo $lang->idAB?></th>
+1 -1
View File
@@ -21,7 +21,7 @@
.case-status-investigate {color: #a6aab8;}
.case-status-investigate > .label-dot {background-color: #006af1;}
</style>
<table class='table table-borderless table-hover table-fixed-head block-cases <?php if(!$longBlock) echo 'block-sm';?>'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-cases <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr class='text-center'>
<?php if($longBlock):?>
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-plan'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-plan'>
<thead>
<tr>
<?php if($longBlock):?>
@@ -11,13 +11,22 @@
*/
?>
<div id='assigntomeBlock'>
<?php foreach($hasViewPriv as $type => $bool):?>
<div id="<?php echo $type?>">
<?php include "{$type}block.html.php";?>
<ul class="nav nav-secondary">
<?php foreach($hasViewPriv as $type => $bool):?>
<li<?php if($type === 'todo') echo ' class="active"';?>><a data-tab href='#assigntomeTab-<?php echo $type;?>'><?php echo $lang->block->availableBlocks->$type;?></a></li>
<?php endforeach;?>
</ul>
<div class="tab-content">
<?php foreach($hasViewPriv as $type => $bool):?>
<div class="tab-pane<?php if($type === 'todo') echo ' active';?>" id="assigntomeTab-<?php echo $type?>">
<?php include "{$type}block.html.php";?>
</div>
<?php endforeach;?>
</div>
<?php endforeach;?>
</div>
<style>
#assigntomeBlock #todo,
#assigntomeBlock #task {border-bottom: 1px solid #eee;}
#assigntomeBlock {position: relative;}
#assigntomeBlock .block-todoes {padding-top: 10px}
#assigntomeBlock > .nav {position: absolute; top: -41px; left: 120px;}
#assigntomeBlock .block-todoes .todoes-form{top: -55px;}
</style>
+1 -1
View File
@@ -18,7 +18,7 @@
.block-products.block-sm .c-project {display: none;}
</style>
<div class="panel-body has-table block-products">
<table class='table table-borderless table-hover table-fixed-head table-fixed'>
<table class='table table-borderless table-hover table-fixed-head tablesorter table-fixed'>
<thead>
<tr>
<th class='c-name'><?php echo $lang->product->name;?></th>
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<div class="panel-body has-table">
<table class='table table-borderless table-hover table-fixed-head block-projects'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-projects tablesorter'>
<thead>
<tr class='text-center'>
<th class='c-name text-left'><?php echo $lang->project->name;?></th>
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed block-release'>
<table class='table table-borderless table-hover table-fixed tablesorter block-release'>
<thead>
<tr>
<?php if($longBlock):?>
+1 -1
View File
@@ -22,7 +22,7 @@
.block-stories.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-stories <?php if(!$longBlock) echo 'block-sm'?>'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-stories <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
<?php if($longBlock):?>
+2 -2
View File
@@ -13,7 +13,7 @@
<style>
.block-tasks .c-id {width: 55px;}
.block-tasks .c-pri {width: 45px;text-align: center;}
.block-tasks .c-estimate {width: 55px;}
.block-tasks .c-estimate {width: 60px;}
.block-tasks .c-deadline {width: 95px;}
.block-tasks .c-status {width: 80px;}
.block-tasks.block-sm .estimate,
@@ -22,7 +22,7 @@
.block-tasks.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-tasks <?php if(!$longBlock) echo 'block-sm';?>'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-tasks <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr>
<th class='c-id-xs'><?php echo $lang->idAB;?></th>
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-testtask'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-testtask'>
<thead>
<tr class='text-center'>
<?php if($longBlock):?>
+2 -2
View File
@@ -11,13 +11,13 @@
*/
?>
<style>
.block-todoes .panel-body {position: relative; padding-top: 42px;}
.block-todoes .panel-body {position: relative; padding-top: 42px; overflow: visible;}
.block-todoes .todoes-input {position: absolute;top: 0;right: 0;left: 0;padding: 0 20px 20px 20px;}
.block-todoes .todoes-input .form-control::-webkit-input-placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes-input .form-control::-moz-placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes-input .form-control:-ms-input-placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes-input .form-control::placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes {padding-left: 0;margin: 0 -10px;}
.block-todoes .todoes {padding-left: 0;margin: 0 -10px; max-height: 350px; overflow: auto;}
.block-todoes .todoes > li {position: relative;padding: 5px 10px 5px 35px;list-style: none;}
.block-todoes .todoes > li:hover {background-color: #e9f2fb;}
.block-todoes .todo-title {display: block;padding: 5px;}
+10 -10
View File
@@ -35,11 +35,11 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;<?php echo $lang->bug->byQuery;?></a></li>
<li class='right'>
<div class='btn-group' id='createActionMenu'>
<?php
<?php
$misc = common::hasPriv('bug', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
$link = common::hasPriv('bug', 'create') ? $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID") : '#';
echo html::a($link, "<i class='icon icon-plus'></i>" . $lang->bug->create, '', $misc);
$misc = common::hasPriv('bug', 'batchCreate') ? '' : "disabled";
$link = common::hasPriv('bug', 'batchCreate') ? $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID") : '#';
?>
@@ -60,7 +60,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<span class='caret'></span>
</a>
<ul class='dropdown-menu' id='exportActionMenu'>
<?php
<?php
$misc = common::hasPriv('bug', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->bug->export, '', $misc) . "</li>";
@@ -84,7 +84,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
</div>
<div class="btn-toolbar pull-left">
<?php
<?php
$menus = customModel::getFeatureMenu($this->moduleName, $this->methodName);
$moreLabel = $lang->more;
$moreLabelActive = '';
@@ -151,15 +151,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<i class="icon icon-export muted"></i> <span class="text"> <?php echo $lang->export;?></span> <span class="caret"></span></button>
</button>
<ul class='dropdown-menu' id='exportActionMenu'>
<?php
<?php
$link = $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy");
echo "<li>" . html::a($link, $lang->bug->export, '', "class='export'") . "</li>";
?>
</ul>
</div>
<?php endif;?>
<?php
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
<?php endif;?>
<?php
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
@@ -167,7 +167,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
}
else
{
common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'");
common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'");
}
?>
</div>
@@ -388,7 +388,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
<script>
$('#' + bugBrowseType + 'Tab').addClass('active');
$('#module' + moduleID).addClass('active');
$('#module' + moduleID).addClass('active');
<?php if($browseType == 'bysearch'):?>
$shortcut = $('#QUERY<?php echo (int)$param;?>Tab');
if($shortcut.size() > 0)
+1 -1
View File
@@ -32,7 +32,7 @@ js::set('page', 'confirmbug');
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->bug->assignedTo;?></th>
<td class='w-p25-f'><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-controlform-control chosen'");?></td>
<td class='w-p25-f'><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
+5 -3
View File
@@ -4,9 +4,11 @@ js::import($jsRoot . 'jquery/tablesorter/min.js');
js::import($jsRoot . 'jquery/tablesorter/metadata.js');
?>
<style>
table.tablesorter tr.tablesorter-headerRow .header.tablesorter-headerUnSorted .tablesorter-header-inner:after{font-family: NewZenIcon; font-weight: normal; content: "\e6bd"; font-size: 14px;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortUp .tablesorter-header-inner:after{font-family: NewZenIcon; font-weight: normal; content: "\e6b9"; font-size: 14px; color: #03C;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortDown .tablesorter-header-inner:after{font-family: NewZenIcon; font-weight: normal; content: "\e6b8"; font-size: 14px; color: #03C;}
.tablesorter-header-inner {cursor: pointer;}
.tablesorter-header-inner:hover {color: #006af1;}
table.tablesorter tr.tablesorter-headerRow .header.tablesorter-headerUnSorted .tablesorter-header-inner:after {font-family: ZentaoIcon; font-weight: normal; content: "\f0dc"; font-size: 14px;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortUp .tablesorter-header-inner:after{font-family: ZentaoIcon; font-weight: normal; content: "\f0d8"; font-size: 14px; color: #03C;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortDown .tablesorter-header-inner:after{font-family: ZentaoIcon; font-weight: normal; content: "\f0d7"; font-size: 14px; color: #03C;}
table.tablesorter tr.tablesorter-headerRow .header.sorter-false .tablesorter-header-inner:after{content:"";}
</style>
<script>
+1 -1
View File
@@ -6,4 +6,4 @@
.product + .product {margin-left: 0;}
#productsBox .row > .product.has-branch label {margin-right: 40%;}
#productsBox .row > .product.has-branch > .form-control,
#productsBox .row > .product.has-branch > .chosen-container {position: absolute; width: 40%!important; right: 3px; top: 3px;}
#productsBox .row > .product.has-branch > .chosen-container {position: absolute; width: 40%!important; right: 1px; top: 1px;}
+3 -2
View File
@@ -130,12 +130,13 @@
}
elseif($hasGroupPriv and $menuType == 'group')
{
$groupBy = isset($groupBy) ? $groupBy : '';
$groupBy = isset($groupBy) ? $groupBy : '';
$active = !empty($groupBy) ? 'btn-active-text' : '';
$current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
if(empty($current)) $current = $lang->testcase->groups[''];
echo "<div id='groupTab' class='btn-group'>";
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
echo html::a('javascript:;', "<span class='text'>{$current}</span>" . " <span class='caret'></span>", '', "class='btn btn-link {$active}' data-toggle='dropdown'");
echo "<ul class='dropdown-menu'>";
foreach($lang->testcase->groups as $key => $value)
+22
View File
@@ -48,3 +48,25 @@ $(function()
parent.location.href = link;
})
});
function createProduct()
{
var onlybody = config.onlybody;
config.onlybody = 'no';
var link = createLink('product', 'create');
config.onlybody = onlybody;
parent.location.href = link;
}
function createProject()
{
var onlybody = config.onlybody;
config.onlybody = 'no';
var link = createLink('project', 'create');
config.onlybody = onlybody;
parent.location.href = link;
}
+18
View File
@@ -198,10 +198,19 @@
<h4 class="modal-title"><?php echo $lang->project->selectProject;?></h4>
</div>
<div class="modal-body">
<?php if(empty($projects)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->project->noProject;?></span>
<?php echo html::a("javascript:createProject()", "<i class='icon icon-plus'></i> " . $lang->project->create, '', "class='btn btn-info'");?>
</p>
</div>
<?php else:?>
<div class='input-group'>
<?php echo html::select('project', $projects, '', "class='form-control chosen'");?>
<span class='input-group-btn'><?php echo html::commonButton($lang->todo->reasonList['task'], "id='toTaskButton'", 'btn btn-primary');?></span>
</div>
<?php endif;?>
</div>
</div>
</div>
@@ -214,11 +223,20 @@
<h4 class="modal-title"><?php echo $lang->product->select;?></h4>
</div>
<div class="modal-body">
<?php if(empty($products)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->product->noProduct;?></span>
<?php echo html::a("javascript:createProduct()", "<i class='icon icon-plus'></i> " . $lang->product->create, '', "class='btn btn-info'");?>
</p>
</div>
<?php else:?>
<div class='input-group'>
<?php echo html::select('product', $products, '', "class='form-control chosen'");?>
<span class='input-group-btn'><?php echo html::commonButton($lang->todo->reasonList['story'], "id='toStoryButton'", 'btn btn-primary');?></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->todo->reasonList['bug'], "id='toBugButton'", 'btn btn-primary');?></span>
</div>
<?php endif;?>
</div>
</div>
</div>
+2 -2
View File
File diff suppressed because one or more lines are too long