web/bundles/topxiaadmin/js/controller/org/batch-org-btn.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

define(function(require, exports, module) {
    var Notify = require("common/bootstrap-notify");
    exports.run = function() {

        var initDom = function() {
            var formId = $('#batch-update-org').data('formId'); 
            var generate =  $('#batch-update-org').data('generate'); 
            if(generate == false){
                return;
            }
        }

        var getCheckstatus = function(ischeck) {
            var status = true;
            $("[data-role='batch-select']").parents('table').find("[data-role='batch-item']").each(function() {
                if ($(this).prop("checked") === ischeck) {
                    status = false;
                    return;
                }
            });
            return status;
        }

        initDom();

        $("[data-role='batch-select']").on('click', function() {
            if ($(this).prop('checked')) {
                $("[data-role='batch-select']").parents('table').find("[data-role='batch-item']").prop("checked", true);
                $("[data-role='batch-select']").prop("checked", true);
            } else {
                $("[data-role='batch-select']").parents('table').find("[data-role='batch-item']").prop("checked", false);
                $("[data-role='batch-select']").prop("checked", false);
            }
        });

        $("[data-role='batch-select']").parents('table').on('click', "[data-role='batch-item']", function() {
            $("[data-role='batch-select']").prop('checked', getCheckstatus(false));
        })

        $("#batch-update-org").on('click', function(e) {
            if (getCheckstatus(true)) {
                Notify.warning(Translator.trans('admin.org.batch_select_check_hint'));
                e.stopImmediatePropagation();
            }
        })
    };
});

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。