mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-24 06:40:01 +01:00
Compare commits
No commits in common. "0b00dec6cef79482c0ccd3900ea0b01e607cee52" and "7f690f9852a894d151991726df69a2d9eb397b1c" have entirely different histories.
0b00dec6ce
...
7f690f9852
10 changed files with 54 additions and 52 deletions
19
.htaccess
19
.htaccess
|
@ -26,26 +26,33 @@
|
||||||
|
|
||||||
#Deny every *.php file
|
#Deny every *.php file
|
||||||
<Files *.php>
|
<Files *.php>
|
||||||
Require all granted
|
Order Deny,Allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.1
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
#allow following files
|
#allow following files
|
||||||
<Files index.php>
|
<Files index.php>
|
||||||
Require all granted
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
<Files api.php>
|
<Files api.php>
|
||||||
Require all granted
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
<Files login.php>
|
<Files login.php>
|
||||||
Require all granted
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
<Files logout.php>
|
<Files logout.php>
|
||||||
Require all granted
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
<Files install*.php>
|
<Files install*.php>
|
||||||
Require all granted
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
</Files>
|
</Files>
|
||||||
|
|
|
@ -33,12 +33,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
print_r("<div class='list-row $div_item_row_classes $div_item_row_color_classes'>");
|
print_r("<div class='list-row $div_item_row_classes $div_item_row_color_classes'>");
|
||||||
print_r("<div class='$div_item_checkbox_classes'>");
|
print_r("<div class='$div_item_checkbox_classes'><input type='checkbox' class='$input_item_checkbox_classes' data-color='$color_theme' data-id='$item->ID' $checked></div>");
|
||||||
print_r("<div class='custom-control custom-checkbox'>");
|
|
||||||
print_r("<input type='checkbox' class='$input_item_checkbox_classes custom-control-input' data-color='$color_theme' id='$item->ID-checkbox' data-id='$item->ID' $checked>");
|
|
||||||
print_r("<label class='custom-control-label' for='$item->ID-checkbox'></label>");
|
|
||||||
print_r("</div>");
|
|
||||||
print_r("</div>");
|
|
||||||
print_r("<div class='list-row-amount $div_item_quantity_classes' data-amount='$item->Anzahl' data-unit='$item->Einheit'>$item->Anzahl $item->Einheit</div>");
|
print_r("<div class='list-row-amount $div_item_quantity_classes' data-amount='$item->Anzahl' data-unit='$item->Einheit'>$item->Anzahl $item->Einheit</div>");
|
||||||
print_r("<div class='list-row-name $div_item_name_classes'>$item->Name</div>");
|
print_r("<div class='list-row-name $div_item_name_classes'>$item->Name</div>");
|
||||||
print_r("<div class='$div_item_menu dropdown'>");
|
print_r("<div class='$div_item_menu dropdown'>");
|
||||||
|
@ -75,5 +70,6 @@
|
||||||
<button class="btn btn-outline-secondary" type="submit" id="button-addon2"><i class="fas fa-plus"></i></button>
|
<button class="btn btn-outline-secondary" type="submit" id="button-addon2"><i class="fas fa-plus"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
|
@ -75,6 +75,6 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/js/bootstrap.bundle.min.js"></script>
|
<script src="bin/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -32,6 +32,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="/js/bootstrap.bundle.min.js"></script>
|
<script src="js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -27,7 +27,6 @@ $(document).ready(function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
function userPopover(title, text){
|
function userPopover(title, text){
|
||||||
$("#newuser").popover('dispose');
|
|
||||||
$("#newuser").data("toggle", "popover");
|
$("#newuser").data("toggle", "popover");
|
||||||
$("#newuser").data("container", "body");
|
$("#newuser").data("container", "body");
|
||||||
$("#newuser").data("placement", "bottom");
|
$("#newuser").data("placement", "bottom");
|
||||||
|
|
32
js/list.js
32
js/list.js
|
@ -16,7 +16,7 @@ function highlightNewEntry(){
|
||||||
if(match!=null){
|
if(match!=null){
|
||||||
var newID = match[1];
|
var newID = match[1];
|
||||||
var checkBox = $(`[data-id='${newID}']`);
|
var checkBox = $(`[data-id='${newID}']`);
|
||||||
var newRow = checkBox.parent().parent().parent();
|
var newRow = checkBox.parent().parent();
|
||||||
newRow.removeClass($(checkBox).data("color"));
|
newRow.removeClass($(checkBox).data("color"));
|
||||||
newRow.addClass("alert-primary");
|
newRow.addClass("alert-primary");
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
@ -111,28 +111,28 @@ function checkItem() {
|
||||||
},
|
},
|
||||||
success: function () {
|
success: function () {
|
||||||
var color = $(dataIdSelector).data("color");
|
var color = $(dataIdSelector).data("color");
|
||||||
$(dataIdSelector).parent().parent().parent().removeClass("bg-danger");
|
$(dataIdSelector).parent().parent().removeClass("bg-danger");
|
||||||
$(dataIdSelector).parent().parent().parent().find(".dropdown-menu-button").removeClass("btn-danger");
|
$(dataIdSelector).parent().parent().find(".dropdown-menu-button").removeClass("btn-danger");
|
||||||
|
|
||||||
if($(dataIdSelector).prop("checked")){
|
if($(dataIdSelector).prop("checked")){
|
||||||
$(dataIdSelector).parent().parent().parent().removeClass(color);
|
$(dataIdSelector).parent().parent().removeClass(color);
|
||||||
$(dataIdSelector).parent().parent().parent().addClass("bg-success");
|
$(dataIdSelector).parent().parent().addClass("bg-success");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$(dataIdSelector).parent().parent().parent().removeClass("bg-success");
|
$(dataIdSelector).parent().parent().removeClass("bg-success");
|
||||||
$(dataIdSelector).parent().parent().parent().addClass(color);
|
$(dataIdSelector).parent().parent().addClass(color);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
$(dataIdSelector).parent().parent().parent().addClass("bg-danger");
|
$(dataIdSelector).parent().parent().addClass("bg-danger");
|
||||||
$(dataIdSelector).parent().parent().parent().data("toggle", "popover");
|
$(dataIdSelector).parent().parent().data("toggle", "popover");
|
||||||
$(dataIdSelector).parent().parent().parent().data("container", "body");
|
$(dataIdSelector).parent().parent().data("container", "body");
|
||||||
$(dataIdSelector).parent().parent().parent().data("placement", "top");
|
$(dataIdSelector).parent().parent().data("placement", "top");
|
||||||
$(dataIdSelector).parent().parent().parent().data("html", true);
|
$(dataIdSelector).parent().parent().data("html", true);
|
||||||
$(dataIdSelector).parent().parent().parent().data("trigger", "focus");
|
$(dataIdSelector).parent().parent().data("trigger", "focus");
|
||||||
$(dataIdSelector).parent().parent().parent().data("content", "Dieses Element konnte nicht gespeichert werden.<br />Bitte die Seite Aktualisieren");
|
$(dataIdSelector).parent().parent().data("content", "Dieses Element konnte nicht gespeichert werden.<br />Bitte die Seite Aktualisieren");
|
||||||
$(dataIdSelector).parent().parent().parent().attr("title", "Fehler!");
|
$(dataIdSelector).parent().parent().attr("title", "Fehler!");
|
||||||
$(dataIdSelector).parent().parent().parent().popover('show');
|
$(dataIdSelector).parent().parent().popover('show');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class item {
|
class item {
|
||||||
public $ID, $Anzahl, $Einheit, $Name, $Erledigt;
|
public $ID, $Anzahl, $Einheit, $Name, $Erledigt;
|
||||||
function __construct($ID, $Anzahl, $Einheit, $Name, $Erledigt){
|
function item($ID, $Anzahl, $Einheit, $Name, $Erledigt){
|
||||||
$this->ID = $ID;
|
$this->ID = $ID;
|
||||||
$this->Anzahl = $Anzahl;
|
$this->Anzahl = $Anzahl;
|
||||||
$this->Einheit = $Einheit;
|
$this->Einheit = $Einheit;
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
array_push($this->list, $current);
|
array_push($this->list, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
function __construct(){
|
function shopping(){
|
||||||
include $_SESSION["docroot"].'/config/config.php';
|
include $_SESSION["docroot"].'/config/config.php';
|
||||||
include $_SESSION["docroot"].'/php/connect.php';
|
include $_SESSION["docroot"].'/php/connect.php';
|
||||||
$result = $mysqli->query("SELECT * FROM `ViewEinkauf` ORDER BY `ViewEinkauf`.`Name` ASC;");
|
$result = $mysqli->query("SELECT * FROM `ViewEinkauf` ORDER BY `ViewEinkauf`.`Name` ASC;");
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
|
|
||||||
class unit {
|
class unit {
|
||||||
public $ID, $Name, $Standard;
|
public $ID, $Name, $Standard;
|
||||||
function __construct($ID, $Name, $Standard){
|
function unit($ID, $Name, $Standard){
|
||||||
$this->ID = $ID;
|
$this->ID = $ID;
|
||||||
$this->Name = $Name;
|
$this->Name = $Name;
|
||||||
$this->Standard = $Standard;
|
$this->Standard = $Standard;
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
array_push($this->list, $current);
|
array_push($this->list, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
function __construct(){
|
function units(){
|
||||||
include $_SESSION["docroot"].'/config/config.php';
|
include $_SESSION["docroot"].'/config/config.php';
|
||||||
include $_SESSION["docroot"].'/php/connect.php';
|
include $_SESSION["docroot"].'/php/connect.php';
|
||||||
$result = $mysqli->query("SELECT * FROM `Einheit`;");
|
$result = $mysqli->query("SELECT * FROM `Einheit`;");
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
class unit {
|
class unit {
|
||||||
public $ID, $Name, $Standard;
|
public $ID, $Name, $Standard;
|
||||||
function __construct(){}
|
|
||||||
}
|
}
|
||||||
class unitList {
|
class unitList {
|
||||||
public $units = array();
|
public $units = array();
|
||||||
|
@ -13,7 +12,7 @@
|
||||||
$unit->Standard = $Standard;
|
$unit->Standard = $Standard;
|
||||||
array_push($this->units, $unit);
|
array_push($this->units, $unit);
|
||||||
}
|
}
|
||||||
function __construct(){
|
function unitList(){
|
||||||
include $_SESSION["docroot"].'/php/connect.php';
|
include $_SESSION["docroot"].'/php/connect.php';
|
||||||
$result = $mysqli->query("SELECT * FROM `Einheit`;");
|
$result = $mysqli->query("SELECT * FROM `Einheit`;");
|
||||||
while($item = $result->fetch_assoc()){
|
while($item = $result->fetch_assoc()){
|
||||||
|
@ -34,7 +33,7 @@
|
||||||
|
|
||||||
class ingredient {
|
class ingredient {
|
||||||
public $ID, $Menge, $Einheit, $Name;
|
public $ID, $Menge, $Einheit, $Name;
|
||||||
function __construct($ID, $Menge, $Einheit, $Name){
|
function ingredient($ID, $Menge, $Einheit, $Name){
|
||||||
$this->ID = $ID;
|
$this->ID = $ID;
|
||||||
$this->Menge = $Menge;
|
$this->Menge = $Menge;
|
||||||
$this->Einheit = $Einheit;
|
$this->Einheit = $Einheit;
|
||||||
|
@ -45,7 +44,7 @@
|
||||||
class recipe {
|
class recipe {
|
||||||
public $ID, $Name, $Dauer, $Beschreibung;
|
public $ID, $Name, $Dauer, $Beschreibung;
|
||||||
public $Zutaten = array();
|
public $Zutaten = array();
|
||||||
function __construct($ID, $Name, $Dauer, $Beschreibung){
|
function recipe($ID, $Name, $Dauer, $Beschreibung){
|
||||||
$this->ID = $ID;
|
$this->ID = $ID;
|
||||||
$this->Name = $Name;
|
$this->Name = $Name;
|
||||||
$this->Dauer = $Dauer;
|
$this->Dauer = $Dauer;
|
||||||
|
|
|
@ -7095,26 +7095,27 @@ select.form-control {
|
||||||
|
|
||||||
[type="checkbox"] {
|
[type="checkbox"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
-webkit-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
[type="checkbox"]:before {
|
[type="checkbox"]:before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
/* position: absolute; */
|
||||||
left: -1.2em;
|
/* left: -1.2em; */
|
||||||
top: -0.9em;
|
/* top: -0.9em; */
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
border: 2px solid #333;
|
border: 2px solid #fff;
|
||||||
border-radius: 2px 8px 2px 4px / 5px 3px 5px 3px; }
|
border-radius: 2px 8px 2px 4px / 5px 3px 5px 3px; }
|
||||||
[type="checkbox"]:checked:after {
|
[type="checkbox"]:checked:after {
|
||||||
content: "x";
|
content: "x";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -0.64em;
|
left: 3px;
|
||||||
top: -0.48em;
|
/* top: -0.48em; */
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
line-height: 0.5;
|
line-height: 0.5;
|
||||||
color: #333; }
|
color: #fff; }
|
||||||
[type="checkbox"]:disabled:before {
|
[type="checkbox"]:disabled:before {
|
||||||
border: 2px solid #aaa; }
|
border: 2px solid #aaa; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue