* improve UI of forms for create action.

This commit is contained in:
Catouse
2016-03-07 14:07:49 +08:00
parent 18f97e6478
commit 8c05dd59f4
8 changed files with 87 additions and 3 deletions

View File

@@ -17,9 +17,10 @@
#module_chosen.chosen-container .chosen-drop {min-width: 400px; border-top: 1px solid #ddd!important}
#openedBuild_chosen.chosen-container .chosen-drop {min-width: 450px; border-top: 1px solid #ddd!important}
#module + .chosen-container-single .chosen-single,
#openedBuild + .chosen-container-multi .chosen-choices {border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px;}
#task + .chosen-container-single .chosen-single,
#openedBuild + .chosen-container-multi .chosen-choices {border-top-left-radius: 0; border-bottom-left-radius: 0;}
#openedBuild + .chosen-container-multi .chosen-choices,
#mailto + .chosen-container-multi .chosen-choices {border-top-right-radius: 0; border-bottom-right-radius: 0; margin-left: -1px;}
#mailto + .chosen-container-multi .chosen-choices {border-top-right-radius: 0; border-bottom-right-radius: 0;}
.dropdown-pris > .btn {background-color: #fff; text-shadow: none}
@@ -28,3 +29,5 @@
#contactListGroup .input-group-btn > .btn {margin-left: -1px!important;}
#contactListGroup .input-group-btn > .btn:first-child {border-left: none}
.minw-80px {min-width: 80px;}

View File

@@ -102,6 +102,20 @@ js::set('refresh', $lang->refresh);
<div class='col-table'>
<div class='input-group'>
<span class='input-group-addon fix-border br-0'><?php echo $lang->bug->severity;?></span>
<?php
$isAllNumberPri = true;
foreach ($lang->bug->severityList as $value)
{
if(!empty($value) && !is_numeric($value))
{
$isAllNumberPri = false;
break;
}
}
?>
<?php if(!$isAllNumberPri):?>
<?php echo html::select('pri', (array)$lang->bug->severityList, $severity, "class='form-control minw-80px'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris' data-prefix='severity'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
@@ -109,7 +123,22 @@ js::set('refresh', $lang->refresh);
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('severity', (array)$lang->bug->severityList, $severity, "class='hide'");?>
</div>
<?php endif; ?>
<span class='input-group-addon fix-border br-0'><?php echo $lang->bug->pri;?></span>
<?php
$isAllNumberPri = true;
foreach ($lang->bug->priList as $value)
{
if(!empty($value) && !is_numeric($value))
{
$isAllNumberPri = false;
break;
}
}
?>
<?php if(!$isAllNumberPri):?>
<?php echo html::select('pri', (array)$lang->bug->priList, $pri, "class='form-control minw-80px'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
@@ -117,6 +146,7 @@ js::set('refresh', $lang->refresh);
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('pri', $lang->bug->priList, '', "class='hide'");?>
</div>
<?php endif; ?>
</div>
</div>
</div>

View File

@@ -11,3 +11,5 @@ select {border:1px solid #ccc}
#title.form-control {border-top-right-radius: 0; border-bottom-right-radius: 0}
.dropdown-pris > .btn {background-color: #fff;}
.minw-80px {min-width: 80px;}

View File

@@ -90,13 +90,28 @@
<div class='col-table w-250px'>
<div class="input-group">
<span class='input-group-addon fix-border br-0'><?php echo $lang->story->pri;?></span>
<?php
$isAllNumberPri = true;
foreach ($lang->story->priList as $value)
{
if(!empty($value) && !is_numeric($value))
{
$isAllNumberPri = false;
break;
}
}
?>
<?php if(!$isAllNumberPri):?>
<?php echo html::select('pri', (array)$lang->story->priList, $pri, "class='form-control minw-80px'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris' data-set='0,1,2,3,4'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('pri', (array)$lang->story->priList, $pri, "class='hide'");?>
<?php echo html::select('pri', (array)$lang->story->priList, $pri, "class='hide'");?>
</div>
<?php endif; ?>
<span class='input-group-addon fix-border br-0'><?php echo $lang->story->estimateAB;?></span>
<?php echo html::input('estimate', $estimate, "class='form-control'");?>
</div>

View File

@@ -1,2 +1,4 @@
.dropdown-pris > .btn {background-color: #fff;}
#mailto + .chosen-container-multi .chosen-choices {border-top-left-radius: 0; border-bottom-left-radius: 0}
.minw-80px {min-width: 80px;}

View File

@@ -61,6 +61,20 @@
<div class='col-table w-250px'>
<div class="input-group">
<span class='input-group-addon fix-border br-0'><?php echo $lang->task->pri;?></span>
<?php
$isAllNumberPri = true;
foreach ($lang->task->priList as $value)
{
if(!empty($value) && !is_numeric($value))
{
$isAllNumberPri = false;
break;
}
}
?>
<?php if(!$isAllNumberPri):?>
<?php echo html::select('pri', (array)$lang->task->priList, $pri, "class='form-control minw-80px'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
@@ -68,6 +82,7 @@
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('pri', (array)$lang->task->priList, $pri, "class='hide'");?>
</div>
<?php endif; ?>
<span class='input-group-addon fix-border br-0'><?php echo $lang->task->estimateAB;?></span>
<?php echo html::input('estimate', $estimate, "class='form-control' placeholder='{$lang->task->hour}'");?>
</div>

View File

@@ -27,3 +27,5 @@
#moduleIdBox .input-group-btn > .btn {margin-left: -1px!important;}
#moduleIdBox .input-group-btn > .btn:first-child {border-left: none}
.minw-80px {min-width: 80px;}

View File

@@ -81,6 +81,20 @@
<div class='col-table'>
<div class='input-group'>
<span class='input-group-addon fix-border br-0'><?php echo $lang->testcase->pri;?></span>
<?php
$isAllNumberPri = true;
foreach ($lang->testcase->priList as $value)
{
if(!empty($value) && !is_numeric($value))
{
$isAllNumberPri = false;
break;
}
}
?>
<?php if(!$isAllNumberPri):?>
<?php echo html::select('pri', (array)$lang->testcase->priList, $pri, "class='form-control minw-80px'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
@@ -88,6 +102,7 @@
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('pri', (array)$lang->testcase->priList, $pri, "class='hide'");?>
</div>
<?php endif; ?>
</div>
</div>
</div>