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) {