fix: navigating to the config pages allways loads, not only on the first attempt.
This commit is contained in:
parent
2f07efd215
commit
eef2f32e14
3 changed files with 61 additions and 60 deletions
|
@ -21,17 +21,19 @@ function initial_load() {
|
|||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
document.querySelector('#LispPlaygroundConfigPage')
|
||||
.addEventListener('viewshow', function() {
|
||||
initial_load();
|
||||
export default function (view, params) {
|
||||
view.addEventListener('viewshow', function() {
|
||||
initial_load(null);
|
||||
});
|
||||
view.addEventListener('viewhide', function (_e) {});
|
||||
view.addEventListener('viewdestroy', function (_e) {});
|
||||
|
||||
document.querySelector('#LispPlaygroundConfigPage')
|
||||
document.querySelector('#LispPlaygroundConfigPage')
|
||||
.addEventListener('pageshow', function() {
|
||||
initial_load();
|
||||
});
|
||||
|
||||
document.querySelector('#LispPlaygroundConfigForm')
|
||||
document.querySelector('#LispPlaygroundConfigForm')
|
||||
.addEventListener('submit', function (e) {
|
||||
e.preventDefault();
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -41,3 +43,4 @@ document.querySelector('#LispPlaygroundConfigForm')
|
|||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -88,23 +88,21 @@ function initial_load(selectedId) {
|
|||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
document.querySelector('#SmartCollectionConfigPage')
|
||||
.addEventListener('viewshow', function() {
|
||||
|
||||
export default function (view, params) {
|
||||
view.addEventListener('viewshow', function() {
|
||||
initial_load(null);
|
||||
});
|
||||
view.addEventListener('viewhide', function (_e) {});
|
||||
view.addEventListener('viewdestroy', function (_e) {});
|
||||
|
||||
document.querySelector('#SmartCollectionConfigPage')
|
||||
.addEventListener('pageshow', function() {
|
||||
initial_load(null);
|
||||
});
|
||||
|
||||
document.querySelector('#SmartcollectionSelection')
|
||||
document.querySelector('#SmartcollectionSelection')
|
||||
.addEventListener('change', function() {
|
||||
const selection = document.querySelector('#SmartcollectionSelection');
|
||||
fillForm(COLLECTIONS[selection.selectedIndex]);
|
||||
});
|
||||
|
||||
document.querySelector('#SmartCollectionConfigForm')
|
||||
document.querySelector('#SmartCollectionConfigForm')
|
||||
.addEventListener('submit', function (e) {
|
||||
Dashboard.showLoadingMsg();
|
||||
const selection = document.querySelector('#SmartcollectionSelection');
|
||||
|
@ -114,3 +112,4 @@ document.querySelector('#SmartCollectionConfigForm')
|
|||
});
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -116,22 +116,20 @@ function initial_load(selectedId) {
|
|||
});
|
||||
}
|
||||
|
||||
document.querySelector('#SmartPlaylistConfigPage')
|
||||
.addEventListener('viewshow', function() {
|
||||
initial_load(null);
|
||||
});
|
||||
document.querySelector('#SmartPlaylistConfigPage')
|
||||
.addEventListener('pageshow', function() {
|
||||
export default function (view, params) {
|
||||
view.addEventListener('viewshow', function() {
|
||||
initial_load(null);
|
||||
});
|
||||
view.addEventListener('viewhide', function (_e) {});
|
||||
view.addEventListener('viewdestroy', function (_e) {});
|
||||
|
||||
document.querySelector('#SmartplaylistSelection')
|
||||
document.querySelector('#SmartplaylistSelection')
|
||||
.addEventListener('change', function() {
|
||||
const selection = document.querySelector('#SmartplaylistSelection');
|
||||
fillForm(PLAYLISTS[selection.selectedIndex], USERS);
|
||||
});
|
||||
|
||||
document.querySelector('#SmartPlaylistConfigForm')
|
||||
document.querySelector('#SmartPlaylistConfigForm')
|
||||
.addEventListener('submit', function (e) {
|
||||
Dashboard.showLoadingMsg();
|
||||
const selection = document.querySelector('#SmartplaylistSelection');
|
||||
|
@ -141,3 +139,4 @@ document.querySelector('#SmartPlaylistConfigForm')
|
|||
});
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue