打赏

bootstrap 带有确定取消按钮的modal

</div><div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="helpInfo" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="helpInfo">提示信息</h4>
            </div>
            <div class="modal-body">
                <div id="confirmModal-content" class="text-danger">
                </div>
            </div>
            <div class="modal-footer">
                <button id="confirm" type="button" class="btn btn-primary " data-dismiss="modal">确定</button>
                <button id="cancel" type="button" class="btn btn-primary " data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

  

        $("#checkBtn").click(function () {
                var grid = $('#ChecksGrid').data('kendoGrid');
                var row = grid.select();
                if (row.length == 1) {
                    var data = grid.dataItem(row);
                    $("#confirmModal-content").html("确定审核通过?");
                    $("#confirmModal").modal({ backdrop: 'static', keyboard: false })
                        .one('click', '#confirm', function (e) {
                            var url = "@Url.Action("OfficeCheck", "MissionCheckFileCheck", new { id = "__id__", fileLocation = "__fileLocation__" })";
                            window.location = url.replace("__id__", data.Id).replace("__fileLocation__", data.FileLocation).replace(/amp;/g, "");
                        });
                } else {
                    $("#modal-content").html("请选择未审的文书");
                    $("#noRowSelectModal").modal();
                }
            });

  

 

posted @ 2015-12-26 10:25  KiteRunner1988  阅读(2494)  评论(0编辑  收藏  举报