Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
a2ce2e40
Verified
Commit
a2ce2e40
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Generalise (and fix) live loading script
parent
73f54bfd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Pipeline
#760
failed
5 years ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/core/static/js/include_ajax_live.js
+2
-6
2 additions, 6 deletions
aleksis/core/static/js/include_ajax_live.js
aleksis/core/templates/core/index.html
+1
-1
1 addition, 1 deletion
aleksis/core/templates/core/index.html
with
3 additions
and
7 deletions
aleksis/core/static/js/include_ajax_live.js
+
2
−
6
View file @
a2ce2e40
...
...
@@ -24,16 +24,12 @@ const clearAsyncInterval = (intervalIndex) => {
}
};
let
dashb
oa
r
d_interval
=
setAsyncInterval
(
async
()
=>
{
let
live_l
oad_interval
=
setAsyncInterval
(
async
()
=>
{
console
.
log
(
'
fetching new data
'
);
const
promise
=
new
Promise
((
resolve
)
=>
{
$
(
'
#
dashb
oa
r
d
'
).
load
(
"
/?include_by_ajax_full_render=1 #dashb
oa
r
d
"
);
$
(
'
#
live_l
oad
'
).
load
(
window
.
location
.
pathname
+
"
#live_l
oad
"
);
resolve
(
1
);
});
await
promise
;
console
.
log
(
'
data fetched successfully
'
);
},
15000
);
$
(
document
).
on
(
'
include_by_ajax_all_loaded
'
,
function
()
{
console
.
log
(
'
Now all placeholders are loaded and replaced with content
'
);
})
This diff is collapsed.
Click to expand it.
aleksis/core/templates/core/index.html
+
1
−
1
View file @
a2ce2e40
...
...
@@ -24,7 +24,7 @@
</div>
{% endfor %}
<div
class=
"row"
>
<div
class=
"row"
id=
"live_load"
>
{% for widget in widgets %}
<div
class=
"col s12 m12 l6 xl4"
>
{% with widget as d_widget %}
...
...
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