如何最大化、最小化和使 uib-modal 可拖动?

How to Maximize, minimize and make uib-modal dragable?

我有最小化和最大化 uib-modal 的要求,请给我建议方法。

我没有找到任何方法,所以我创建了自己的 js 和 css 来给人一种最小化和最大化的感觉,为此我使用了 jquery。

脚本

$("body").on("click", ".toggle-popup", function () {
    $(".modal-backdrop").hide(); 
    $(this).closest(".modal").toggleClass("minimize");
    $(this).find("i").addClass("fa-window-maximize");
    $(this).find("i").removeClass("fa-window-minimize");
    $("body").removeClass("modal-open");
})
$("body").on("click", ".minimize .toggle-popup", function () {
    $(".modal-backdrop").show();
    $(this).find("i").removeClass("fa-window-maximize");
    $(this).find("i").addClass("fa-window-minimize");
    $("body").addClass("modal-open");
})

CSS

<style type="text/css">
        .modal.minimize{
            position: fixed;
            top: auto;
            right: auto;
            bottom: 10px;
            left: 10px;
        }
        .modal.minimize .modal-body, .modal.minimize .modal-footer{
            display: none;
        }
        .modal.minimize .modal-dialog{
            margin: 0;
            width: 200px;
        }
        .modal.minimize .modal-dialog .modal-header{
            padding: 5px;
            background-color: #EEE;
        }
        .modal.minimize .modal-dialog .modal-header h3{
            font-size: 16px;
        }
    </style>