我想将 jsgrid 编辑按钮的内置功能从内联编辑器更改为打开另一个页面进行编辑。我不确定该怎么做。有什么想法可以实现将默认编辑按钮更改为加载页面吗?这甚至可能吗?到目前为止,我有:
代码:
<script>
$( document ).ready(function() {
$("#jsGrid").jsGrid({
height: "398px",
width: "100%",
inserting: true,
editing: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 10,
pageButtonCount: 5,
deleteConfirm: "Do you really want to delete your job listing?",
controller: {
loadData: function(filter) {
return $.ajax({
type: "GET",
url: "<?php echo site_url('/job/getjobs/'.$this->session->employer_id); ?>",
data: filter
});
},
insertItem: function(item) {
return $.ajax({
type: "POST",
url: "/clients/",
data: item
});
},
updateItem: function(item) {
return $.ajax({
type: "PUT",
url: "/clients/",
data: item
});
},
deleteItem: function(item) {
return $.ajax({
type: "DELETE",
url: "/clients/",
data: item
});
}
},
fields: [
{ name: "title", title: "Title", type: "text", width: 100 },
{ name: "created_on", title: "Created On", type: "text", width: 100 },
{ name: "salary", title: "Salary", type: "text", width: 100 },
{ name: "is_active", type: "text", title: "Is Active", width: 100 },
{ type: "control" }
]
});
});
</script>