From 147d5edb222f89fb2cdeca317e6e166592acfb96 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Mon, 3 Jun 2019 14:25:48 +0200 Subject: [PATCH] fixed error popup not showing up --- js/list.js | 3 +-- php/connect.php | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/list.js b/js/list.js index 89b02e1..814da20 100644 --- a/js/list.js +++ b/js/list.js @@ -102,15 +102,14 @@ function changeListItem(){ function checkItem() { var dataId = $(this).data("id"); + var dataIdSelector = (`[data-id='${dataId}']`); $.post({ url: "api/list/check", data: { - // function: "check", id: dataId, status: $(this).prop("checked") }, success: function () { - var dataIdSelector = (`[data-id='${dataId}']`); var color = $(dataIdSelector).data("color"); $(dataIdSelector).parent().parent().removeClass("bg-danger"); $(dataIdSelector).parent().parent().find(".dropdown-menu-button").removeClass("btn-danger"); diff --git a/php/connect.php b/php/connect.php index ebd09da..4260e5d 100644 --- a/php/connect.php +++ b/php/connect.php @@ -6,6 +6,7 @@ $passwd = $CONFIG['passwd'], $database = $CONFIG['database'] ); + $mysqli->set_charset("utf8"); if (!is_null($mysqli->connect_error)) { header("Location: /error/DBConnFailed");