mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
Link to Page on calendar event click
This commit is contained in:
parent
7fb76df33a
commit
a71eb279ad
|
|
@ -1,6 +1,6 @@
|
||||||
/* Main style customizations */
|
/* Main style customizations */
|
||||||
body {
|
body {
|
||||||
font-family: 'Noto Sans', sans-serif;
|
font-family: "Noto Sans", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-text {
|
.content-text {
|
||||||
|
|
@ -64,7 +64,7 @@ a.discrete-link:focus {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fixes smooth scrolling on iOS */
|
/* Fixes smooth scrolling on iOS */
|
||||||
#sidebarResponsive,
|
#sidebarResponsive,
|
||||||
.fullscreen {
|
.fullscreen {
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
@ -78,16 +78,16 @@ a.discrete-link:focus {
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.fullscreen-card {
|
body.fullscreen-card {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen-card .hide-on-fullscreen-card {
|
.fullscreen-card .hide-on-fullscreen-card {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-check-input.is-valid ~ .form-check-label,
|
.form-check-input.is-valid ~ .form-check-label,
|
||||||
.was-validated .form-check-input:valid ~ .form-check-label {
|
.was-validated .form-check-input:valid ~ .form-check-label {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ iframe {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide the default up/down arrow buttons for number inputs because we use our own buttons in numberpicker */
|
/* Hide the default up/down arrow buttons for number inputs because we use our own buttons in numberpicker */
|
||||||
input[type='number'] {
|
input[type="number"] {
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
}
|
}
|
||||||
input::-webkit-outer-spin-button,
|
input::-webkit-outer-spin-button,
|
||||||
|
|
@ -202,7 +202,8 @@ input::-webkit-inner-spin-button {
|
||||||
cursor: wait;
|
cursor: wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expandable-text .collapse, .module .collapsing {
|
.expandable-text .collapse,
|
||||||
|
.module .collapsing {
|
||||||
height: 2.4rem;
|
height: 2.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -232,7 +233,6 @@ input::-webkit-inner-spin-button {
|
||||||
width: 96vw; /* Set width of popup menu to screen size */
|
width: 96vw; /* Set width of popup menu to screen size */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Set width of popup menu to fixed value on larger devices */
|
/* Set width of popup menu to fixed value on larger devices */
|
||||||
@media (min-width: 400px) {
|
@media (min-width: 400px) {
|
||||||
.table-inline-menu.dropdown-menu {
|
.table-inline-menu.dropdown-menu {
|
||||||
|
|
@ -247,7 +247,7 @@ input::-webkit-inner-spin-button {
|
||||||
|
|
||||||
.table-inline-menu .dropdown-item .dropdown-item-icon {
|
.table-inline-menu .dropdown-item .dropdown-item-icon {
|
||||||
min-width: 24px;
|
min-width: 24px;
|
||||||
padding-left:20px;
|
padding-left: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
@ -269,7 +269,6 @@ input::-webkit-inner-spin-button {
|
||||||
}
|
}
|
||||||
#barcodescanner-livestream video {
|
#barcodescanner-livestream video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
#barcodescanner-livestream canvas {
|
#barcodescanner-livestream canvas {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -290,10 +289,11 @@ input::-webkit-inner-spin-button {
|
||||||
padding-right: 0.75rem !important;
|
padding-right: 0.75rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group-xs > .btn, .btn-xs {
|
.btn-group-xs > .btn,
|
||||||
padding : 0.25rem 0.4rem;
|
.btn-xs {
|
||||||
font-size : 0.875rem;
|
padding: 0.25rem 0.4rem;
|
||||||
line-height : 0.5;
|
font-size: 0.875rem;
|
||||||
|
line-height: 0.5;
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -361,27 +361,27 @@ input::-webkit-inner-spin-button {
|
||||||
/* Third party component customizations - SB Admin 2 */
|
/* Third party component customizations - SB Admin 2 */
|
||||||
#mainNav .navbar-collapse .navbar-nav > .nav-item.dropdown > .nav-link:after,
|
#mainNav .navbar-collapse .navbar-nav > .nav-item.dropdown > .nav-link:after,
|
||||||
#mainNav .navbar-collapse .navbar-sidenav .nav-link-collapse:after {
|
#mainNav .navbar-collapse .navbar-sidenav .nav-link-collapse:after {
|
||||||
font-family: 'Font Awesome 5 Free';
|
font-family: "Font Awesome 5 Free";
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:992px) {
|
@media (max-width: 992px) {
|
||||||
#mainNav .navbar-collapse .navbar-sidenav > .nav-item > .nav-link {
|
#mainNav .navbar-collapse .navbar-sidenav > .nav-item > .nav-link {
|
||||||
padding: 0.8em;
|
padding: 0.8em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width:992px) {
|
@media (min-width: 992px) {
|
||||||
#mainNav .navbar-collapse .navbar-sidenav {
|
#mainNav .navbar-collapse .navbar-sidenav {
|
||||||
margin-top: 46px;
|
margin-top: 46px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mainNav.fixed-top .navbar-sidenav {
|
#mainNav.fixed-top .navbar-sidenav {
|
||||||
height: calc(100vh - 94px)
|
height: calc(100vh - 94px);
|
||||||
}
|
}
|
||||||
|
|
||||||
#mainNav.fixed-top .sidenav-toggler {
|
#mainNav.fixed-top .sidenav-toggler {
|
||||||
margin-top:calc(100vh - 48px);
|
margin-top: calc(100vh - 48px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-wrapper {
|
.content-wrapper {
|
||||||
|
|
@ -432,7 +432,6 @@ canvas.drawingBuffer {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.warning-message,
|
.warning-message,
|
||||||
.error-message,
|
.error-message,
|
||||||
.normal-message {
|
.normal-message {
|
||||||
|
|
@ -513,9 +512,13 @@ canvas.drawingBuffer {
|
||||||
|
|
||||||
.recipe-expand {
|
.recipe-expand {
|
||||||
right: 1.25rem;
|
right: 1.25rem;
|
||||||
top: .75rem;
|
top: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recipe-servings-input {
|
.recipe-servings-input {
|
||||||
width: 125px;
|
width: 125px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fc-event {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,10 @@ var calendar = $("#calendar").fullCalendar({
|
||||||
"firstDay": firstDay,
|
"firstDay": firstDay,
|
||||||
"eventLimit": false,
|
"eventLimit": false,
|
||||||
"height": "auto",
|
"height": "auto",
|
||||||
"eventSources": fullcalendarEventSources
|
"eventSources": fullcalendarEventSources,
|
||||||
|
eventClick: function(info) {
|
||||||
|
location.href = info.link;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#ical-button").on("click", function(e)
|
$("#ical-button").on("click", function(e)
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,8 @@ class CalendarService extends BaseService
|
||||||
$stockEvents[] = array(
|
$stockEvents[] = array(
|
||||||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name,
|
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name,
|
||||||
'start' => $currentStockEntry->best_before_date,
|
'start' => $currentStockEntry->best_before_date,
|
||||||
'date_format' => 'date'
|
'date_format' => 'date',
|
||||||
|
'link' => $this->UrlManager->ConstructUrl('/stockoverview')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +47,8 @@ class CalendarService extends BaseService
|
||||||
$taskEvents[] = array(
|
$taskEvents[] = array(
|
||||||
'title' => $titlePrefix . $currentTaskEntry->name,
|
'title' => $titlePrefix . $currentTaskEntry->name,
|
||||||
'start' => $currentTaskEntry->due_date,
|
'start' => $currentTaskEntry->due_date,
|
||||||
'date_format' => 'date'
|
'date_format' => 'date',
|
||||||
|
'link' => $this->UrlManager->ConstructUrl('/tasks')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -71,7 +73,8 @@ class CalendarService extends BaseService
|
||||||
$choreEvents[] = array(
|
$choreEvents[] = array(
|
||||||
'title' => $titlePrefix . $chore->name . $assignedToText,
|
'title' => $titlePrefix . $chore->name . $assignedToText,
|
||||||
'start' => $currentChoreEntry->next_estimated_execution_time,
|
'start' => $currentChoreEntry->next_estimated_execution_time,
|
||||||
'date_format' => 'datetime'
|
'date_format' => 'datetime',
|
||||||
|
'link' => $this->UrlManager->ConstructUrl('/choresoverview')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -86,7 +89,8 @@ class CalendarService extends BaseService
|
||||||
$batteryEvents[] = array(
|
$batteryEvents[] = array(
|
||||||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->name,
|
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->name,
|
||||||
'start' => $currentBatteryEntry->next_estimated_charge_time,
|
'start' => $currentBatteryEntry->next_estimated_charge_time,
|
||||||
'date_format' => 'datetime'
|
'date_format' => 'datetime',
|
||||||
|
'link' => $this->UrlManager->ConstructUrl('/batteriesoverview')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -107,7 +111,8 @@ class CalendarService extends BaseService
|
||||||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->includes_recipe_id)->name,
|
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->includes_recipe_id)->name,
|
||||||
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name,
|
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name,
|
||||||
'date_format' => 'date',
|
'date_format' => 'date',
|
||||||
'description' => $this->UrlManager->ConstructUrl('/mealplan' . '?week=' . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name)
|
'description' => $this->UrlManager->ConstructUrl('/mealplan' . '?week=' . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name),
|
||||||
|
'link' => $this->UrlManager->ConstructUrl('/recipes' . '?recipe=' . $recipeOfCurrentDay->includes_recipe_id . "#fullscreen")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user