我有这个代码,使用容器布局(jquery.layout):
$(document).ready(function () {
var myLayout = $('#container').layout();
var containerWidth = myLayout.state.container.innerWidth;
myLayout.options.west.onresize= function(){ customSaveState();}
myLayout.options.east.onresize= function(){ customSaveState();}
var msize = customLoadState();
myLayout.sizePane("west", msize[0]);
myLayout.sizePane("east", msize[1]);
function customSaveState () {
var westCurrentSize = myLayout.state.west.size;
var eastCurrentSize = myLayout.state.east.size;
saveSizes(westCurrentSize, eastCurrentSize);
};
});
它按预期工作。 但我的模态确认对话框确实存在。确认来源如下:
<div id="myModal" class="modal fade">
<div class="modal-dialog modal-confirm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><?php echo $confirm["title"];?></h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<p><?php echo $confirm["caption"];?></p>
</div>
<div class="modal-footer">
<a type="button" class="btn btn-info" data-dismiss="modal">
<i class="glyphicon glyphicon-hand-left">
<?php echo $confirm["cancel"];?>
</i>
</a>
<a class="btn btn-danger" href="<?php echo $confirm["link"];?>">
<i class="glyphicon glyphicon-remove">
<?php echo $confirm["doit"];?>
</i>
</a>
</div>
</div>
</div>
</div>
模态对话框弹出禁用后台(模态对话框后面的窗口),但模态对话框本身也被禁用。
其他窗口中的相同模态代码效果很好。看起来,那个部分
var myLayout = $('#container').layout();
是相关的。如果我删除它,那么模态对话框可以工作,但容器布局会不会发生。
JN