Commit 0eacf7c304e8678bbb6cfd20caff37d0b47fe67b
Exists in
master
and in
2 other branches
Merge branch 'refactoring' of https://github.com/amadeusproject/amadeuslms into refactoring
Showing
2 changed files
with
7 additions
and
6 deletions
Show diff stats
amadeus/static/js/socket.js
@@ -4,7 +4,8 @@ if (("Notification" in window)) { | @@ -4,7 +4,8 @@ if (("Notification" in window)) { | ||
4 | } | 4 | } |
5 | } | 5 | } |
6 | 6 | ||
7 | -socket = new WebSocket("ws://" + window.location.host + "/"); | 7 | +var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws"; |
8 | +socket = new WebSocket(ws_scheme + "://" + window.location.host + "/"); | ||
8 | 9 | ||
9 | socket.onmessage = function(e) { | 10 | socket.onmessage = function(e) { |
10 | content = JSON.parse(e.data); | 11 | content = JSON.parse(e.data); |
@@ -46,7 +47,7 @@ function muralNotificationPost(content) { | @@ -46,7 +47,7 @@ function muralNotificationPost(content) { | ||
46 | $(content.container).prepend(content.complete); | 47 | $(content.container).prepend(content.complete); |
47 | 48 | ||
48 | $('.no-subjects').attr('style', 'display:none'); | 49 | $('.no-subjects').attr('style', 'display:none'); |
49 | - } | 50 | + } |
50 | } else { | 51 | } else { |
51 | $('.mural_badge').each(function () { | 52 | $('.mural_badge').each(function () { |
52 | var actual = $(this).text(); | 53 | var actual = $(this).text(); |
@@ -257,7 +258,7 @@ function messageReceived(content) { | @@ -257,7 +258,7 @@ function messageReceived(content) { | ||
257 | talk_notifies.text(actual_count); | 258 | talk_notifies.text(actual_count); |
258 | 259 | ||
259 | actual_date.html(content.last_date); | 260 | actual_date.html(content.last_date); |
260 | - | 261 | + |
261 | $('.chat_badge').each(function () { | 262 | $('.chat_badge').each(function () { |
262 | var actual = $(this).text(); | 263 | var actual = $(this).text(); |
263 | 264 | ||
@@ -303,7 +304,7 @@ function messageReceived(content) { | @@ -303,7 +304,7 @@ function messageReceived(content) { | ||
303 | 304 | ||
304 | setTimeout(notification.close.bind(notification), 3000); | 305 | setTimeout(notification.close.bind(notification), 3000); |
305 | } | 306 | } |
306 | - } | 307 | + } |
307 | } | 308 | } |
308 | 309 | ||
309 | function changeUserStatus(content) { | 310 | function changeUserStatus(content) { |
@@ -318,4 +319,4 @@ function changeUserStatus(content) { | @@ -318,4 +319,4 @@ function changeUserStatus(content) { | ||
318 | } | 319 | } |
319 | 320 | ||
320 | elem.attr('data-original-title', content.status); | 321 | elem.attr('data-original-title', content.status); |
321 | -} | ||
322 | \ No newline at end of file | 322 | \ No newline at end of file |
323 | +} |
amadeus/templates/base.html
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | <meta http-equiv="Cache-Control" content="no-cache, no-store" /> | 14 | <meta http-equiv="Cache-Control" content="no-cache, no-store" /> |
15 | <link href="{{ theme.favicon_url }}" rel="shortcut icon" /> | 15 | <link href="{{ theme.favicon_url }}" rel="shortcut icon" /> |
16 | <!-- Roboto font --> | 16 | <!-- Roboto font --> |
17 | - <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> | 17 | + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> |
18 | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | 18 | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> |
19 | 19 | ||
20 | <!-- Bootstrap and themes (material) --> | 20 | <!-- Bootstrap and themes (material) --> |