gpt4 book ai didi

jquery - 在 jQuery UI 对话框中使用 DataTables TableTools 时出现问题

转载 作者:行者123 更新时间:2023-12-01 01:03:45 25 4
gpt4 key购买 nike

我正在尝试在 jQuery UI 对话框中的表上使用 DataTables“TableTools”插件。它们在对话框外工作正常,但在对话框内,唯一可用的按钮是“打印”。

这是一个 jsFiddle 演示的问题: http://jsfiddle.net/Yd3PT/31/

有什么想法吗?

最佳答案

我遇到了同样的问题,上述解决方案对我不起作用。 TableTools 按钮出现在 DataTable 上(在模式中) - 但是当您单击链接时没有任何操作。

<!-- source modal -->
<div id="source-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-modalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<table id="source-modal-table" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Heading1</th>
<th>Heading2</th>
<th>Heading3</th>
</tr>
</thead>
<tbody>
<tr>
<td class="data1"></td>
<td class="data2"></td>
<td class="data3"></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div><!-- source modal -->

<script>
// defines DataTable and TableTool with swf
var oTable2 = $('#source-modal-table').DataTable({
"aoColumns": [
null, null, null, null, null, null
],
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/Assets/images/copy_csv_xls_pdf.swf"
}
});

// open modal for source
$("#source-modal").modal('show');

// ensures TableTools works in modal (DOES NOT WORK)
$('#source-modal').dialog({
modal: true,
zIndex: 1
});
</script>

我的 TableTools 按钮列表似乎没有任何明显的变化,我认为 swf 文件需要在某处重新定义,但不知道在哪里?

关于jquery - 在 jQuery UI 对话框中使用 DataTables TableTools 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7682615/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com