diff --git a/services/web/app/views/project/editor.jade b/services/web/app/views/project/editor.jade index f8c7311205..b46b491dd7 100644 --- a/services/web/app/views/project/editor.jade +++ b/services/web/app/views/project/editor.jade @@ -62,7 +62,7 @@ block content include ./editor/publish-template include ./editor/dropbox - .ui-layout-east + .ui-layout-east(ng-if="!anonymous") include ./editor/chat script(type="text/ng-template", id="genericMessageModalTemplate") @@ -86,6 +86,7 @@ block content window.userSettings = !{JSON.stringify(userSettings).replace(/\//g, '\\/')}; window.user = !{JSON.stringify(user).replace(/\//g, '\\/')}; window.csrfToken = "!{csrfToken}"; + window.anonymous = #{anonymous}; window.requirejs = { "paths" : { "mathjax": "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML", diff --git a/services/web/app/views/project/editor/header.jade b/services/web/app/views/project/editor/header.jade index 5a3bd93dd1..a119c561db 100644 --- a/services/web/app/views/project/editor/header.jade +++ b/services/web/app/views/project/editor/header.jade @@ -78,7 +78,8 @@ header.toolbar.toolbar-header(ng-cloak, ng-hide="state.loading") tooltip-placement="bottom", ng-class="{ active: ui.chatOpen }", ng-click="toggleChat()", - ng-controller="ChatButtonController" + ng-controller="ChatButtonController", + ng-show="!anonymous" ) i.fa.fa-fw.fa-comment( ng-class="{ 'bounce': unreadMessages > 0 }" diff --git a/services/web/public/coffee/ide.coffee b/services/web/public/coffee/ide.coffee index 15983a05dd..2ea76ea57d 100644 --- a/services/web/public/coffee/ide.coffee +++ b/services/web/public/coffee/ide.coffee @@ -53,6 +53,7 @@ define [ } $scope.user = window.user $scope.settings = window.userSettings + $scope.anonymous = window.anonymous $scope.chat = {} diff --git a/services/web/public/coffee/ide/directives/layout.coffee b/services/web/public/coffee/ide/directives/layout.coffee index f67f5a61f4..0c798dc912 100644 --- a/services/web/public/coffee/ide/directives/layout.coffee +++ b/services/web/public/coffee/ide/directives/layout.coffee @@ -80,7 +80,7 @@ define [ resetOpenStates = () -> state = element.layout().readState() - if attrs.openEast? + if attrs.openEast? and state.east? openEast = $parse(attrs.openEast) openEast.assign(scope, !state.east.initClosed)