deleteAction中的代码
public function deleteAction(){
$this->view->Title = 'Member :: Group manager :: Delete';
$this->view->headTitle($this->view->Title,true);
$tblGroup = new Default_Model_UserGroup();
$tblGroup->deleteItem($this->_arrParam,array('task'=>'admin-delete'));
$this->_redirect($this->_actionMain);
}
文件jquery中的代码
function DeleteGroup(element,id) {
jConfirm('Are you sure you want to delete this Group?', 'Delete Group', function(r) { if (r)
$.ajax({
type: "GET",
url: "<?= $this->baseUrl($this->currentController. '/delete/id')?>" + id,
data: '',
success: function(response){
$(element).parents('tr').remove();
$.jGrowl('Group deleted');
}
});
});
}
链路
<a href="#" onclick="DeleteGroup(this,21)"><i class="fa fa-trash-o"></i></a>