提交 704d8e1e 编写于 作者: C Catouse

* fix error of modal trigger on load ajax content.

上级 312b5f99
......@@ -274,18 +274,25 @@
{
$.get(options.url, function(data)
{
var $data = $(data);
if ($data.hasClass('modal-dialog'))
{
$dialog.replaceWith($data);
}
else if ($data.hasClass('modal-content'))
try
{
$dialog.find('.modal-content').replaceWith($data);
var $data = $(data);
if ($data.hasClass('modal-dialog'))
{
$dialog.replaceWith($data);
}
else if ($data.hasClass('modal-content'))
{
$dialog.find('.modal-content').replaceWith($data);
}
else
{
$body.wrapInner($data);
}
}
else
catch(e)
{
$body.wrapInner($data);
$modal.html(data);
}
$modal.callEvent('loaded.zui.modal',
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册