我正在使用带有x-editable的jquery数据表,当按钮按下它时,我有一个带按钮的列是呼叫确认灯箱,它工作正常。
但是当数据表重绘或移动到上一页时,它不会显示只是闪烁并隐藏它自己
灯箱代码如下:
<td><button type=button class="btn btn-danger btn-xs btn-round target_delete_model" data_send_id="<?= $call_row['id']; ?>"><i class=fa-remove></i></button></td>
使用jquery调用灯箱的代码:
$(document).ready(function() {
$.fn.editable.defaults.mode = 'popup';
function RowSetup(){
//Delete model toggle code
$(".target_delete_model").click(function(e) {
e.preventDefault();
$("#delete_id").val($(this).attr("data_send_id"));
$("#mySmallModal").modal("toggle");
return false;
}); }
$("#datatable3").dataTable({
sPaginationType: "bs_full",
fnPreDrawCallback: function() {
$(".dataTables_filter input").addClass("form-control input-large").attr("placeholder", "Search"), $(".dataTables_length select").addClass("form-control input-small")
},
oLanguage: {
sSearch: "",
sLengthMenu: "<span>_MENU_ entries</span>"
},
bJQueryUI: !1,
bAutoWidth: !1,
sDom: "<'row'<'col-lg-3 col-md-3 col-sm-12 text-center'l><'col-lg-6 col-md-6 col-sm-12 text-center'T><'col-lg-3 col-md-3 col-sm-12 text-center'f>r>t<'row-'<'col-lg-6 col-md-6 col-sm-12'i><'col-lg-6 col-md-6 col-sm-12'p>>",
oTableTools: {
sSwfPath: "assets/plugins/tables/datatables/tabletools/swf/copy_csv_xls_pdf.swf",
aButtons: [{
sExtends: "print",
sButtonText: '<i class="st-printer s16 vat"></i> Print',
aButtons: ["print"]
}, {
sExtends: "xls",
sButtonText: '<i class="im-file-excel s16 vat"></i> XLS',
aButtons: ["xls"]
}, {
sExtends: "pdf",
sButtonText: '<i class="im-file-pdf s16 vat"></i> PDF',
aButtons: ["pdf"]
}, {
sExtends: "csv",
sButtonText: '<i class="im-file-xml s16 vat"></i> CSV',
aButtons: ["csv"]
}, {
sExtends: "copy",
sButtonText: '<i class="im-copy s16 vat"></i> Copy',
aButtons: ["copy"]
}]
},"fnDrawCallback": function( oSettings ) {
RowSetup(); }
});
});
灯箱部门代码:
<div class="modal fade" id="mySmallModal" tabindex=-1 role=dialog aria-labelledby=mySmallModalLabel aria-hidden=true>
<div class="modal-dialog modal-sm">
<div class=modal-content>
<div class=modal-header>
<button type=button class=close data-dismiss=modal aria-hidden=true>×</button>
<h4 class=modal-title id=mySmallModalLabel>Are you sure to delete ?</h4>
</div>
<div class=modal-body>
<p>Are you sure to delete this record permanently ?</p>
</div>
<div class=modal-footer>
<form action="delete.php" method="post">
<button type=button class="btn btn-default" data-dismiss=modal>Close</button>
<button type=submit class="btn btn-default">Delete</button>
</form>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>