Почему диалог jQuery выглядит странно после обновления версии jQuery - PullRequest
0 голосов
/ 20 апреля 2020

Я обновил свое. Net 40 веб-приложение jQuery версию с 1.7.1 до 1.9.0 и jQuery .UI с 1.9.0 до 1.9.2, и диалоги выглядят странно. У меня недостаточно знаний в javascript, чтобы указать на проблему. кто-нибудь может помочь? As you can see buttons are vertical, titlebar is visible, and text is not centered

cs html код прилагается:

<script type="text/javascript">

    function GetConfirmDialog(title, message, callback, arg) {
        $("#ConfirmInnerText").html(message);
        
        var dialogDiv = $("#ConfirmInnerText").parent();

        $(dialogDiv).dialog({
            modal: true,
            closeOnEscape: false,
            resizable: false,
            autoOpen: false,
            dialogClass: 'white-dialog-style',
            create: function () {
                $(".ui-dialog-title").html(title);
                //$(".ui-dialog-titlebar").css("display", "none");
                //$('.ui-button-text:contains("Abort")').css('background-color', '#c82d39');
                $('.ui-dialog-buttonset').css('margin-left', '25px');
                $('.ui-widget-content').css('background', 'white');
            },
            width: 400,
            buttons: {
                "Confirm": function () {
                    $(dialogDiv).dialog('destroy');
                    if (callback != null) {
                        if (arg != null) {
                            callback(arg);
                        }
                        else {
                            callback();
                        }
                    }

                },
                "Cancel": function () {
                    $(dialogDiv).dialog('destroy');
                }
            }
        });
        return dialogDiv;
    }

</script>
...