mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
Squashed commit
Updated dependencies Added the possibility to skip chore schedules (closes #1486) Show the meal plan section on the corresponding calendar events (closes #1582) Make it possible to define a time for meal plan sections and use that time for the corresponding calendar events (references #1582) Added a changelog template Make it possible to toggle the meal plan calendar view on bigger screens (closes #1678)
This commit is contained in:
@@ -19,11 +19,18 @@ $(".calendar").each(function()
|
||||
var isPrimarySection = BoolVal(container.attr("data-primary-section"));
|
||||
var isLastSection = BoolVal(container.attr("data-last-section"));
|
||||
|
||||
var rightButtonList = "agendaWeek,agendaDay,prev,today,next";
|
||||
if ($(window).width() < 768)
|
||||
{
|
||||
var rightButtonList = "prev,today,next";
|
||||
}
|
||||
|
||||
var headerConfig = {
|
||||
"left": "title",
|
||||
"center": "",
|
||||
"right": "prev,today,next"
|
||||
"right": rightButtonList
|
||||
};
|
||||
|
||||
if (!isPrimarySection)
|
||||
{
|
||||
headerConfig = {
|
||||
@@ -39,7 +46,7 @@ $(".calendar").each(function()
|
||||
"weekNumbers": false,
|
||||
"eventLimit": false,
|
||||
"eventSources": fullcalendarEventSources,
|
||||
"defaultView": ($(window).width() < 768) ? "agendaDay" : "agendaWeek",
|
||||
"defaultView": ($(window).width() < 768 || GetUriParam("days") == "0") ? "agendaDay" : "agendaWeek",
|
||||
"allDayText": sectionName,
|
||||
"allDayHtml": sectionName,
|
||||
"minTime": "00:00:00",
|
||||
@@ -310,6 +317,15 @@ $(".calendar").each(function()
|
||||
{
|
||||
UpdateUriParam("start", view.start.format("YYYY-MM-DD"));
|
||||
|
||||
if (view.name == "agendaDay")
|
||||
{
|
||||
UpdateUriParam("days", "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveUriParam("days");
|
||||
}
|
||||
|
||||
if (firstRender)
|
||||
{
|
||||
firstRender = false
|
||||
|
Reference in New Issue
Block a user