datatables 및 jeditable의 경우 새로운 기능입니다. 지금 나는 내 데이터 테이블에서 jeditable을 사용하려고 노력하고 있지만 모든면에서 효과가 없을 것이다. 내 문제 : 내가 내 datatable에서 탭을 전환 할 때 Jeditable 이벤트 나던 어떤 셀을 편집 할 수 없도록 새 탭을 따르지 않습니다. 첫 번째 탭은 셀을 편집 할 수있는 유일한 탭입니다.탭이있는 데이터 테이블에 jeditable 사용
내 문제에 대한 쉬운 해결책이 있습니까, 아니면 내가 놓친이 문제에 대한 다른 스레드가 있습니까?
$("#tabs").tabs({
"show": function(event, ui) {
var oTable = $('div.dataTables_scrollBody>table.display', ui.panel).dataTable();
if (oTable.length > 0) {
oTable.fnAdjustColumnSizing();
}
}
});
// Sets datatable for main table in offerts(admin).
var oTable = $('.display.offerts').dataTable({
"bJQueryUI": true,
"bStateSave": true,
"aoColumns": [
null,
null,
null,
null,
null,
null,
null,
null,
{ "bSortable": false }
],
"oLanguage": {
"sProcessing": "Processing...",
"sLengthMenu": "Visa _MENU_ rader",
"sZeroRecords": "Inga matchande rader funna",
"sEmptyTable": "Ingen data tillgänglig i tabellen",
"sLoadingRecords": "Laddar...",
"sInfo": "Visar _START_ till _END_ av _TOTAL_ rader",
"sInfoEmpty": "Visar 0 till 0 av 0 rader",
"sInfoFiltered": "(filtrerat från _MAX_ rader)",
"sInfoPostFix": "",
"sSearch": "Sök i alla kolumner:"
}
});
/* Apply the jEditable handlers to the table */
$('td.contacted, td.complete, td.sold', oTable.fnGetNodes()).editable('../index.php/offerts/update_offert_status', {
data : "{'Ja':'Ja','Nej':'Nej'}",
type : 'select',
submit : 'OK',
"callback": function(sValue, y) {
var aPos = oTable.fnGetPosition(this);
oTable.fnUpdate(sValue, aPos[0], aPos[1]);
},
"submitdata": function (value, settings) {
return {
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition(this)[2]
};
},
"height": "14px"
});
미리 감사드립니다.
당신이 jsfiddle.net에 코드를 게시 할 수 작업 할 수있는 다른 개체를 가질 수 있도록 식별자가 아닌 클래스를 사용해야 하나 개 이상의 테이블이있는 경우
? 어떤 caso든지에서 또한 질문에있는 당신의 가득 차있는 부호를 배치하십시오. –
감사합니다. 코드를 추가하는 것을 잊어 버렸습니다. – hgerdin
HTML 코드는 어떻게됩니까? 탭을 AJAX를 통해로드합니까? –