jtable (jtable.org)을 사용하고 있으며 원하는대로 테이블을 만들었습니다. 내가 뭘하는 방법을 알아낼 수없는 것은 할 인 액션 'createAction'
조건이 충족 될 경우 jquery-jtable 조치
주위에 문이라는 JTable의 API의 객체가있는 경우 :
TotalRecordCount : 기록의 총 수 (뿐만 아니라이 페이지).
내가 원하는 것은 같은 :
경우 (TotalRecordCount < 5) {createAction : '? PersonActionsPagedSorted.php에 OrderID = & 행동 = 만들기',} 여기
전체 코드는 다음과 같습니다.
<script type="text/javascript">
jQuery(document).ready(function() {
//Prepare jTable
jQuery('#ext_table').jtable({
//title: 'Create Extensions',
paging: true,
pageSize: 10,
sorting: true,
defaultSorting: 'Extension ASC',
actions: {
listAction: 'PersonActionsPagedSorted.php?orderId=&action=list',
createAction: 'PersonActionsPagedSorted.php?orderId=&action=create',
updateAction: 'PersonActionsPagedSorted.php?action=update',
deleteAction: 'PersonActionsPagedSorted.php?action=delete'
},
fields: {
PersonId: {
key: true,
create: false,
edit: false,
list: false
},
Name: {
title: 'Name',
width: '30%',
sorting:false,
//inputClass: 'validate[required]'
},
emailAddress: {
title: 'Email Address',
width: '20%',
sorting:false
}
});
//Load person list from server
$('#ext_table').jtable('load');
});
</script>