mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-12-17 22:19:37 +01:00
fixed error popup not showing up
This commit is contained in:
parent
287da38f69
commit
147d5edb22
2 changed files with 2 additions and 2 deletions
|
@ -102,15 +102,14 @@ function changeListItem(){
|
||||||
|
|
||||||
function checkItem() {
|
function checkItem() {
|
||||||
var dataId = $(this).data("id");
|
var dataId = $(this).data("id");
|
||||||
|
var dataIdSelector = (`[data-id='${dataId}']`);
|
||||||
$.post({
|
$.post({
|
||||||
url: "api/list/check",
|
url: "api/list/check",
|
||||||
data: {
|
data: {
|
||||||
// function: "check",
|
|
||||||
id: dataId,
|
id: dataId,
|
||||||
status: $(this).prop("checked")
|
status: $(this).prop("checked")
|
||||||
},
|
},
|
||||||
success: function () {
|
success: function () {
|
||||||
var dataIdSelector = (`[data-id='${dataId}']`);
|
|
||||||
var color = $(dataIdSelector).data("color");
|
var color = $(dataIdSelector).data("color");
|
||||||
$(dataIdSelector).parent().parent().removeClass("bg-danger");
|
$(dataIdSelector).parent().parent().removeClass("bg-danger");
|
||||||
$(dataIdSelector).parent().parent().find(".dropdown-menu-button").removeClass("btn-danger");
|
$(dataIdSelector).parent().parent().find(".dropdown-menu-button").removeClass("btn-danger");
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
$passwd = $CONFIG['passwd'],
|
$passwd = $CONFIG['passwd'],
|
||||||
$database = $CONFIG['database']
|
$database = $CONFIG['database']
|
||||||
);
|
);
|
||||||
|
$mysqli->set_charset("utf8");
|
||||||
if (!is_null($mysqli->connect_error))
|
if (!is_null($mysqli->connect_error))
|
||||||
{
|
{
|
||||||
header("Location: /error/DBConnFailed");
|
header("Location: /error/DBConnFailed");
|
||||||
|
|
Loading…
Reference in a new issue