From 03ede4ce5e85f3729b5764c217d32e6564614583 Mon Sep 17 00:00:00 2001 From: Diana Whitten Date: Thu, 14 Apr 2016 15:30:28 -0700 Subject: [PATCH] Modals should inherit from the theme * Fullscreen Modals have been removed These weren't working properly anyways, and the styling is very unpleasant: https://i.imgur.com/QfvGli7.png * Added two more modal sizes: xs and xl, and added all modals sizes to the theme preview page. Also updated the theme preview page to use fa-close instead of 'x'. * Cleaned up Spinner css to use modal sizes properly. Themability of spinner to come later. * Confirmation Modal JavaScript was cleaned up, and contents turned into an easier to digest client side template. Themability of client side templates show cased in 'material' design. * 'material' confirmation dialog was altered to show how themes can make use of overriding client-side templates. * Moved the Bootstrap helper variables into its own file. * Added helper variables for various modal calculations. Change-Id: I599ad2ffcf3034a24a19bc87e6ebed3eab079f45 --- .../framework/widgets/wizard/wizard.html | 18 +-- horizon/static/horizon/js/horizon.tables.js | 78 +++++---- .../static/horizon/js/horizon.templates.js | 9 +- .../horizon/client_side/_confirm.html | 12 ++ .../horizon/client_side/_loading.html | 4 +- .../templates/horizon/client_side/_modal.html | 2 +- .../horizon/client_side/templates.html | 3 +- horizon/test/tests/workflows.py | 18 --- horizon/workflows/base.py | 8 - horizon/workflows/views.py | 2 - .../theme-preview/theme-preview.html | 149 +++++++++++++++--- .../theme-preview/theme-preview.scss | 4 - .../dashboard/scss/_bootstrap_helpers.scss | 32 ++++ .../static/dashboard/scss/_variables.scss | 10 +- .../dashboard/scss/components/_dropdowns.scss | 2 +- .../dashboard/scss/components/_loader.scss | 13 ++ .../dashboard/scss/components/_modals.scss | 70 +++----- .../static/dashboard/scss/horizon.scss | 1 + .../components/_context_selection.scss | 2 +- .../horizon/components/_help_panel.scss | 21 --- .../horizon/client_side/_confirm.html | 22 +++ .../theme-modal-sizes-924e5835efe9bb79.yaml | 13 ++ 22 files changed, 316 insertions(+), 177 deletions(-) create mode 100644 horizon/templates/horizon/client_side/_confirm.html create mode 100644 openstack_dashboard/static/dashboard/scss/_bootstrap_helpers.scss create mode 100644 openstack_dashboard/static/dashboard/scss/components/_loader.scss create mode 100644 openstack_dashboard/themes/material/templates/horizon/client_side/_confirm.html create mode 100644 releasenotes/notes/theme-modal-sizes-924e5835efe9bb79.yaml diff --git a/horizon/static/framework/widgets/wizard/wizard.html b/horizon/static/framework/widgets/wizard/wizard.html index d084d7bb4d..b24f38bfd0 100644 --- a/horizon/static/framework/widgets/wizard/wizard.html +++ b/horizon/static/framework/widgets/wizard/wizard.html @@ -8,7 +8,7 @@