zoukankan      html  css  js  c++  java
  • 一个自己做的easyui datagird扩展

    var a;
    $(function () {
        $("body").bind("contextmenu", function () {
            return false;
        });
    
        $.extend($.fn.datagrid.methods, {
            rightTools: function (jq, opts) {
                $(".datagrid-btable tbody tr td").bind("contextmenu", function () {
                    return false;
                });
                $(".datagrid-btable tbody tr td").bind("mousedown", function (e) {
                    if (e.which == 3) {
                        var index = $(this).parent().attr("datagrid-row-index");
                        showTools(jq, $(this), index, opts, e.clientX, e.clientY);
                    };
                });
            }
        });
    });
    
    function showTools(d, b, i, o, x, y) {
        ccl();
        a = d;
        var rows = $(d).datagrid("getRows");
        var iscan = false;
        if (rows[i][o.field] == o.status) {
            iscan = true;
        };
        var s = "<div class='zzc' style='position:fixed;100%;height:100%;z-index:3;' onclick='ccl();' onmousedown='ccl();'>";
        s += "</div>";
        s += "<div class='tdm'>";
        s += "<table border='0' cellpadding='0' cellspacing='0'>";
        s += "<tr><td><a href="javascript:ViewC('" + i + "');">产看详细</a></td></tr>";
        s += "<tr><td><a href="javascript:medMain('" + i + "');">强制过账</a></td></tr>";
        s += "</table>";
        s += "</div>";
        $("body").append(s);
        $(".tdm").offset({ top: y, left: x });
    }
    
    function ccl() {
        $(".tdm").remove();
        $(".zzc").remove();
    }
    function ViewC(i) {
        $(a).datagrid('selectRow', i);
        View();
        ccl();
    }
  • 相关阅读:
    增强MyEclipse提示功能
    Mysql安装配置,修改初试密码。
    在我的电脑里面创建图标
    popup non topmost
    多线程下载或上传数据限速
    SynchronizationContext
    linux运维笔记——常用命令详解diff
    linux运维笔记——curl
    linux下mysql的源码安装
    shell编程——变量的数值计算
  • 原文地址:https://www.cnblogs.com/wpcnblog/p/5417140.html
Copyright © 2011-2022 走看看