jstree插件修复:

修复选中部门问题:我们已解决jstree插件在部门树形结构中无法正确选中部门的问题。现在,用户能够流畅地通过点击或拖拽来选中或取消选中任何部门,极大地提升了用户操作的准确性和效率。
搜索功能兼容性增强:同时,我们优化了jstree插件与搜索功能的兼容性。在使用搜索功能时,不再出现右侧已选成员列表数据丢失的情况,确保用户在搜索并筛选部门后,已选择的成员信息得以完整保留,提升了用户体验的连贯性和稳定性。
This commit is contained in:
小胡
2024-07-23 11:59:22 +08:00
Unverified
parent 90aadf2e20
commit 6bfebb1d7a
3 changed files with 9 additions and 10 deletions

View File

@@ -144,7 +144,6 @@ class template {
}
function parse_template(&$template) {
$template = str_replace('self.$', 'self.', $template);
$var_regexp = "((?!\\\$[a-zA-Z]+\()(\\\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(\-\>)?[a-zA-Z0-9_\x7f-\xff]*)(\[[a-zA-Z0-9_\-\.\"\'\[\]\$\x7f-\xff]+\])*)";
$const_regexp = "([A-Z_\x7f-\xff][A-Z0-9_\x7f-\xff]*)";
@@ -153,9 +152,9 @@ class template {
$template = preg_replace("/\<\!\-\-\{(.+?)\}\-\-\>/s", "{\\1}", $template);
// js的lang替换
$template = preg_replace_callback("/<script[^>]+?src=\"(.+?)\".*?>[\s\S]*?/is", array($this, 'parse_template_callback_javascript'), $template);
// 模版lang替换
// 模版lang替换
$template = preg_replace_callback("/\{lang\s+(.+?)\}/is", array($this, 'parse_template_callback_languagevar_1'), $template);
// 模版__lang替换
// 模版__lang替换
$template = preg_replace_callback("/__lang\.(\w+)/i", array($this, 'parse_template_callback_languagevar_2'), $template);
// img的src替换
$template = preg_replace_callback("/<img(.+?)src=([\"])(.+?)([\"])([^>]*?)>/is", array($this, 'parse_template_callback_img'), $template);
@@ -200,8 +199,6 @@ class template {
$template = preg_replace_callback("/[\n\r\t]*\{block\s+([a-zA-Z0-9_\[\]]+)\}(.+?)\{\/block\}/is", array($this, 'parse_template_callback_stripblock_12'), $template);
$template = preg_replace("/\<\?(\s{1})/is", "<?php\\1", $template);
$template = preg_replace("/\<\?\=(.+?)\?\>/is", "<?php echo \\1;?>", $template);
$template = str_replace('self.','self.$', $template);
$template = str_replace('_','$', $template);
}
function parse_template_callback_javascript($matches) {

View File

@@ -14,7 +14,7 @@ if(!defined('CORE_VERSION')) {
define('CORE_VERSION', '2.02');
define('CORE_RELEASE', '20180909');
define('CORE_FIXBUG' , '20000000');
define('CORE_XHVERSION', '1.88.5');
define('CORE_XHRELEASE', '20240722');
define('CORE_XHVERSION', '1.88.6');
define('CORE_XHRELEASE', '20240723');
define('CORE_XHFIXBUG' , '20240706');
}

View File

@@ -39,7 +39,7 @@ html, body {
top:0px;
width:24px;
height:32px;
padding:8px 5px;
padding:2px 5px;
font-size: 18px;
color: rgba(78,85,99,0.65);
}
@@ -117,7 +117,7 @@ var callback_url = '{$callback_url}';
<!--{if intval($_GET['nosearch'])<1}-->
<div class="orgtree-search">
<a href="javascript:;" class="search" onclick="jstree_search();return false" title="{lang search}"><i class="dzz dzz-search"></i></a>
<!-- <a href="javascript:;" class="delete" onclick="jstree_search('stop');return false" title="{lang close_search}"><i class="dzz dzz-close"></i></a>-->
<a href="javascript:;" class="delete" onclick="jstree_search('stop');return false" title="{lang close_search}"><i class="dzz dzz-close"></i></a>
<input id="jstree_search_input" type="text" placeholder="{lang search_department_user}" class="form-control" onkeyup="if(event.keyCode==13){jstree_search()}" />
</div>
<!--{/if}-->
@@ -173,8 +173,10 @@ jQuery(document).ready(function(e) {
"keep_selected_style" : false
<!--{if $_GET['stype']==1}-->
,"three_state": false//父子级别级联选择
,"tie_selection": false
<!--{else}-->
,"three_state": true//父子级别级联选择
<!--{/if}-->
,"tie_selection": true
},
"search":{