Skip to content

Commit b663149

Browse files
committed
Fixed login popup windows. Improved overall usage experience.
1 parent 412540c commit b663149

File tree

11 files changed

+109
-1728
lines changed

11 files changed

+109
-1728
lines changed

src/main/java/com/ericsson/ei/frontend/WebController.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,25 @@ public String testRules(Model model) {
5656

5757
return "testRules";
5858
}
59+
60+
@RequestMapping("/login.html")
61+
public String login(Model model) {
62+
63+
return "login";
64+
}
65+
66+
@RequestMapping("/register.html")
67+
public String register(Model model) {
68+
69+
return "register";
70+
}
71+
72+
@RequestMapping("/forgot-password.html")
73+
public String forgotPassword(Model model) {
74+
75+
return "forgot-password";
76+
}
77+
5978

6079
// Backend host and port (Getter & Setters), application.properties -> greeting.xxx
6180
public String getFrontendServiceHost() {

src/main/resources/static/js/login.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
jQuery(document).ready(function() {
3+
4+
// document.getElementById("loginBtn").onclick = function() {
5+
//
6+
// var iframe = document.getElementById("mainFrame");
7+
// iframe.src = "http://localhost:8080/subscriptionpage.html";
8+
// }
9+
10+
11+
12+
13+
});

src/main/resources/static/js/main.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,34 @@ jQuery(document).ready(function() {
66
var iframe = document.getElementById("mainFrame");
77
iframe.src = "http://localhost:8080/testRules.html";
88
}
9-
9+
10+
function loadLoginPage() {
11+
var iframe = document.getElementById("mainFrame");
12+
iframe.src = "http://localhost:8080/login.html";
13+
}
14+
15+
document.getElementById("loginBtn").onclick = function() {
16+
17+
loadLoginPage();
18+
}
19+
20+
document.getElementById("logoutLoginBtn").onclick = function() {
21+
22+
loadLoginPage();
23+
}
24+
25+
document.getElementById("registerBtn").onclick = function() {
26+
27+
var iframe = document.getElementById("mainFrame");
28+
iframe.src = "http://localhost:8080/register.html";
29+
}
30+
31+
document.getElementById("forgotPasswordBtn").onclick = function() {
32+
33+
var iframe = document.getElementById("mainFrame");
34+
iframe.src = "http://localhost:8080/forgot-password.html";
35+
}
36+
1037
function loadMainPage() {
1138
var iframe = document.getElementById("mainFrame");
1239
iframe.src = "http://localhost:8080/subscriptionpage.html";

src/main/resources/templates/blank.html

Lines changed: 0 additions & 279 deletions
This file was deleted.

0 commit comments

Comments
 (0)