* improve UI of forms elements.

This commit is contained in:
Catouse
2018-05-17 13:26:27 +08:00
parent 4432a36f1a
commit b9aa9568c5
5 changed files with 25 additions and 25 deletions
+19 -19
View File
@@ -85,26 +85,26 @@
<?php if(strpos(",$showFields,", ',pri,') !== false):?>
<tr>
<th><?php echo $lang->task->pri;?></th>
<td colspan='2'>
<?php
$hasCustomPri = false;
foreach($lang->task->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
$priList = $lang->task->priList;
if(end($priList))
{
unset($priList[0]);
$priList[0] = '';
}
?>
<?php
$hasCustomPri = false;
foreach($lang->task->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
$priList = $lang->task->priList;
if(end($priList))
{
unset($priList[0]);
$priList[0] = '';
}
?>
<td colspan='<?php echo $hasCustomPri ? 1 : 3 ?>'>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control chosen'");?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control chosen chosen-simple'");?>
<?php else: ?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control' data-provide='labelSelector'");?>
<?php endif; ?>
+2 -2
View File
@@ -44,12 +44,12 @@ function loadList(type, id)
{
if(data != ' ')
{
$(divClass).html(data);
$(divClass).html(data).find('select').chosen();
}
else
{
$("#type").val("custom");
$(divClass).html("<select id='bugs' class='form-control'></select>");
$(divClass).html("<select id='bugs' class='form-control'></select>").find('select').chosen();
}
});
}
+2 -2
View File
@@ -86,11 +86,11 @@
</tr>
<tr>
<th><?php echo $lang->todo->type;?></th>
<td><?php echo html::select('type', $lang->todo->typeList, '', 'onchange=loadList(this.value); class=form-control');?></td>
<td><?php echo html::select('type', $lang->todo->typeList, '', 'onchange="loadList(this.value);" class="form-control chosen-simple"');?></td>
</tr>
<tr>
<th><?php echo $lang->todo->pri;?></th>
<td><?php echo html::select('pri', $lang->todo->priList, '', "class='form-control chosen'");?></td>
<td><?php echo html::select('pri', $lang->todo->priList, '', "class='form-control chosen-simple'");?></td>
</tr>
<tr>
<th><?php echo $lang->todo->name;?></th>
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long