mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Link to respective page on Calendar Event Click (#784)
* Link to Page on calendar event click * Undo my Prettier Changes.. Oops
This commit is contained in:
parent
fbb8999513
commit
29b4672346
@ -518,4 +518,8 @@ canvas.drawingBuffer {
|
||||
|
||||
.recipe-servings-input {
|
||||
width: 125px;
|
||||
}
|
||||
|
||||
.fc-event{
|
||||
cursor: pointer;
|
||||
}
|
@ -16,7 +16,10 @@ var calendar = $("#calendar").fullCalendar({
|
||||
"firstDay": firstDay,
|
||||
"eventLimit": false,
|
||||
"height": "auto",
|
||||
"eventSources": fullcalendarEventSources
|
||||
"eventSources": fullcalendarEventSources,
|
||||
eventClick: function(info) {
|
||||
location.href = info.link;
|
||||
}
|
||||
});
|
||||
|
||||
$("#ical-button").on("click", function(e)
|
||||
|
@ -31,7 +31,8 @@ class CalendarService extends BaseService
|
||||
$stockEvents[] = array(
|
||||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name,
|
||||
'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(
|
||||
'title' => $titlePrefix . $currentTaskEntry->name,
|
||||
'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(
|
||||
'title' => $titlePrefix . $chore->name . $assignedToText,
|
||||
'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(
|
||||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->name,
|
||||
'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,
|
||||
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name,
|
||||
'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…
x
Reference in New Issue
Block a user