Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dominik Weitz
AKPlanning
Compare revisions
main to 3246148c20b2f88fdeecf2040a8274a4b47cb5ee
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
mollux/akplanning
Select target project
No results found
3246148c20b2f88fdeecf2040a8274a4b47cb5ee
Select Git revision
Swap
Target
kif/akplanning
Select target project
konstantin/akplanning
matedealer/akplanning
kif/akplanning
mirco/akplanning
lordofthevoid/akplanning
voidptr/akplanning
xayomer/akplanning-fork
mollux/akplanning
neumantm/akplanning
mmarx/akplanning
nerf/akplanning
felix_bonn/akplanning
sebastian.uschmann/akplanning
13 results
main
Select Git revision
Branches
koma/feature/preference-polling-form
komasolver
main
renovate/django-5.x
renovate/django_csp-4.x
renovate/uwsgi-2.x
6 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AKSubmission/views.py
+7
-0
7 additions, 0 deletions
AKSubmission/views.py
static_common/common/js/availabilities.js
+29
-10
29 additions, 10 deletions
static_common/common/js/availabilities.js
with
36 additions
and
10 deletions
AKSubmission/views.py
View file @
3246148c
...
...
@@ -302,6 +302,13 @@ class AKOwnerCreateView(EventSlugMixin, EventInactiveRedirectMixin, CreateView):
form_class
=
AKOwnerForm
def
get_success_url
(
self
):
if
"
add_to_existing_ak
"
in
self
.
request
.
GET
:
ak_pk
=
self
.
request
.
GET
[
'
add_to_existing_ak
'
]
ak
=
get_object_or_404
(
AK
,
pk
=
ak_pk
)
ak
.
owners
.
add
(
self
.
object
)
messages
.
add_message
(
self
.
request
,
messages
.
SUCCESS
,
_
(
"
Added
'
{owner}
'
as new owner of
'
{ak.name}
'"
).
format
(
owner
=
self
.
object
,
ak
=
ak
))
return
reverse_lazy
(
'
submit:ak_detail
'
,
kwargs
=
{
'
event_slug
'
:
self
.
kwargs
[
'
event_slug
'
],
'
pk
'
:
ak
.
pk
})
return
reverse_lazy
(
'
submit:submit_ak
'
,
kwargs
=
{
'
event_slug
'
:
self
.
kwargs
[
'
event_slug
'
],
'
owner_slug
'
:
self
.
object
.
slug
})
...
...
This diff is collapsed.
Click to expand it.
static_common/common/js/availabilities.js
View file @
3246148c
...
...
@@ -6,7 +6,7 @@
// It was significantly changed to deal with the newer fullcalendar version, event specific timezones,
// to remove the dependency to moments timezone and improve the visualization of deletion
function
createAvailabilityEditors
(
timezone
,
language
,
startDate
,
endDate
)
{
function
createAvailabilityEditors
(
timezone
,
language
,
startDate
,
endDate
,
slotResolution
=
'
00:30:00
'
)
{
$
(
"
input.availabilities-editor-data
"
).
each
(
function
()
{
const
eventColor
=
'
#28B62C
'
;
...
...
@@ -16,6 +16,20 @@ function createAvailabilityEditors(timezone, language, startDate, endDate) {
data_field
.
after
(
editor
);
data_field
.
hide
();
// Add inputs to add slots without the need to click and drag
let
manualSlotAdderSource
=
"
<form id='formManualAdd'><table class='table table-responsive mb-0'><tr>
"
+
"
<td style='vertical-align: middle;'><input type='datetime-local' id='inputStart' value='
"
+
startDate
+
"
' min='
"
+
startDate
+
"
' max='
"
+
endDate
+
"
'></td>
"
+
"
<td style='vertical-align: middle;'><i class=
\"
fas fa-long-arrow-alt-right
\"
></i></td>
"
+
"
<td style='vertical-align: middle;'><input type='datetime-local' id='inputEnd' value='
"
+
endDate
+
"
' min='
"
+
startDate
+
"
' max='
"
+
endDate
+
"
'></td>
"
+
"
<td><button class='btn btn-primary' type='submit'><i class=
\"
fas fa-plus
\"
></i></button></td></tr></table></form>
"
;
let
manualSlotAdder
=
$
(
manualSlotAdderSource
);
editor
.
after
(
manualSlotAdder
);
$
(
'
#formManualAdd
'
).
submit
(
function
(
event
)
{
add
(
$
(
'
#inputStart
'
).
val
(),
$
(
'
#inputEnd
'
).
val
());
event
.
preventDefault
();
});
let
editable
=
!
Boolean
(
data_field
.
attr
(
"
disabled
"
));
let
data
=
JSON
.
parse
(
data_field
.
attr
(
"
value
"
));
let
events
=
data
.
availabilities
.
map
(
function
(
e
)
{
...
...
@@ -58,15 +72,7 @@ function createAvailabilityEditors(timezone, language, startDate, endDate) {
events
:
data
.
availabilities
,
eventBackgroundColor
:
eventColor
,
select
:
function
(
info
)
{
resetDeletionCandidate
();
plan
.
addEvent
({
title
:
""
,
start
:
info
.
start
,
end
:
info
.
end
,
id
:
'
new
'
+
newEventsCounter
})
newEventsCounter
++
;
save_events
();
add
(
info
.
start
,
info
.
end
);
},
eventClick
:
function
(
info
)
{
if
(
eventMarkedForDeletion
!==
undefined
&&
(
eventMarkedForDeletion
.
id
===
info
.
event
.
id
))
{
...
...
@@ -84,9 +90,22 @@ function createAvailabilityEditors(timezone, language, startDate, endDate) {
selectOverlap
:
false
,
eventOverlap
:
false
,
eventChange
:
save_events
,
slotDuration
:
slotResolution
,
});
plan
.
render
();
function
add
(
start
,
end
)
{
resetDeletionCandidate
();
plan
.
addEvent
({
title
:
""
,
start
:
start
,
end
:
end
,
id
:
'
new
'
+
newEventsCounter
})
newEventsCounter
++
;
save_events
();
}
function
makeDeletionCandidate
(
el
)
{
el
.
classList
.
add
(
"
deleteEvent
"
);
$
(
el
).
find
(
"
.fc-event-title
"
).
html
(
"
<i class='fas fa-trash'></i> <i class='fas fa-question'></i>
"
);
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next