2016-09-29 27 views
5

jqueryの-UIダイアログ表示閉じるアイコンや間違ったテキストを "閉じ" ..jqueryの-UIダイアログ表示閉じるアイコンと間違ったテキスト

のjQueryのUIバージョン1.12.1およびコード:

function callDialog() { 
    $("#dialog-confirm").dialog({ 
     closeOnEscape: false, resizable: false, height: "auto", width: 400, modal: true, buttons: { 
      "Yes": function() { 
       $(this).dialog("close"); }, 
      "No": function() { 
       $(this).dialog("close"); } 
     } 
    }); 
} 

どのようにそれ enter image description here

+0

これは、CSSに関連することができます。あなたの現在のコードとjQuery UIのバージョンとテーマに関する詳細を提供してください。 – Twisty

+0

jqueryの宇井バージョン1.12.1およびコード:機能callDialog(){ $( "#ダイアログ-確認")ダイアログ({ closeOnEscape:偽、 サイズ変更可能:偽、 高さ: "オート"、 幅:400 、 モーダル:真、 ボタン:{ "はい"( "クローズ")関数(){ $(この).dialog; }、 "いいえ":関数(){ $(この)。ダイアログ(「閉じる」); } } }); } –

+0

問題を解決するための方法を見つけましたか? – Baso

答えて

1

私はこれと同じエラーが発生した修正したコードcloseTextの次の行を変更して、それを修正する:closeTextのための「閉じる」:「」jqueryの-UIファイルに

$.widget("ui.dialog", { 
version: "1.12.1", 
options: { 
    appendTo: "body", 
    autoOpen: true, 
    buttons: [], 
    classes: { 
     "ui-dialog": "ui-corner-all", 
     "ui-dialog-titlebar": "ui-corner-all" 
    }, 
    closeOnEscape: true, 
    closeText: "", 
1

私は(最後の行を参照)、これはcloseTextを追加し解決しました:

\t \t $('#dialog').dialog({ 
 
\t \t \t autoOpen: false, 
 
\t \t \t width: 500, 
 
\t \t \t height:500, 
 
\t \t \t resizable: true, 
 
\t \t \t title: 'Items', 
 
\t \t \t modal: true, 
 
\t \t \t open: function(event, ui) { 
 
\t \t \t \t $(this).load("@Url.Action("StorageItemListPartial", "StorageItem")"); 
 
\t \t \t }, 
 
\t \t \t buttons: { 
 
\t \t \t \t "Close": function() { 
 
\t \t \t \t \t $(this).dialog("close"); 
 
\t \t \t \t } 
 
\t \t \t }, 
 
\t \t \t closeText: '' 
 
\t \t });

関連する問題