Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
WerLehrtWo
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
studip-plugins-oeffentlich
WerLehrtWo
Merge requests
!3
Resolve "Save calendar default date in session"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Resolve "Save calendar default date in session"
issue-13
into
master
Overview
0
Commits
1
Pipelines
0
Changes
4
Open
Murtaza Sultani
requested to merge
issue-13
into
master
1 month ago
Overview
0
Commits
1
Pipelines
0
Changes
4
Expand
Closes
#12
👍
0
👎
0
Merge request reports
Compare
master
master (HEAD)
and
latest version
latest version
08e39b14
1 commit,
1 month ago
4 files
+
59
−
15
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
assets/javascript/WerLehrtWo.js
+
13
−
1
Options
@@ -6,9 +6,18 @@ STUDIP.ready(function () {
jQuery
(
'
#werlehrtwo_date
'
).
datepicker
();
if
(
STUDIP
.
Werlehrtwo
.
calendar
==
null
)
{
let
date_str
=
$
(
'
#werlehrtwo_date
'
).
val
();
//date_str is in the form dd.mm.yyyy. It needs to be converted first:
let
date_parts
=
date_str
.
split
(
'
.
'
);
let
iso_date
=
date_parts
[
2
]
+
'
-
'
+
date_parts
[
1
]
+
'
-
'
+
date_parts
[
0
];
let
config
=
{
defaultDate
:
iso_date
};
STUDIP
.
loadChunk
(
'
fullcalendar
'
).
then
(()
=>
{
let
calendar_node
=
jQuery
(
'
[data-werlehrtwo-calendar="1"]
'
)[
0
];
STUDIP
.
Werlehrtwo
.
calendar
=
STUDIP
.
Fullcalendar
.
createFromNode
(
calendar_node
);
STUDIP
.
Werlehrtwo
.
calendar
=
STUDIP
.
Fullcalendar
.
createFromNode
(
calendar_node
,
config
);
});
}
@@ -20,12 +29,15 @@ STUDIP.ready(function () {
});
jQuery
(
document
).
on
(
'
change
'
,
'
#werlehrtwo_date
'
,
function
(
event
)
{
if
(
STUDIP
.
Werlehrtwo
.
calendar
)
{
let
date_str
=
event
.
target
.
value
;
//date_str is in the form dd.mm.yyyy. It needs to be converted first:
let
date_parts
=
date_str
.
split
(
'
.
'
);
let
iso_date
=
date_parts
[
2
]
+
'
-
'
+
date_parts
[
1
]
+
'
-
'
+
date_parts
[
0
];
STUDIP
.
Werlehrtwo
.
calendar
.
gotoDate
(
iso_date
);
$
(
'
#WerLehrtWo_update_default_date
'
).
submit
();
}
});
});
Loading