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
Felix Blanke
AKPlanning
Commits
1585e433
Commit
1585e433
authored
3 years ago
by
Nadja Geisler
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-js' into 'main'
Fix several javascript issues Closes
#121
See merge request
!96
parents
aa001e3e
2c359090
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AKScheduling/templates/admin/AKScheduling/manage_tracks.html
+12
-9
12 additions, 9 deletions
AKScheduling/templates/admin/AKScheduling/manage_tracks.html
templates/admin/base_site.html
+4
-0
4 additions, 0 deletions
templates/admin/base_site.html
templates/base.html
+4
-1
4 additions, 1 deletion
templates/base.html
with
20 additions
and
10 deletions
AKScheduling/templates/admin/AKScheduling/manage_tracks.html
+
12
−
9
View file @
1585e433
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
{% block extrahead %}
{% block extrahead %}
{{ block.super }}
{{ block.super }}
<script
src=
"{% static "
common
/
vendor
/
sortable
/
s
ortable.min.js
"
%}"
></script>
<script
src=
"{% static "
common
/
vendor
/
sortable
/
S
ortable.min.js
"
%}"
></script>
<script
src=
"{% static "
common
/
vendor
/
sortable
/
jquery-sortable.js
"
%}"
></script>
<script
src=
"{% static "
common
/
vendor
/
sortable
/
jquery-sortable.js
"
%}"
></script>
<style>
<style>
...
@@ -77,7 +77,9 @@
...
@@ -77,7 +77,9 @@
}
}
function
update_ak_track
(
ak_id
,
track_id
,
container
)
{
function
update_ak_track
(
ak_id
,
track_id
,
container
)
{
mark_dirty
(
container
);
if
(
container
!==
undefined
)
mark_dirty
(
container
);
$
.
ajax
({
$
.
ajax
({
url
:
"
{% url
"
model
:
AK
-
list
"
event_slug=event.slug %}
"
+
ak_id
+
"
/
"
,
url
:
"
{% url
"
model
:
AK
-
list
"
event_slug=event.slug %}
"
+
ak_id
+
"
/
"
,
type
:
'
PATCH
'
,
type
:
'
PATCH
'
,
...
@@ -85,7 +87,8 @@
...
@@ -85,7 +87,8 @@
track
:
track_id
,
track
:
track_id
,
},
},
success
:
function
(
response
)
{
success
:
function
(
response
)
{
mark_clean
(
container
);
if
(
container
!==
undefined
)
mark_clean
(
container
);
},
},
error
:
function
(
response
)
{
error
:
function
(
response
)
{
alert
(
"
ERROR. Did not update
"
+
changeInfo
.
event
.
title
)
alert
(
"
ERROR. Did not update
"
+
changeInfo
.
event
.
title
)
...
@@ -100,16 +103,16 @@
...
@@ -100,16 +103,16 @@
// Element is dropped into the list from another list
// Element is dropped into the list from another list
onAdd
:
function
(
/**Event*/
evt
)
{
onAdd
:
function
(
/**Event*/
evt
)
{
// same properties as onEnd
// same properties as onEnd
console
.
log
(
evt
.
item
);
var
ak_id
=
evt
.
item
.
dataset
[
"
akId
"
];
var
ak_id
=
evt
.
item
.
dataset
[
"
akId
"
];
var
container
=
$
(
evt
.
to
).
parents
(
"
.track-container
"
);
if
(
evt
.
to
.
dataset
[
"
sync
"
]
===
"
true
"
)
// For lists that should stay in sync with server (all except 'without track')
{
if
(
evt
.
to
.
dataset
[
"
sync
"
]
===
"
true
"
)
{
var
track_id
=
evt
.
to
.
dataset
[
"
trackId
"
]
var
container
=
$
(
evt
.
to
).
parents
(
"
.track-container
"
);
var
track_id
=
evt
.
to
.
dataset
[
"
trackId
"
];
update_ak_track
(
ak_id
,
track_id
,
container
);
update_ak_track
(
ak_id
,
track_id
,
container
);
}
}
else
{
else
{
update_ak_track
(
ak_id
,
""
);
update_ak_track
(
ak_id
,
""
,
undefined
);
}
}
},
},
};
};
...
...
This diff is collapsed.
Click to expand it.
templates/admin/base_site.html
+
4
−
0
View file @
1585e433
...
@@ -11,6 +11,10 @@
...
@@ -11,6 +11,10 @@
{% endblock %}
{% endblock %}
{% block extrahead %}
{% block extrahead %}
<!-- Load popper before bootstrap loads -->
<script
src=
"{% static "
common
/
vendor
/
popper
/
popper-1.14.7.min.js
"
%}"
></script>
<!-- Load bootstrap, jquery and fontawesome-->
{% bootstrap_css %}
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}
{% bootstrap_javascript jquery='full' %}
{% fontawesome_5_static %}
{% fontawesome_5_static %}
...
...
This diff is collapsed.
Click to expand it.
templates/base.html
+
4
−
1
View file @
1585e433
...
@@ -12,7 +12,10 @@
...
@@ -12,7 +12,10 @@
<title>
{% block title %}AK Planning{% endblock %}
</title>
<title>
{% block title %}AK Planning{% endblock %}
</title>
{# Load Bootstrap CSS and JavaScript as well as font awesome #}
<!-- Load popper before bootstrap loads -->
<script
src=
"{% static "
common
/
vendor
/
popper
/
popper-1.14.7.min.js
"
%}"
></script>
<!-- Load bootstrap, jquery and fontawesome-->
{% bootstrap_css %}
{% bootstrap_css %}
{% bootstrap_javascript jquery='slim' %}
{% bootstrap_javascript jquery='slim' %}
{% fontawesome_5_static %}
{% fontawesome_5_static %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment