Improve pages.home preloading when loading pages.quiz
This commit is contained in:
parent
2d501f7575
commit
e99f1bd636
|
@ -460,6 +460,13 @@ function scriptPageHandler(modname, cfg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.preload = {
|
app.preload = {
|
||||||
|
home: function() {
|
||||||
|
app.script('pages.home');
|
||||||
|
app.template.loadMany([
|
||||||
|
'home.index',
|
||||||
|
'home.quiz_item',
|
||||||
|
]);
|
||||||
|
},
|
||||||
quiz: function() {
|
quiz: function() {
|
||||||
app.script('pages.quiz');
|
app.script('pages.quiz');
|
||||||
app.template.loadMany([
|
app.template.loadMany([
|
||||||
|
|
|
@ -25,6 +25,7 @@ app.pages.quiz = {
|
||||||
window.prevHash === '')
|
window.prevHash === '')
|
||||||
animateTimeout('#quiz', 'slide-from-right');
|
animateTimeout('#quiz', 'slide-from-right');
|
||||||
page().setDragEvent();
|
page().setDragEvent();
|
||||||
|
app.preload.home();
|
||||||
};
|
};
|
||||||
if (data === undefined)
|
if (data === undefined)
|
||||||
http.get(`/api/v1/me/quizs?id=${args[1]}`,
|
http.get(`/api/v1/me/quizs?id=${args[1]}`,
|
||||||
|
|
Loading…
Reference in New Issue