0

私はレガシー アプリケーションに取り組んでおり、jquery を 1.6.2 から 1.9.1 にアップグレードしました。migrate.js を使用して非推奨のコードを解決しました。

<script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")" type="text/javascript"></script> 
<script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.min.js")" type="text/javascript"></script>

次の JavaScript は、ダイアログ ボックスを表示します。

jQuery.fn.jDialogWrapper("Please enter the worked hours(should not be zero), for the entered the Contract Number or Description.").dialog('open');

関数は次のように定義されます。

jQuery.fn.jDialogWrapper = function (message) {
    return $('<div class="StasDialogClass"></div>')
        .html(message)
        .dialog({
            autoOpen: false,
            dialogClass: 'StasDialogClass',
            modal: true,
            resizable: false,
            title: 'Mulalley STAS',
            buttons: {
                OK: function () {
                    $(this).dialog('close');
                }
            }
        });
};

ダイアログ メッセージが表示されている場合、[OK] ボタンにはテキストがありません。OK と表示されるはずです。これを修正するにはどうすればよいですか?

4

0 に答える 0