* finish task #5357.

This commit is contained in:
wangyidong
2019-03-20 13:33:17 +08:00
parent c15a094736
commit 7dfdbe841d
2 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -384,7 +384,7 @@ $('#module' + moduleID).closest('li').addClass('active');
<?php if($browseType == 'bysearch'):?>
if($('#query li.active').size() == 0) $.toggleQueryBox(true);
<?php endif;?>
<?php if($useDatatable):?>
<?php if(!empty($useDatatable)):?>
$(function(){$('#bugForm').table();})
<?php endif;?>
<?php $this->app->loadConfig('qa', '', false);?>
+11 -9
View File
@@ -15,15 +15,17 @@ $jsRoot = $this->app->getWebRoot() . "js/";
include '../../common/view/datepicker.html.php';
include '../../common/view/chosen.html.php';
$formId = 'searchForm-' . uniqid('');
$fieldWidth = $app->getClientLang() == 'en' ? 'w-130px' : 'w-110px';
$operatorWidth = $app->getClientLang() == 'en' ? 'w-110px' : 'w-100px';
?>
<style>
#selectPeriod {padding: 4px 0; height: 197px; min-width: 120px}
#selectPeriod > .dropdown-header {background: #f1f1f1; display: block; text-align: center; padding: 4px 0; line-height: 20px; margin: 5px 10px; font-size: 14px; border-radius: 2px; color: #333; font-size: 12px}
#groupAndOr {display: inline-block;}
#<?php echo $formId;?> > table {margin: 0 auto;}
#<?php echo $formId;?> > table > tbody > tr > td {padding: 10px 15px;}
#<?php echo $formId;?> > table > tbody > tr > td {padding: 8px;}
#<?php echo $formId;?> .form-actions {padding-bottom: 20px; padding-top: 0;}
#<?php echo $formId;?> .chosen-container[id^="field"] .chosen-drop {min-width: 140px;}
#<?php echo $formId;?> .chosen-container[id^="field"] .chosen-drop {min-width: 180px;}
#<?php echo $formId;?> [id^="valueBox"] .chosen-container .chosen-single {min-width: 100px;}
#<?php echo $formId;?> [id^="valueBox"] .chosen-container .chosen-drop {min-width: 300px;}
#<?php echo $formId;?> .chosen-container .chosen-drop ul.chosen-results li {white-space:normal}
@@ -91,16 +93,16 @@ foreach($fieldParams as $fieldName => $param)
$param = $fieldParams[$currentField];
/* Print and or. */
echo "<td class='text-right w-80px'>";
echo "<td class='text-right w-70px'>";
if($i == 1) echo "<span id='searchgroup1'><strong>{$lang->search->group1}</strong></span>" . html::hidden("andOr$fieldNO", 'AND');
if($i > 1) echo html::select("andOr$fieldNO", $lang->search->andor, $formSession["andOr$fieldNO"], "class='form-control'");
echo '</td>';
/* Print field. */
echo "<td class='w-110px' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
echo "<td class='{$fieldWidth}' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
/* Print operator. */
echo "<td class='w-90px'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
echo "<td class='{$operatorWidth}'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
/* Print value. */
echo "<td id='valueBox$fieldNO' style='overflow:visible'>";
@@ -129,7 +131,7 @@ foreach($fieldParams as $fieldName => $param)
</tbody>
</table>
</td>
<td class='text-center nobr w-90px'><?php echo html::select('groupAndOr', $lang->search->andor, $formSession['groupAndOr'], "class='form-control'")?></td>
<td class='text-center nobr w-80px'><?php echo html::select('groupAndOr', $lang->search->andor, $formSession['groupAndOr'], "class='form-control'")?></td>
<td class='w-400px'>
<table class='table table-form'>
<tbody>
@@ -151,16 +153,16 @@ foreach($fieldParams as $fieldName => $param)
$param = $fieldParams[$currentField];
/* Print and or. */
echo "<td class='text-right w-80px'>";
echo "<td class='text-right w-70px'>";
if($i == 1) echo "<span id='searchgroup2'><strong>{$lang->search->group2}</strong></span>" . html::hidden("andOr$fieldNO", 'AND');
if($i > 1) echo html::select("andOr$fieldNO", $lang->search->andor, $formSession["andOr$fieldNO"], "class='form-control'");
echo '</td>';
/* Print field. */
echo "<td class='w-110px' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
echo "<td class='{$fieldWidth}' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
/* Print operator. */
echo "<td class='w-90px'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
echo "<td class='{$operatorWidth}'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
/* Print value. */
echo "<td id='valueBox$fieldNO'>";