// NB 13.05.23 $(this).parent().parent().remove();
$.ajax({
url: href,
- type: 'DELETE',
+ type: 'GET',
success: function(result) {
if (minus_one) $(minus_one).numAdd(-1,minus_one_re);
$(this).parent().parent().remove();
$(this).removeClass('loading');
+ },
+ error: function (xhr, status, error) {
+ $(this).removeClass('loading');
+ alert(status+' '+xhr.status+' '+error);
}
});
});
return $this->out($this->info());
} elseif ($action == 'table.delete') {
- if (!$this->delete($_POST,$e) and !isset($e['rowCount'])) bye($e);
+ # NB 13.05.23: Query could be GET from js
+ $params = ($_SERVER['REQUEST_METHOD'] == 'GET')
+ ? $_GET
+ : $_POST
+ ;
+ #debug($params);
+ if (!$this->delete($params,$e) and !isset($e['rowCount'])) bye($e);
$this->db()->print_header('Location',$this->url_referer(str_replace('&','&',$this->url_list())));
$this->out($e);
return true;