From 777c52ae06adc616575c8e79512cec997b5e0d72 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Mon, 10 Jun 2019 20:21:35 +0200 Subject: [PATCH 1/8] refactored htacces to use the new syntax --- .htaccess | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.htaccess b/.htaccess index 0ab1e54..d15f6c7 100644 --- a/.htaccess +++ b/.htaccess @@ -26,33 +26,27 @@ #Deny every *.php file - Order Deny,Allow - Deny from all + Require all granted Allow from 127.0.0.1 #allow following files - Order Allow,Deny - Allow from all + Require all granted - Order Allow,Deny - Allow from all + Require all granted - Order Allow,Deny - Allow from all + Require all granted - Order Allow,Deny - Allow from all + Require all granted - Order Allow,Deny - Allow from all + Require all granted From c41f9734023f6db59c1dc22b993d70704be31342 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Mon, 10 Jun 2019 20:25:41 +0200 Subject: [PATCH 2/8] another bugfix concerning the htacces file --- .htaccess | 1 - 1 file changed, 1 deletion(-) diff --git a/.htaccess b/.htaccess index d15f6c7..e120592 100644 --- a/.htaccess +++ b/.htaccess @@ -27,7 +27,6 @@ #Deny every *.php file Require all granted - Allow from 127.0.0.1 #allow following files From 3d52aaa10e694758c576077baa7fe9784290b6de Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Mon, 10 Jun 2019 20:34:21 +0200 Subject: [PATCH 3/8] fixed popover not changing --- js/adduser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/adduser.js b/js/adduser.js index e68c806..e08b4e0 100644 --- a/js/adduser.js +++ b/js/adduser.js @@ -27,6 +27,7 @@ $(document).ready(function () { }); }); function userPopover(title, text){ + $("#newuser").popover('dispose'); $("#newuser").data("toggle", "popover"); $("#newuser").data("container", "body"); $("#newuser").data("placement", "bottom"); From 05a48c72a75cc51a87d8b028114e97a4f9109973 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Tue, 11 Jun 2019 18:55:42 +0000 Subject: [PATCH 4/8] Update install.php --- install/install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.php b/install/install.php index c51f15a..dcaf4c7 100644 --- a/install/install.php +++ b/install/install.php @@ -75,6 +75,6 @@ - + From 8c07907cc2ac0be9bb9b7d8e724b90b84dd813a3 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Tue, 11 Jun 2019 18:56:07 +0000 Subject: [PATCH 5/8] Update install_adduser.php --- install/install_adduser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install_adduser.php b/install/install_adduser.php index 4b4b924..eb94b59 100644 --- a/install/install_adduser.php +++ b/install/install_adduser.php @@ -32,6 +32,6 @@ - + From f45ac2864dcdaae119b3e0ad20271f03376cae91 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 3 Jul 2019 11:43:02 +0200 Subject: [PATCH 6/8] add custom checkboxes to list to fit with themes --- config/config.php | 11 +++++++---- cont/list.php | 8 ++++++-- js/list.js | 32 ++++++++++++++++---------------- style/themes/sketchy.css | 15 +++++++-------- 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/config/config.php b/config/config.php index 0c1fa1c..0a40128 100644 --- a/config/config.php +++ b/config/config.php @@ -1,6 +1,9 @@ - false, + 'installed' => true, + 'host' => 'localhost', + 'database' => 'list', + 'username' => 'list', + 'passwd' => 'Erfolg100%', ); - -?> \ No newline at end of file + ?> \ No newline at end of file diff --git a/cont/list.php b/cont/list.php index 167fa62..a2d0349 100644 --- a/cont/list.php +++ b/cont/list.php @@ -33,7 +33,12 @@ } print_r("
"); - print_r("
"); + print_r("
"); + print_r("
"); + print_r(""); + print_r(""); + print_r("
"); + print_r("
"); print_r("
$item->Anzahl $item->Einheit
"); print_r("
$item->Name
"); print_r("
- \ No newline at end of file diff --git a/js/list.js b/js/list.js index 814da20..32d200e 100644 --- a/js/list.js +++ b/js/list.js @@ -16,7 +16,7 @@ function highlightNewEntry(){ if(match!=null){ var newID = match[1]; var checkBox = $(`[data-id='${newID}']`); - var newRow = checkBox.parent().parent(); + var newRow = checkBox.parent().parent().parent(); newRow.removeClass($(checkBox).data("color")); newRow.addClass("alert-primary"); setTimeout(function () { @@ -111,28 +111,28 @@ function checkItem() { }, success: function () { var color = $(dataIdSelector).data("color"); - $(dataIdSelector).parent().parent().removeClass("bg-danger"); - $(dataIdSelector).parent().parent().find(".dropdown-menu-button").removeClass("btn-danger"); + $(dataIdSelector).parent().parent().parent().removeClass("bg-danger"); + $(dataIdSelector).parent().parent().parent().find(".dropdown-menu-button").removeClass("btn-danger"); if($(dataIdSelector).prop("checked")){ - $(dataIdSelector).parent().parent().removeClass(color); - $(dataIdSelector).parent().parent().addClass("bg-success"); + $(dataIdSelector).parent().parent().parent().removeClass(color); + $(dataIdSelector).parent().parent().parent().addClass("bg-success"); } else{ - $(dataIdSelector).parent().parent().removeClass("bg-success"); - $(dataIdSelector).parent().parent().addClass(color); + $(dataIdSelector).parent().parent().parent().removeClass("bg-success"); + $(dataIdSelector).parent().parent().parent().addClass(color); } }, error: function () { - $(dataIdSelector).parent().parent().addClass("bg-danger"); - $(dataIdSelector).parent().parent().data("toggle", "popover"); - $(dataIdSelector).parent().parent().data("container", "body"); - $(dataIdSelector).parent().parent().data("placement", "top"); - $(dataIdSelector).parent().parent().data("html", true); - $(dataIdSelector).parent().parent().data("trigger", "focus"); - $(dataIdSelector).parent().parent().data("content", "Dieses Element konnte nicht gespeichert werden.
Bitte die Seite Aktualisieren"); - $(dataIdSelector).parent().parent().attr("title", "Fehler!"); - $(dataIdSelector).parent().parent().popover('show'); + $(dataIdSelector).parent().parent().parent().addClass("bg-danger"); + $(dataIdSelector).parent().parent().parent().data("toggle", "popover"); + $(dataIdSelector).parent().parent().parent().data("container", "body"); + $(dataIdSelector).parent().parent().parent().data("placement", "top"); + $(dataIdSelector).parent().parent().parent().data("html", true); + $(dataIdSelector).parent().parent().parent().data("trigger", "focus"); + $(dataIdSelector).parent().parent().parent().data("content", "Dieses Element konnte nicht gespeichert werden.
Bitte die Seite Aktualisieren"); + $(dataIdSelector).parent().parent().parent().attr("title", "Fehler!"); + $(dataIdSelector).parent().parent().parent().popover('show'); } }); } \ No newline at end of file diff --git a/style/themes/sketchy.css b/style/themes/sketchy.css index 6c0bdbd..7a65cd7 100644 --- a/style/themes/sketchy.css +++ b/style/themes/sketchy.css @@ -7095,27 +7095,26 @@ select.form-control { [type="checkbox"] { position: relative; - -webkit-appearance: none; appearance: none; cursor: pointer; } [type="checkbox"]:before { content: ""; - /* position: absolute; */ - /* left: -1.2em; */ - /* top: -0.9em; */ + position: absolute; + left: -1.2em; + top: -0.9em; display: inline-block; width: 15px; height: 16px; - border: 2px solid #fff; + border: 2px solid #333; border-radius: 2px 8px 2px 4px / 5px 3px 5px 3px; } [type="checkbox"]:checked:after { content: "x"; position: absolute; - left: 3px; - /* top: -0.48em; */ + left: -0.64em; + top: -0.48em; font-size: 1.5rem; line-height: 0.5; - color: #fff; } + color: #333; } [type="checkbox"]:disabled:before { border: 2px solid #aaa; } From 0b77acc68d12e41341d5f17dcf1c75317840bb9c Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Wed, 3 Jul 2019 11:44:44 +0200 Subject: [PATCH 7/8] add custom checkboxes to list to fit with themes #2 --- config/config.php | 11 +++++++---- cont/list.php | 8 ++++++-- js/list.js | 32 ++++++++++++++++---------------- style/themes/sketchy.css | 15 +++++++-------- 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/config/config.php b/config/config.php index 0c1fa1c..0a40128 100644 --- a/config/config.php +++ b/config/config.php @@ -1,6 +1,9 @@ - false, + 'installed' => true, + 'host' => 'localhost', + 'database' => 'list', + 'username' => 'list', + 'passwd' => 'Erfolg100%', ); - -?> \ No newline at end of file + ?> \ No newline at end of file diff --git a/cont/list.php b/cont/list.php index 167fa62..a2d0349 100644 --- a/cont/list.php +++ b/cont/list.php @@ -33,7 +33,12 @@ } print_r("
"); - print_r("
"); + print_r("
"); + print_r("
"); + print_r(""); + print_r(""); + print_r("
"); + print_r("
"); print_r("
$item->Anzahl $item->Einheit
"); print_r("
$item->Name
"); print_r("
- \ No newline at end of file diff --git a/js/list.js b/js/list.js index 814da20..32d200e 100644 --- a/js/list.js +++ b/js/list.js @@ -16,7 +16,7 @@ function highlightNewEntry(){ if(match!=null){ var newID = match[1]; var checkBox = $(`[data-id='${newID}']`); - var newRow = checkBox.parent().parent(); + var newRow = checkBox.parent().parent().parent(); newRow.removeClass($(checkBox).data("color")); newRow.addClass("alert-primary"); setTimeout(function () { @@ -111,28 +111,28 @@ function checkItem() { }, success: function () { var color = $(dataIdSelector).data("color"); - $(dataIdSelector).parent().parent().removeClass("bg-danger"); - $(dataIdSelector).parent().parent().find(".dropdown-menu-button").removeClass("btn-danger"); + $(dataIdSelector).parent().parent().parent().removeClass("bg-danger"); + $(dataIdSelector).parent().parent().parent().find(".dropdown-menu-button").removeClass("btn-danger"); if($(dataIdSelector).prop("checked")){ - $(dataIdSelector).parent().parent().removeClass(color); - $(dataIdSelector).parent().parent().addClass("bg-success"); + $(dataIdSelector).parent().parent().parent().removeClass(color); + $(dataIdSelector).parent().parent().parent().addClass("bg-success"); } else{ - $(dataIdSelector).parent().parent().removeClass("bg-success"); - $(dataIdSelector).parent().parent().addClass(color); + $(dataIdSelector).parent().parent().parent().removeClass("bg-success"); + $(dataIdSelector).parent().parent().parent().addClass(color); } }, error: function () { - $(dataIdSelector).parent().parent().addClass("bg-danger"); - $(dataIdSelector).parent().parent().data("toggle", "popover"); - $(dataIdSelector).parent().parent().data("container", "body"); - $(dataIdSelector).parent().parent().data("placement", "top"); - $(dataIdSelector).parent().parent().data("html", true); - $(dataIdSelector).parent().parent().data("trigger", "focus"); - $(dataIdSelector).parent().parent().data("content", "Dieses Element konnte nicht gespeichert werden.
Bitte die Seite Aktualisieren"); - $(dataIdSelector).parent().parent().attr("title", "Fehler!"); - $(dataIdSelector).parent().parent().popover('show'); + $(dataIdSelector).parent().parent().parent().addClass("bg-danger"); + $(dataIdSelector).parent().parent().parent().data("toggle", "popover"); + $(dataIdSelector).parent().parent().parent().data("container", "body"); + $(dataIdSelector).parent().parent().parent().data("placement", "top"); + $(dataIdSelector).parent().parent().parent().data("html", true); + $(dataIdSelector).parent().parent().parent().data("trigger", "focus"); + $(dataIdSelector).parent().parent().parent().data("content", "Dieses Element konnte nicht gespeichert werden.
Bitte die Seite Aktualisieren"); + $(dataIdSelector).parent().parent().parent().attr("title", "Fehler!"); + $(dataIdSelector).parent().parent().parent().popover('show'); } }); } \ No newline at end of file diff --git a/style/themes/sketchy.css b/style/themes/sketchy.css index 6c0bdbd..7a65cd7 100644 --- a/style/themes/sketchy.css +++ b/style/themes/sketchy.css @@ -7095,27 +7095,26 @@ select.form-control { [type="checkbox"] { position: relative; - -webkit-appearance: none; appearance: none; cursor: pointer; } [type="checkbox"]:before { content: ""; - /* position: absolute; */ - /* left: -1.2em; */ - /* top: -0.9em; */ + position: absolute; + left: -1.2em; + top: -0.9em; display: inline-block; width: 15px; height: 16px; - border: 2px solid #fff; + border: 2px solid #333; border-radius: 2px 8px 2px 4px / 5px 3px 5px 3px; } [type="checkbox"]:checked:after { content: "x"; position: absolute; - left: 3px; - /* top: -0.48em; */ + left: -0.64em; + top: -0.48em; font-size: 1.5rem; line-height: 0.5; - color: #fff; } + color: #333; } [type="checkbox"]:disabled:before { border: 2px solid #aaa; } From 3cc85143293dea4dcfb9a8d25dd1539344866d02 Mon Sep 17 00:00:00 2001 From: Tim Krehan <39102356+tim-krehan@users.noreply.github.com> Date: Sat, 2 Dec 2023 09:53:07 +0100 Subject: [PATCH 8/8] Update config.php --- config/config.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/config/config.php b/config/config.php index 0a40128..3a0b01f 100644 --- a/config/config.php +++ b/config/config.php @@ -1,9 +1,6 @@ true, - 'host' => 'localhost', - 'database' => 'list', - 'username' => 'list', - 'passwd' => 'Erfolg100%', -); - ?> \ No newline at end of file +$CONFIG = array ( + 'installed' => false, +); + +?>