From 1bc3657fe7cce16e00f7529ba756dceef25b6576 Mon Sep 17 00:00:00 2001 From: Leigh Johnson Date: Mon, 7 Mar 2016 10:46:11 -0500 Subject: [PATCH] fixes demo feedback bugs in #1112 --- awx/ui/client/legacy-styles/ansible-ui.less | 3 +- awx/ui/client/src/about/about.controller.js | 34 +++++++++---------- awx/ui/client/src/about/about.partial.html | 2 +- awx/ui/client/src/app.js | 2 +- awx/ui/client/src/footer/footer.block.less | 3 +- awx/ui/client/src/license/license.block.less | 13 +++++++ .../client/src/license/license.controller.js | 24 ++++++++++--- .../client/src/license/license.partial.html | 22 ++++++------ .../client/src/shared/bootstrap-settings.less | 22 ++++++++++++ .../src/shared/layouts/one-plus-two.less | 1 + awx/ui/templates/ui/index.html | 2 -- 11 files changed, 89 insertions(+), 39 deletions(-) create mode 100644 awx/ui/client/src/shared/bootstrap-settings.less diff --git a/awx/ui/client/legacy-styles/ansible-ui.less b/awx/ui/client/legacy-styles/ansible-ui.less index 4adaeb09eb..717ab7bd30 100644 --- a/awx/ui/client/legacy-styles/ansible-ui.less +++ b/awx/ui/client/legacy-styles/ansible-ui.less @@ -44,7 +44,8 @@ @import "text-label.less"; @import "./bootstrap-datepicker.less"; @import "awx/ui/client/src/shared/branding/colors.default.less"; - +// Bootstrap default overrides +@import "awx/ui/client/src/shared/bootstrap-settings.less"; /* Bootstrap fix that's causing a right margin to appear whenver a modal is opened */ body.modal-open { diff --git a/awx/ui/client/src/about/about.controller.js b/awx/ui/client/src/about/about.controller.js index c35388e8ae..07bad2dfd6 100644 --- a/awx/ui/client/src/about/about.controller.js +++ b/awx/ui/client/src/about/about.controller.js @@ -1,20 +1,20 @@ export default ['$scope', '$state', 'CheckLicense', function($scope, $state, CheckLicense){ var processVersion = function(version){ - // prettify version & calculate padding - // e,g 3.0.0-0.git201602191743/ -> 3.0.0 - var split = version.split('-')[0] - var spaces = Math.floor((16-split.length)/2), - paddedStr = ""; - for(var i=0; i<=spaces; i++){ - paddedStr = paddedStr +" "; - } - paddedStr = paddedStr + split; - for(var j = paddedStr.length; j<16; j++){ - paddedStr = paddedStr + " "; - } - return paddedStr - } + // prettify version & calculate padding + // e,g 3.0.0-0.git201602191743/ -> 3.0.0 + var split = version.split('-')[0] + var spaces = Math.floor((16-split.length)/2), + paddedStr = ""; + for(var i=0; i<=spaces; i++){ + paddedStr = paddedStr +" "; + } + paddedStr = paddedStr + split; + for(var j = paddedStr.length; j<16; j++){ + paddedStr = paddedStr + " "; + } + return paddedStr + }; var init = function(){ CheckLicense.get() .then(function(res){ @@ -23,9 +23,9 @@ export default $('#about-modal').modal('show'); }); }; - var back = function(){ - $state.go('setup'); - } + $('#about-modal').on('hidden.bs.modal', function () { + $state.go('setup'); + }); init(); } ]; \ No newline at end of file diff --git a/awx/ui/client/src/about/about.partial.html b/awx/ui/client/src/about/about.partial.html index afc66724f4..44d4914402 100644 --- a/awx/ui/client/src/about/about.partial.html +++ b/awx/ui/client/src/about/about.partial.html @@ -3,7 +3,7 @@
Version
- {{license.version}} + {{license.version || "No result found"}}
License Type
- {{license.license_info.license_type}} + {{license.license_info.license_type || "No result found"}}
Subscription
- {{license.license_info.subscription_name}} + {{license.license_info.subscription_name || "No result found"}}
License Key
- {{license.license_info.license_key}} + {{license.license_info.license_key || "No result found"}}
@@ -43,25 +43,25 @@
Time Remaining
- {{time.remaining}} Day + {{time.remaining}} Days
Hosts Available
- {{license.license_info.available_instances}} + {{license.license_info.available_instances || "No result found"}}
Hosts Used
- {{license.license_info.current_instances}} + {{license.license_info.current_instances || "No result found"}}
Hosts Remaining
- {{license.license_info.free_instances}} + {{license.license_info.free_instances || "No result found"}}
@@ -76,7 +76,7 @@
Browse... - +
End User License Agreement
@@ -88,7 +88,7 @@
I agree to the End User License Agreement
- Save successful! + Save successful!
diff --git a/awx/ui/client/src/shared/bootstrap-settings.less b/awx/ui/client/src/shared/bootstrap-settings.less new file mode 100644 index 0000000000..c0c300c74a --- /dev/null +++ b/awx/ui/client/src/shared/bootstrap-settings.less @@ -0,0 +1,22 @@ +@import "awx/ui/client/src/shared/branding/colors.default.less"; +.btn-success{ + background: @default-succ; + border-color: transparent; + :hover{ + background: @default-succ-hov; + } + :disabled{ + background: @default-succ-disabled; + } +} +.btn-default{ + background: @btn-bg; + border-color: @btn-bord; + color: @btn-txt; + :hover{ + background: @btn-bg-hov; + } + :focus{ + background: @btn-bg-sel; + } +} \ No newline at end of file diff --git a/awx/ui/client/src/shared/layouts/one-plus-two.less b/awx/ui/client/src/shared/layouts/one-plus-two.less index fe43e40b65..e1e1653e8b 100644 --- a/awx/ui/client/src/shared/layouts/one-plus-two.less +++ b/awx/ui/client/src/shared/layouts/one-plus-two.less @@ -74,6 +74,7 @@ .OnePlusTwo-left--detailsContent { display: inline-block; max-width: 220px; + width: 220px; word-wrap: break-word; } diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index 79111c287d..6b5466b98d 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -154,8 +154,6 @@ - -