Javascript JTable jquery,关闭子按钮
我使用的是Jtable(基于Jquery)。 我的儿童桌有些问题。 在子表中,我在工具栏中添加了一个新按钮。 有了工具栏上的这个新按钮,che close图标消失了,我如何修复它? (如果删除工具栏元素,关闭按钮的X将正确显示)Javascript JTable jquery,关闭子按钮,javascript,jquery,jtable,jtableheader,Javascript,Jquery,Jtable,Jtableheader,我使用的是Jtable(基于Jquery)。 我的儿童桌有些问题。 在子表中,我在工具栏中添加了一个新按钮。 有了工具栏上的这个新按钮,che close图标消失了,我如何修复它? (如果删除工具栏元素,关闭按钮的X将正确显示) $('#ListHeader').jtable({ 标题:“费用核算”, 行动:{ listAction:函数(postData、jtParams){ 返回getListDataHeader(); } }, 字段:{ 身份证:{ 关键:没错, 列表:false }, 详
$('#ListHeader').jtable({
标题:“费用核算”,
行动:{
listAction:函数(postData、jtParams){
返回getListDataHeader();
}
},
字段:{
身份证:{
关键:没错,
列表:false
},
详情:{
标题:“”,
宽度:“5%”,
排序:假,
编辑:false,
saveUserPreferences:false,
创建:false,
显示:功能(headerData){
//创建将用于打开子表的映像
var$img=$('');
//当用户单击图像时打开子表
$img.单击(函数(){
$('#ListHeader').jtable('openChildTable',
$img.最近('tr'),
{
标题:headerData.record.title+'-Row',
saveUserPreferences:false,
是的,
页面大小:3,
showCloseButton:正确,
工具栏:{
项目:[{
图标:“../scripts/jtable/themes/metro/add.png”,
文本:“添加新行”,
单击:函数(标题ID){
window.location=“InsertRow.aspx”;
}
}]
},
行动:{
listAction:函数(postData、jtParams){
返回getListDataRow(headerData.record.ID、jtParams.jtStartIndex、jtParams.jtPageSize);
//返回{“结果”:“确定”,“记录”:[]};
},
deleteAction:函数(postData){
返回deleteItem(postData,“费用科目行”);
}
},
字段:{
头像:{
键入:“隐藏”,
默认值:headerData.record.ID
},
身份证:{
关键:没错,
创建:false,
编辑:false,
列表:false
},
标题:{
标题:“标题”,
宽度:“20%”
}
}
},函数(数据){//打开的处理程序
data.childTable.jtable('load');
});
});
//返回要在人员行上显示的图像
返回$img;
}
},
标题:{
标题:“标题”
},
地位:{
标题:"地位",,
宽度:“8%”
}
}
});
$('#ListHeader').jtable('load');
谢谢,
Nk
$('#ListHeader').jtable({
title: 'ExpensesAccounts' ,
actions: {
listAction: function (postData, jtParams) {
return getListDataHeader();
}
},
fields: {
ID:{
key: true,
list:false
},
Details: {
title: '',
width: '5%',
sorting: false,
edit: false,
saveUserPreferences: false,
create: false,
display: function (headerData) {
//Create an image that will be used to open child table
var $img = $('<img src="../Images/viewDetails.png" width="20p" height="20p" title="View Details" />');
//Open child table when user clicks the image
$img.click(function () {
$('#ListHeader').jtable('openChildTable',
$img.closest('tr'),
{
title: headerData.record.Title + ' - Row' ,
saveUserPreferences: false,
paging: true,
pageSize: 3,
showCloseButton:true,
toolbar: {
items: [{
icon: '../scripts/jtable/themes/metro/add.png',
text: 'Add New Row',
click: function (headerID) {
window.location = "InsertRow.aspx";
}
}]
},
actions: {
listAction: function (postData, jtParams) {
return getListDataRow(headerData.record.ID, jtParams.jtStartIndex, jtParams.jtPageSize);
//return { "Result": "OK", "Records": [] };
},
deleteAction: function (postData) {
return deleteItem(postData, 'Expense Account Rows');
}
},
fields: {
HeaderID: {
type: 'hidden',
defaultValue: headerData.record.ID
},
ID: {
key: true,
create: false,
edit: false,
list: false
},
Title: {
title: 'Title',
width: '20%'
}
}
}, function (data) { //opened handler
data.childTable.jtable('load');
});
});
//Return image to show on the person row
return $img;
}
},
Title: {
title: 'Title'
},
Status: {
title: 'Status',
width: '8%'
}
}
});
$('#ListHeader').jtable('load');