Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

刚进入表格后, 表的右上方蓝色字体"选中所有"点击不生效 #405

Open
bode135 opened this issue Nov 2, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@bode135
Copy link

bode135 commented Nov 2, 2021

描述

  • 刚进入表格后, 表的右上方蓝色字体"选中所有"点击不生效, 如图:

image

重现步骤

  • simpleui_demo, 点击员工管理表, 再点击右上方蓝色字体(如上图).

系统环境

1.Operating System:win10

2.Python Version:3.7

@bode135 bode135 added the bug Something isn't working label Nov 2, 2021
@bode135
Copy link
Author

bode135 commented Nov 10, 2021

已暂时解决.
解决方案:
将simpleui的admin/actions.html复制到templates/admin/actions.html, 然后加入以下js脚本.

/admin/actions.html
<script>
    console.log('~~~ actions.html from bddjango!');

    // 解决simpleui显示错误bug的js脚本--丑陋版
    setInterval(function() {
        // 判断是否选中了checkbox
        if ($("#action-toggle").is(":checked")){
            // 判断是否全选
            if (_action.select_across){
                $(".question").hide();
                $(".all").show();
                $(".clear").show();
            }
            else{
                $(".question").show();
            }
        }
        else{
            $(".clear").hide();
            $(".all").hide();
            $(".question").hide();
        }

    }, 100);
</script>

原理:
该脚本将一直检测是否选中了checkbox复选框, 只有全选的情况下才会弹出这些蓝色字体相关标签.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant