Browse Source

fixed script execution order

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
sqlite
Stephan Richter 2 months ago
parent
commit
8c62d6be68
  1. 0
      de.srsoftware.oidc.web/src/main/resources/de/clients.html
  2. 0
      de.srsoftware.oidc.web/src/main/resources/de/edit_client.html
  3. 0
      de.srsoftware.oidc.web/src/main/resources/de/index.html
  4. 0
      de.srsoftware.oidc.web/src/main/resources/de/login.html
  5. 0
      de.srsoftware.oidc.web/src/main/resources/de/navigation.html
  6. 0
      de.srsoftware.oidc.web/src/main/resources/de/new_client.html
  7. 0
      de.srsoftware.oidc.web/src/main/resources/de/reset.html
  8. 0
      de.srsoftware.oidc.web/src/main/resources/de/settings.html
  9. 0
      de.srsoftware.oidc.web/src/main/resources/de/users.html
  10. 5
      de.srsoftware.oidc.web/src/main/resources/en/scripts/clients.js
  11. 2
      de.srsoftware.oidc.web/src/main/resources/en/scripts/index.js
  12. 4
      de.srsoftware.oidc.web/src/main/resources/en/scripts/settings.js
  13. 1
      de.srsoftware.oidc.web/src/main/resources/en/scripts/user.js
  14. 3
      de.srsoftware.oidc.web/src/main/resources/en/scripts/users.js
  15. 9
      de.srsoftware.oidc.web/src/main/resources/en/todo.html

0
de.srsoftware.oidc.web/src/main/resources/DE/clients.html → de.srsoftware.oidc.web/src/main/resources/de/clients.html

0
de.srsoftware.oidc.web/src/main/resources/DE/edit_client.html → de.srsoftware.oidc.web/src/main/resources/de/edit_client.html

0
de.srsoftware.oidc.web/src/main/resources/DE/index.html → de.srsoftware.oidc.web/src/main/resources/de/index.html

0
de.srsoftware.oidc.web/src/main/resources/DE/login.html → de.srsoftware.oidc.web/src/main/resources/de/login.html

0
de.srsoftware.oidc.web/src/main/resources/DE/navigation.html → de.srsoftware.oidc.web/src/main/resources/de/navigation.html

0
de.srsoftware.oidc.web/src/main/resources/DE/new_client.html → de.srsoftware.oidc.web/src/main/resources/de/new_client.html

0
de.srsoftware.oidc.web/src/main/resources/DE/reset.html → de.srsoftware.oidc.web/src/main/resources/de/reset.html

0
de.srsoftware.oidc.web/src/main/resources/DE/settings.html → de.srsoftware.oidc.web/src/main/resources/de/settings.html

0
de.srsoftware.oidc.web/src/main/resources/DE/users.html → de.srsoftware.oidc.web/src/main/resources/de/users.html

5
de.srsoftware.oidc.web/src/main/resources/en/scripts/clients.js

@ -43,5 +43,6 @@ function remove(clientId){
}).then(handleRemove); }).then(handleRemove);
} }
} }
document.addEventListener("logged_in", function(event) { // wait until page loaded
fetch(client_controller+"/list").then(handleClients); fetch(client_controller+"/list").then(handleClients);
});

2
de.srsoftware.oidc.web/src/main/resources/en/scripts/index.js

@ -24,6 +24,6 @@ function handleDash(response){
}); });
} }
document.addEventListener("DOMContentLoaded", function(event) { // wait until page loaded document.addEventListener("logged_in", function(event) { // wait until page loaded
fetch(client_controller+"/dash").then(handleDash) fetch(client_controller+"/dash").then(handleDash)
}); });

4
de.srsoftware.oidc.web/src/main/resources/en/scripts/settings.js

@ -4,7 +4,6 @@ function fillForm(){
if (user == null){ if (user == null){
setTimeout(fillForm,100); setTimeout(fillForm,100);
} else { } else {
console.log(user);
setValue('username',user.username); setValue('username',user.username);
setValue('email',user.email); setValue('email',user.email);
setValue('uuid', user.uuid); setValue('uuid', user.uuid);
@ -158,7 +157,6 @@ function displayDuration(){
function durationUpdate(){ function durationUpdate(){
var raw = getValue('session_duration'); var raw = getValue('session_duration');
console.log(raw);
var mins = 0; var mins = 0;
var hrs = 0; var hrs = 0;
var days = 0; var days = 0;
@ -178,7 +176,7 @@ function durationUpdate(){
} }
document.addEventListener("DOMContentLoaded", function(event) { // wait until page loaded document.addEventListener("logged_in", function(event) { // wait until page loaded
fillForm(); fillForm();
fetch("/api/email/settings",{credentials:'include'}).then(handleMailSettings); fetch("/api/email/settings",{credentials:'include'}).then(handleMailSettings);
}); });

1
de.srsoftware.oidc.web/src/main/resources/en/scripts/user.js

@ -9,6 +9,7 @@ function handleUser(response){
response.json().then(u => { response.json().then(u => {
user = u; user = u;
fetch(web+"/navigation.html",{credentials:'include'}).then(handleNavigation); fetch(web+"/navigation.html",{credentials:'include'}).then(handleNavigation);
document.dispatchEvent(new Event('logged_in'));
}); });
} }
} }

3
de.srsoftware.oidc.web/src/main/resources/en/scripts/users.js

@ -75,7 +75,6 @@ function handleRemove(response){
redirect("users.html"); redirect("users.html");
} else { } else {
response.text().then(info => { response.text().then(info => {
console.log(info);
show(info); show(info);
}); });
} }
@ -102,7 +101,7 @@ function reset_password(userid){
fetch(user_controller+"/reset?user="+userid,{credentials:'include'}).then(() => { disable('reset-'+userid); }); fetch(user_controller+"/reset?user="+userid,{credentials:'include'}).then(() => { disable('reset-'+userid); });
} }
document.addEventListener("DOMContentLoaded", function(event) { // wait until page loaded document.addEventListener("logged_in", function(event) { // wait until page loaded
fetch(user_controller+"/list",{method:'POST',credentials:'include'}).then(handleUsers); fetch(user_controller+"/list",{method:'POST',credentials:'include'}).then(handleUsers);
}); });

9
de.srsoftware.oidc.web/src/main/resources/en/todo.html

@ -15,15 +15,6 @@
<ul> <ul>
<li>implement token refresh</li> <li>implement token refresh</li>
<li>Configuration im Frontend</li> <li>Configuration im Frontend</li>
<li>
On-Load events: manchmal feuern Requests, die User-Daten benötigen bevor der entsprechende User geladen wurde
<ul>
<li>Settings</li>
<li>Dashboard</li>
<li>Navigation</li>
<li>Clients</li>
</ul>
</li>
</ul> </ul>
</div> </div>
</body> </body>

Loading…
Cancel
Save