From 994c87eb0c62e940aa9a50ef4f36a34377ae66aa Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Wed, 25 Jun 2014 12:39:38 -0400 Subject: [PATCH] 2.0 style changes Fixed collapsed menu on small viewports. On a small viewport the web socket beacon now displays to the left of the menu button. On large screens it appears as part of the menu. --- awx/ui/static/js/app.js | 6 +++++- awx/ui/static/less/main-layout.less | 28 ++++++++++++++++++++-------- awx/ui/templates/ui/index.html | 7 ++++--- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index da01f3308e..4d04709825 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -530,7 +530,11 @@ angular.module('Tower', [ html = ""; - e = angular.element(document.getElementById('socket-beacon')); + e = angular.element(document.getElementById('socket-beacon-div')); + e.empty().append(html); + $compile(e)($rootScope); + + e = angular.element(document.getElementById('socket-beacon-li')); e.empty().append(html); $compile(e)($rootScope); diff --git a/awx/ui/static/less/main-layout.less b/awx/ui/static/less/main-layout.less index 912d3abaf3..ce2297e3c6 100644 --- a/awx/ui/static/less/main-layout.less +++ b/awx/ui/static/less/main-layout.less @@ -46,12 +46,24 @@ body { margin-bottom: 20px; } -/* -@media (min-width: 1200px) { - #main-menu-container { - #account-menu { - margin-right: 60px; - float: right; - } +#socket-beacon-div { + display: none; +} + +#socket-beacon-li { + display: block; +} + +@media (max-width: 1075px) { + #socket-beacon-div { + display: block; + position: fixed; + right: 30px; + top: 5px; + margin-right: 50px; + margin-top: 15px; } -}*/ \ No newline at end of file + #socket-beacon-li { + display: none; + } +} diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index 3ea96a466e..4501a27af8 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -173,7 +173,8 @@