From fcf2687316e2e19c213614fde0b8cc1cf8321ec2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 29 Mar 2023 17:23:10 +0800 Subject: [PATCH] * Modify the selection box drop-down display. --- lib/front/front.class.php | 7 ++++++- module/doc/control.php | 2 +- module/doc/view/createlib.html.php | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 15e1b0b263..df6b5c0aac 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -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]; diff --git a/module/doc/control.php b/module/doc/control.php index 66512217a5..0ee6e98ee5 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -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'")); } } diff --git a/module/doc/view/createlib.html.php b/module/doc/view/createlib.html.php index f7aa4f2c88..953c423372 100644 --- a/module/doc/view/createlib.html.php +++ b/module/doc/view/createlib.html.php @@ -25,14 +25,14 @@ doc->{$type}?> - + tab == 'doc' and $type == 'project'):?> doc->execution?> multiple ? '' : 'disabled';?> - doclib->tip->selectExecution}' $disabled")?> + doclib->tip->selectExecution}' $disabled")?>