* fix UI of views with querybox.

This commit is contained in:
Catouse
2018-05-29 18:28:44 +08:00
parent bd406387b5
commit 6d3b51c826
16 changed files with 31 additions and 58 deletions
-4
View File
@@ -20,7 +20,3 @@ function changeProduct(product)
link = createLink('company', 'dynamic', 'type=product&param=' + product);
location.href = link;
}
$(function(){
if(browseType == 'bysearch') ajaxGetSearchForm();
})
+1 -1
View File
@@ -27,7 +27,7 @@ $(function(){
$('#' + browseType + 'Tab').addClass('active');
if(browseType == "bysearch")
{
ajaxGetSearchForm();
$.toggleQueryBox(true);
browseBySearch();
}
});
+1 -4
View File
@@ -129,7 +129,7 @@
</div>
</div>
<div class="main-col">
<div class="cell" id="queryBox"></div>
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox"></div>
<form class="main-table table-story skip-iframe-modal" method="post" id='productStoryForm'>
<div class="table-header fixed-right">
<nav class="btn-toolbar pull-right"></nav>
@@ -360,9 +360,6 @@
<script>
var moduleID = <?php echo $moduleID?>;
$('#module<?php echo $moduleID;?>').closest('li').addClass('active');
<?php if($browseType == 'bysearch'):?>
if($('#query li.active').size() == 0) ajaxGetSearchForm();
<?php endif;?>
$(function()
{
-1
View File
@@ -1,5 +1,4 @@
$(function()
{
$('#' + browseType + 'Tab').addClass('active');
ajaxGetSearchForm();
});
+1 -4
View File
@@ -164,7 +164,7 @@ js::set('browseType', $browseType);
</div>
</div>
<div class="main-col">
<div class="cell" id="queryBox"></div>
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox"></div>
<form class="main-table table-task skip-iframe-modal" method="post" id='projectTaskForm'>
<div class="table-header fixed-right">
<nav class="btn-toolbar pull-right"></nav>
@@ -310,9 +310,6 @@ js::set('browseType', $browseType);
</div>
<?php js::set('replaceID', 'taskList')?>
<script>
<?php if($browseType == 'bysearch'):?>
if($('#query li.active').size() == 0) ajaxGetSearchForm();
<?php endif;?>
$(function()
{
// Update table summary text
+1 -2
View File
@@ -21,7 +21,7 @@
<?php endif;?>
</h2>
</div>
<div id='queryBox' class='show'></div>
<div id='queryBox' class='show divider'></div>
<form method='post' target='hiddenwin' id='linkStoryForm' class='main-table table-story'>
<?php if($stories2Link):?>
<table class='table' id='storyList'>
@@ -77,7 +77,6 @@
<script>
$(function()
{
ajaxGetSearchForm();
<?php if($stories2Link):?>
$('#linkStoryForm').table();
setTimeout(function(){$('#linkStoryForm .table-footer').removeClass('fixed-footer');}, 100);
+1 -1
View File
@@ -362,7 +362,7 @@
if($from == 'project') common::printIcon('task', 'create', "project=$param&storyID=$story->id&moduleID=$story->module", $story, 'button', 'smile', '', 'showinonlybody');
echo "<div class='divider'></div>";
common::printIcon('story', 'edit', "storyID=$story->id", $story, '', '', '', 'iframe showinonlybody');
common::printIcon('story', 'edit', "storyID=$story->id", $story);
common::printIcon('story', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", $story, 'button', 'copy', '', 'iframe showinonlybody');
common::printIcon('story', 'delete', "storyID=$story->id", $story, 'button', '', 'hiddenwin');
?>
+1 -6
View File
@@ -18,9 +18,4 @@ function setModule(obj)
$(this).find("[data-module='" + libModule + "']").find("select[id^='module']").val(moduleID).trigger("chosen:updated");
}
})
}
$(function()
{
ajaxGetSearchForm('#querybox');
});
}
+1 -4
View File
@@ -40,7 +40,7 @@ js::set('branch', $branch);
</div>
</div>
<div class='main-col'>
<div id='queryBox' class='cell'></div>
<div id='queryBox' class='cell<?php if($browseType == 'bysearch') echo ' show';?>'></div>
<form class='main-table table-case' data-ride='table' id='batchForm' method='post'>
<div class="table-header fixed-right">
<nav class="btn-toolbar pull-right"></nav>
@@ -207,8 +207,5 @@ js::set('branch', $branch);
<script>
$('#module' + moduleID).closest('li').addClass('active');
$('#' + caseBrowseType + 'Tab').addClass('btn-active-text').find('.text').after("<span class='label label-light label-badge'><?php echo $pager->recTotal;?></span>");
<?php if($browseType == 'bysearch'):?>
if($('#query li.active').size() == 0) ajaxGetSearchForm();
<?php endif;?>
</script>
<?php include '../../common/view/footer.html.php';?>
+8 -6
View File
@@ -19,9 +19,8 @@
</div>
</div>
</div>
<div id='mainContent' class='main-content'>
<div id='queryBox' class='show'></div>
<hr class='small' />
<div id='queryBox' class='show cell'></div>
<div id='mainContent'>
<form class='main-table' method='post' target='hiddenwin' id='importFromLib' data-ride='table'>
<table class='table has-sort-head table-fixed'>
<thead>
@@ -69,10 +68,13 @@
<?php if($cases):?>
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class='table-actions btn-toolbar'>
<?php echo html::submitButton($lang->testcase->import, '', 'btn');?>
<div class='table-actions btn-toolbar show-always'>
<?php echo html::submitButton($lang->testcase->import, '', 'btn btn-secondary');?>
</div>
<?php echo html::linkButton($lang->goback, $this->session->caseList);?>
<div class="btn-toolbar">
<?php echo html::linkButton($lang->goback, $this->session->caseList);?>
</div>
<div class='table-statistic'></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
+10 -11
View File
@@ -11,14 +11,16 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $case->id;?></span>
<?php echo html::a($this->createLink('case', 'view', 'caseID=' . $case->id), $case->title, '_blank');?>
</h2>
<div id="mainMenu" class="clearfix">
<div class='btn-toolbar pull-left'>
<div class="page-title">
<span class="label label-id"><?php echo $case->id;?></span>
<?php echo html::a($this->createLink('case', 'view', 'caseID=' . $case->id), $case->title, '_blank', 'class="text"');?> <span class='text-muted'><i class="icon-angle-right"></i> <span><?php echo $lang->testcase->linkCases;?></span></span>
</div>
</div>
<div id='queryBox' class='show'></div>
</div>
<div id='queryBox' class='cell show'></div>
<div id='mainContent'>
<?php if($cases2Link):?>
<form class='main-table' method='post' target='hiddenwin' id='linkCasesForm' data-ride='table'>
<table class='table' id='caseList'>
@@ -60,13 +62,10 @@
</table>
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class='table-actions btn-toolbar'><?php echo html::submitButton();?></div>
<div class='table-actions btn-toolbar show-always'><?php echo html::submitButton('', '', 'btn btn-secondary');?></div>
<?php echo html::hidden('case', $case->id);?>
</div>
</form>
<?php endif;?>
</div>
<script>
$(function(){ajaxGetSearchForm();});
</script>
<?php include '../../common/view/footer.html.php';?>
-5
View File
@@ -20,8 +20,3 @@ function confirmBatchDelete(actionLink)
if(confirm(batchDelete)) setFormAction(actionLink);
return false;
}
$(document).ready(function()
{
if(browseType == 'bysearch') ajaxGetSearchForm();
});
+1 -4
View File
@@ -64,8 +64,6 @@ js::set('flow', $this->config->global->flow);
?>
</li>
</ul>
<div id='queryBox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
</div>
<?php else:?>
<div id='pageActions'>
@@ -104,7 +102,6 @@ js::set('flow', $this->config->global->flow);
<?php common::printLink('testsuite', 'batchCreateCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");?>
<?php common::printLink('testsuite', 'createCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'");?>
</div>
<div id='queryBox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
</div>
<?php endif;?>
<div id="mainContent" class="main-row">
@@ -126,7 +123,7 @@ js::set('flow', $this->config->global->flow);
</div>
</div>
<div class="main-col">
<div class="cell" id="queryBox"></div>
<div id='queryBox' class='cell <?php if($browseType =='bysearch') echo 'show';?>'></div>
<form class="main-table table-testcase" data-ride="table" method="post" id='testcaseForm'>
<?php $canBatchEdit = common::hasPriv('testcase', 'batchEdit');?>
<?php $canBatchDelete = common::hasPriv('testcase', 'batchDelete');?>
+1 -1
View File
@@ -1,5 +1,5 @@
$(document).ready(function()
{
if(browseType == 'bysearch') ajaxGetSearchForm();
if(browseType == 'bysearch') $.toggleQueryBox(true);
if($('#caseList thead th.w-title').width() < 150) $('#caseList thead th.w-title').width(150);
});