* Modify the selection box drop-down display.

This commit is contained in:
tianshujie
2023-03-29 17:23:10 +08:00
parent 028b893345
commit fcf2687316
3 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -171,7 +171,12 @@ class html extends baseHTML
$convertedPinYin = (empty($config->isINT) and class_exists('common')) ? common::convert2Pinyin($options) : array();
if(count($options) >= $config->maxCount or isset($config->moreLinks[$name]))
{
if(strpos($attrib, 'chosen') !== false) $attrib = str_replace('chosen', 'picker-select', $attrib);
if(strpos($attrib, 'chosen') !== false)
{
$attrib = str_replace('chosen', 'picker-select', $attrib);
$attrib = preg_replace('/data-drop[-_]?direction=([\'"]?)down([\'"]?)/i', 'data-drop-direction=$1bottom$2', $attrib);
$attrib = preg_replace('/data-drop[-_]?direction=([\'"]?)up([\'"]?)/i', 'data-drop-direction=$1top$2', $attrib);
}
if(isset($config->moreLinks[$name]))
{
$link = $config->moreLinks[$name];
+1 -1
View File
@@ -1444,6 +1444,6 @@ class doc extends control
$project = $this->project->getById($projectID);
$disabled = $project->multiple ? '' : 'disabled';
return print(html::select('execution', $executionPairs, 0, "class='form-control' data-placeholder='{$this->lang->doclib->tip->selectExecution}' $disabled data-drop_direction='down' data-dropDirection='down'"));
return print(html::select('execution', $executionPairs, 0, "class='form-control' data-placeholder='{$this->lang->doclib->tip->selectExecution}' $disabled data-drop_direction='down' data-drop-direction='down'"));
}
}
+2 -2
View File
@@ -25,14 +25,14 @@
<?php if(in_array($type, array('product', 'project', 'execution'))):?>
<tr class='objectBox'>
<th><?php echo $lang->doc->{$type}?></th>
<td class='required'><?php echo html::select($type, $objects, $objectID, "class='form-control chosen' data-dropDirection='down' data-drop_direction='down'")?></td>
<td class='required'><?php echo html::select($type, $objects, $objectID, "class='form-control chosen' data-drop-direction='down'")?></td>
</tr>
<?php if($app->tab == 'doc' and $type == 'project'):?>
<tr class='executionBox'>
<th><?php echo $lang->doc->execution?></th>
<td>
<?php $disabled = $project->multiple ? '' : 'disabled';?>
<?php echo html::select('execution', $executionPairs, 0, "class='form-control chosen' data-drop_direction='down' data-dropDirection='down' data-placeholder='{$lang->doclib->tip->selectExecution}' $disabled")?>
<?php echo html::select('execution', $executionPairs, 0, "class='form-control chosen' data-drop-direction='down' data-placeholder='{$lang->doclib->tip->selectExecution}' $disabled")?>
</td>
</tr>
<?php endif;?>