summaryrefslogtreecommitdiffstats
path: root/web/templates
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2016-01-26 09:52:26 -0500
committerhmhealey <harrisonmhealey@gmail.com>2016-01-26 13:58:23 -0500
commitc889d9bee107c61513f037fa2f66bf3a0d3fcb42 (patch)
treefeb1ac4f79d2987d2b3e933afa03e930685d11e6 /web/templates
parenta6c97490b3c6b7bca00d16bc436abf902ee7b101 (diff)
downloadchat-c889d9bee107c61513f037fa2f66bf3a0d3fcb42.tar.gz
chat-c889d9bee107c61513f037fa2f66bf3a0d3fcb42.tar.bz2
chat-c889d9bee107c61513f037fa2f66bf3a0d3fcb42.zip
Moved PreferenceStore initialization into head.html
Diffstat (limited to 'web/templates')
-rw-r--r--web/templates/channel.html2
-rw-r--r--web/templates/head.html5
2 files changed, 6 insertions, 1 deletions
diff --git a/web/templates/channel.html b/web/templates/channel.html
index 373707499..94d79a022 100644
--- a/web/templates/channel.html
+++ b/web/templates/channel.html
@@ -6,7 +6,7 @@
<body>
<div id="channel_view" class='channel-view'></div>
<script>
- window.setup_channel_page({{ .Props }}, {{ .Team }}, {{ .Channel }}, {{ .Preferences }});
+ window.setup_channel_page({{ .Props }}, {{ .Team }}, {{ .Channel }});
$('body').tooltip( {selector: '[data-toggle=tooltip]'} );
var modals = $('.modal-body').not('.edit-modal-body');
if($(window).height() > 1200){
diff --git a/web/templates/head.html b/web/templates/head.html
index fc16eb2dc..14b447325 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -74,6 +74,11 @@
window.mm_user = {{ .User }};
window.mm_channel = {{ .Channel }};
window.mm_locale = {{ .Locale }};
+ window.mm_preferences = {{ .Preferences }};
+
+ $(function() {
+ PreferenceStore.setPreferences(window.mm_preferences);
+ });
if ({{.SessionTokenIndex}} >= 0) {
window.mm_session_token_index = {{.SessionTokenIndex}};