jtable列中自定义button示例代码_Javascript教程-查字典教程网
jtable列中自定义button示例代码
jtable列中自定义button示例代码
发布时间:2016-12-30 来源:查字典编辑
摘要:复制代码代码如下:Information:{title:'Info',width:'5%',sorting:false,edit:true,...

复制代码 代码如下:

Information: {

title: 'Info',

width: '5%',

sorting: false,

edit: true,

create: true,

type:'textarea',

display: function (customerData) {

var $img = $('<img src="content/images/document_properties.png" title="View and edit information" />');

$img.click(function () {

$('#CustomersTableContainer').jtable('openChildTable',

$img.closest('tr'),

{

title: customerData.record.Name + ' - Information',

actions: {

listAction: 'ajax/customer_info_actions.php?action=list&searchterm=' + customerData.record.CustomerNumber,

},

fields: {

CustomerNumber: {

title: 'Number',

key: true,

create: false,

edit: false,

list: false

},

Information: {

title:'information',

create: false,

edit: true,

list: true,

type:'textarea'

},

}

}, function (data) { //opened handler

data.childTable.jtable('load');

});

});

return $img;

}

},

'''''

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新Javascript教程学习
    热门Javascript教程学习
    编程开发子分类