From 1af2a966c5f70e02f01fd2d47c93a7382522fb4a Mon Sep 17 00:00:00 2001 From: Diana Whitten Date: Wed, 13 Jul 2016 16:27:43 -0700 Subject: [PATCH] Material: Progress Bars should allow text Material progress bars are so thin, that when you add text to them, its unplesant. We need to support a progress bar type containing text that is bigger by default. Used this opportunity to align other progress bar experiences, and in addition, generalize the text progress bar and progress loader bar for general use everywhere. Change-Id: I3d51c6a4582e3dc043f30632b6635a9ff17f5fbf Closes-bug: #1602880 --- horizon/static/horizon/js/horizon.tables.js | 5 +-- .../theme-preview/theme-preview.html | 25 +++++++++++ .../containers/_container_loader.html | 4 +- .../project/containers/containers.html | 4 +- .../scss/components/_pending_bar.scss | 18 -------- .../scss/components/_progress_bars.scss | 41 +++++++++++++++++++ .../dashboard/scss/components/_tables.scss | 6 --- .../static/dashboard/scss/horizon.scss | 2 +- .../default/horizon/components/_tables.scss | 5 --- .../material/static/horizon/_styles.scss | 1 + .../horizon/components/_progress_bars.scss | 3 ++ 11 files changed, 77 insertions(+), 37 deletions(-) delete mode 100644 openstack_dashboard/static/dashboard/scss/components/_pending_bar.scss create mode 100644 openstack_dashboard/static/dashboard/scss/components/_progress_bars.scss create mode 100644 openstack_dashboard/themes/material/static/horizon/components/_progress_bars.scss diff --git a/horizon/static/horizon/js/horizon.tables.js b/horizon/static/horizon/js/horizon.tables.js index fbf557d263..6005c7cb72 100644 --- a/horizon/static/horizon/js/horizon.tables.js +++ b/horizon/static/horizon/js/horizon.tables.js @@ -65,7 +65,7 @@ horizon.datatables = { if ($new_row.hasClass('status_unknown')) { var $container = $(document.createElement('div')) - .addClass('horizon-pending-bar'); + .addClass('progress-text horizon-loading-bar'); var $progress = $(document.createElement('div')) .addClass('progress progress-striped active') @@ -73,14 +73,13 @@ horizon.datatables = { $(document.createElement('div')) .addClass('progress-bar') - .css("width", "100%") .appendTo($progress); // if action/confirm is required, show progress-bar with "?" // icon to indicate user action is required if ($new_row.find('.btn-action-required').length > 0) { $(document.createElement('span')) - .addClass('fa fa-question-circle horizon-pending-bar-icon') + .addClass('fa fa-question-circle progress-bar-text') .appendTo($container); } $new_row.find("td.status_unknown:last").prepend($container); diff --git a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html index 3d2b2810ad..482860ce9e 100644 --- a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html +++ b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html @@ -1165,6 +1165,31 @@
+ +

Text

+
+
+
+
+
+ 10% +
+
+
+
+
+ 75% +
+
+ +

Loading

+
+
+
+
+
+
+
diff --git a/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html b/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html index 1f42aaf4ca..2d0d12b683 100644 --- a/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html +++ b/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html @@ -1,5 +1,5 @@ -
+
-
+
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.html b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.html index e406f6998a..52c6231fb9 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.html +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.html @@ -30,9 +30,9 @@
-
+
-
+