From 5b2751c57fc319a36b1ea7d250ea66af0bb252bd Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Fri, 8 Nov 2013 22:07:51 +0000 Subject: [PATCH] Fixed parent container of activity stream setting the min-height value. This keeps the activity stream from overlapping the footer. Fixed groups page edit to not clear/empty the credential_name field. --- awx/ui/static/js/helpers/Groups.js | 6 ++---- awx/ui/static/js/helpers/Lookup.js | 2 ++ awx/ui/static/js/widgets/Stream.js | 12 +++++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index a5dfcd0d70..daf62ae6cf 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -674,10 +674,10 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' .factory('GroupsEdit', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GroupForm', 'GenerateForm', 'Prompt', 'ProcessErrors', 'GetBasePath', 'SetNodeName', 'ParseTypeChange', 'GetSourceTypeOptions', 'InventoryUpdate', - 'GetUpdateIntervalOptions', 'ClickNode', 'LookUpInit', 'CredentialList', + 'GetUpdateIntervalOptions', 'ClickNode', 'LookUpInit', 'CredentialList', 'Empty', function($rootScope, $location, $log, $routeParams, Rest, Alert, GroupForm, GenerateForm, Prompt, ProcessErrors, GetBasePath, SetNodeName, ParseTypeChange, GetSourceTypeOptions, InventoryUpdate, GetUpdateIntervalOptions, ClickNode, - LookUpInit, CredentialList) { + LookUpInit, CredentialList, Empty) { return function(params) { var group_id = params.group_id; @@ -996,8 +996,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' // reset fields scope.source_path = ''; scope[form.name + '_form']['source_path'].$setValidity('required',true); - scope['credential'] = ''; - scope['credential_name'] = ''; } LookUpInit({ url: GetBasePath('credentials') + diff --git a/awx/ui/static/js/helpers/Lookup.js b/awx/ui/static/js/helpers/Lookup.js index be6cb6eff1..d32c2f88cf 100644 --- a/awx/ui/static/js/helpers/Lookup.js +++ b/awx/ui/static/js/helpers/Lookup.js @@ -126,6 +126,8 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P if (listScope[list.name][i][form.fields[field].sourceField] == scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField]) { scope[field] = listScope[list.name][i].id; + //scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] = + // listScope[list.name][i][form.fields[field].sourceField]; break; } } diff --git a/awx/ui/static/js/widgets/Stream.js b/awx/ui/static/js/widgets/Stream.js index 3210f6a3ca..ee90e98645 100644 --- a/awx/ui/static/js/widgets/Stream.js +++ b/awx/ui/static/js/widgets/Stream.js @@ -13,16 +13,25 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti .factory('ShowStream', [ function() { return function() { // Slide in the Stream widget + + // Make some style/position adjustments adjustments var stream = $('#stream-container'); stream.css({ position: 'absolute', - left: 0, top: 0, + left: 0, width: '100%', 'min-height': '100%', 'background-color': '#FFF' }); + + // Try not to overlap footer. Because stream is positioned absolute, the parent + // doesn't resize correctly when stream is loaded. + $('#tab-content-container').css({ 'min-height': stream.height() }); + + // Slide in stream stream.show('slide', {'direction': 'left'}, {'duration': 500, 'queue': false }); + } }]) @@ -40,6 +49,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti stream.detach(); stream.empty(); stream.unbind(); + $('#tab-content-container').css({ 'min-height': 0 }); //let the parent height go back to normal }, 500); } }])