diff --git a/public/app.js b/public/app.js index 82b75cc..0e5cc53 100644 --- a/public/app.js +++ b/public/app.js @@ -545,6 +545,10 @@ uiModules.get('app/logtrail').directive('clickOutside', function ($document) { e.target.id === 'host-picker-btn' || e.target.id === 'settings-btn') { scope.popup = angular.element('#' + e.target.id.replace('-btn','')).removeClass('ng-hide'); + var buttonCenter = e.target.getBoundingClientRect().x + (e.target.getBoundingClientRect().width/2); + var popupWidth = scope.popup.width(); + scope.popup.css("left",buttonCenter - (popupWidth/2)); + scope.popup.css("min-width",popupWidth); } } }); diff --git a/public/css/main.css b/public/css/main.css index 2ce3f0b..1e88640 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -40,6 +40,10 @@ html,body { margin-left: 1em; font-weight: bold; color: black; + max-width: 20em; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } .time-option-select-btn { @@ -128,14 +132,14 @@ html,body { } .host-picker { - position: absolute; + position: fixed; background: white; border: 4px solid rgb(128,128,128); - width: 16em; + max-width: 50em; + min-width: 15em; height: auto; border-radius: 6px; bottom: 5.5em; - left: 71em; padding: 0; } @@ -190,11 +194,12 @@ html,body { .host-picker-search { border: 2px solid #84BACC; background: white; + width: 90%; } .date-picker { - position: absolute; + position: fixed; background: white; border: 4px solid rgb(128,128,128); padding: 1em; @@ -202,7 +207,6 @@ html,body { height: 7em; border-radius: 6px; bottom: 5.5em; - left: 72em; } .date-picker:after, .date-picker:before { @@ -235,6 +239,7 @@ html,body { margin-left: .2em; font-weight: bold; color: black; + background-color: darkgray; } .flex-container-date-picker > .submit:enabled:hover { @@ -340,14 +345,13 @@ html,body { } .settings { - position: absolute; + position: fixed; background: white; border: 4px solid rgb(128,128,128); width: 20em; height: auto; border-radius: 6px; bottom: 5.5em; - left: 80em; padding: 0; color: black; padding: 1em; diff --git a/public/templates/index.html b/public/templates/index.html index 25c5904..e8250d1 100644 --- a/public/templates/index.html +++ b/public/templates/index.html @@ -23,12 +23,11 @@ placeholder='"access denied" 1.2.3.4 -sshd' title='Default search field : message'>
- - - + + +