Skip to content

Commit 888fb05

Browse files
committed
Deliver own static resources. For offline dev ;)
1 parent 68ad949 commit 888fb05

File tree

5 files changed

+50
-8
lines changed

5 files changed

+50
-8
lines changed

src/main/resources/static/bootstrap.min.css

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/bootstrap.min.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/index.html

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<html>
33
<head>
44
<title>VotesApp WebClient Frontend</title>
5-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
6-
<script src="//cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js"></script>
5+
<script src="jquery.min.js"></script>
6+
<script src="sockjs.min.js"></script>
77
<script src="stomp.min.js"></script>
88
<script type="text/javascript">
99
$(function() {
@@ -14,8 +14,8 @@
1414
console.log('Connected: ' + frame);
1515
stompClient.subscribe('/receive', function(msg){
1616
var body = JSON.parse(msg.body);
17-
var content = { text: body.text, groupId: body.groupId };
18-
$("#msgs").append('<div class="alert alert-info" role="alert"><strong>' + body.groupId + '</strong> ' + body.text +'</div>');
17+
var content = { text: body.text.replace(/\n/g, '<br>'), groupId: body.groupId };
18+
$("#msgs").append('<div class="alert alert-info" role="alert"><strong>' + content.groupId + '</strong> ' + content.text +'</div>');
1919
});
2020
});
2121
}
@@ -30,15 +30,14 @@
3030
type: "POST",
3131
url: "/send",
3232
data: JSON.stringify({phone: phone, group: group, text: text}),
33-
contentType: "application/json; charset=utf-8",
34-
dataType: "json"
33+
contentType: "application/json; charset=utf-8"
3534
});
3635
$("#msgs").append('<div class="alert alert-success" role="alert"><strong>' + group + '</strong> ' + text +'</div>');
3736
});
3837
});
3938
</script>
4039

41-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
40+
<link rel="stylesheet" href="bootstrap.min.css">
4241
</head>
4342
<body>
4443
<noscript><h2 style="color: #ff0000">Please enable Javascript and reload this page!</h2></noscript>
@@ -63,6 +62,6 @@ <h1>Debug VotestApp Interface</h1>
6362
<div id="msgs"></div>
6463
</div>
6564

66-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
65+
<script src="bootstrap.min.js"></script>
6766
</body>
6867
</html>

src/main/resources/static/jquery.min.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/sockjs.min.js

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)