대화 상자가 이미 표시되어있을 때 대화 상자를 열면 기본적으로 두 번째 대화 상자가 첫 번째 대화 상자 너비를 넘어 확장되지 않습니다. 두 번째 대화 상자가 첫 번째 대화 상자에 실제로 포함되어 있지 않아도 사실입니다 (첫 번째 대화 상자에서 링크를 클릭하여 두 번째 대화 상자가 표시됩니다).jQueryUI : 대화 상자 내에서 대화 상자 크기 조정?
두 번째 대화 상자에서 명시적인 너비를 설정할 수 있지만 이상적인 것은 아닙니다. 첫 번째/배경 대화 상자보다 넓은 내용의 내용 (준 다중 선택)에 자동 크기 조정을 원합니다. 두 번째 대화 상자에서 명시적인 너비로 나는 일반적으로 두 세트의 스크롤 막대를 얻습니다. 하나는 대화 자체에, 다른 하나는 내부 멀티 선택입니다.
두 번째 대화 상자의 크기를 JS .dialog() 호출의 명시적인 너비를 사용하고 CSS를 통해 확인하지 않았 음을 유의하십시오 (거의 알지 못함).
두 번째 대화 상자를 자동 크기 조정하는 방법에 대해 알고있는 사람이 있습니까? 감사.
<div id="dialog-top" title="Tab data">
<form>
...lots of stuff, including id 'addCodeButton', which
...pops up the second dialog
</form>
</div> <!-- dialog-top -->
<div id="dialog-add-code" title="Code selector">
<select id = "codes" ...etc... >
...
</select>
</div>
$(function(){
$('#addCodeButton').click(function(){
// problem: this 'open' will not set the width of the new dialog
// wider than 'dialog-top' unless an explicit width is given
// (see '460' below)
$('#dialog-add-code').dialog('open');
return false;
});
});
var $dialog = $("#dialog-top").dialog({
autoOpen: false,
modal: true,
buttons: {
...
}
});
$('#dialog-add-code').dialog({
autoOpen: false,
width: 460,
modal: false,
buttons: {
...
}
});
일부 코드를 제공 할 수 있습니다 –