Commit Graph

13 Commits

Author SHA1 Message Date
Diana Whitten 4b5886d276 Branding: Nav icon spacing should use css
The padding around the Top Nav Bar's Dropdown Icons have been done
with actual text spaces, instead of relying on padding that is set
via css. This makes it very difficult to customize the padding
around these elements at a global level.

Some contextual classes have been added for ease of branding-level
customization.

Change-Id: I6768135351637db8a950a4b44366880817ce2df3
Closes-bug: #1537608
2016-02-07 16:50:36 +00:00
Timur Sufiev dab7e45c74 Fix for the broken header's dropdowns for both v0.11.2 and v0.13
The dropdownToggle directive from angular-ui/bootstrap v0.11.2
conflicts with the native Bootstrap data-toggle="dropdown" attribute
(see https:github.com/angular-ui/bootstrap/issues/2156). This is fixed
in 0.13, but before that it'd be valuable to ensure that the same html
markup works the same way with both versions of angular-ui/bootstrap
(0.11.2 and 0.13). The decorator code could be safely deleted once
Horizon migrates to angular-ui/bootstrap v0.13.

Also fix dropdowns in material theme templates.

Closes-Bug: #1466146
Change-Id: I8f01c1ce7b0a5dc29bf9d8aba23c9ea7e6e1ec35
2015-11-26 18:00:26 +03:00
Diana Whitten 20ff47185f Horizon Login now inherits from Bootstrap Theme
The Horizon login page was not properly inheriting its styles from
its theme.  The implementation was making use of the _modal_form.html
template just to inherit a form, but there was no way to remove
the modal classes with that implementation.

The login page now uses a standard Bootstrap 'panel'.  This will
inherit the look and feel of any theme more naturally when its not
inside of a modal, as not all themes use box-shadow outside of a
modal; some chose to be very flat on purpose, and the built in
panels take advantage of this.

When used within the Region selector, it does need to exist within
a modal, so some simple logic was added for the classes necessary.

The panel is a little bit wider than it was before, but it is now
a standard Bootstrap column size, so its responsive down to a very
small screen size.

The modal is a little bit wider than it was before as well, as it is
is now the standard medium modal size for Bootstrap.

Improvements:
 * Logo is now an <img> tag, which means it can automagically resize
   to fit in the available space
 * Unneccesary styles removed
 * _splash.scss was only being used in _login.html, which was
   confusing, so _splash.scss is renamed to _login.scss, and is now a
   class based style, so it can live in /components
 * Its now Theme ready and responsive
 * Region Selector Login now has a proper modal backdrop
 * has-error help-text should not be alert alert-danger

Partially-Implements: blueprint horizon-theme-css-reorg
Partially-Implements: blueprint bootstrap-html-standards
Change-Id: Ie968414ab8ef2154623edfc21ce5623e8c4057c6
2015-11-16 15:41:25 -07:00
Rob Cresswell f2b2289b4a Drop Django 1.7 support
Django 1.7 support ends in December 2015
(https://www.djangoproject.com/download/#supported-versions), so it
will not be supported by Mitaka release.

This patch removes many of the deprecation warnings:-

`RedirectView.permanent` change:
https://docs.djangoproject.com/en/1.8/ref/class-based-views/base/

`url` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.5 notes for the url and ssi template tag change

`django.forms.utils` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.9 notes

`firstof` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.8 notes for cycle and firstof template tags

Change-Id: If546c087e73d189daa92e5bd63f0533fcf19089f
Partially-Implements: blueprint drop-dj17
2015-11-16 11:55:38 +00:00
Diana Whitten 94464af154 Dropdowns should have a consistent design
While working on making various dropdowns in Horizon Bootstrap
compliant, it was noticed that there are two distinct types of
dropdowns currently being used in Horizon.  This creates some style
inconsitencies.  This consolidates the styles so that it will be
easier to make the component theme-ready.

Partially-Implements: blueprint horizon-theme-css-reorg

Change-Id: Ib2be3fef3af01fcf85163f24cabb835e23ca2aff
2015-11-05 21:40:12 -07:00
Diana Whitten 4fc8fb101a AVAILABLE_REGIONS picker should be responsive
The region selector located on the right side of the topbar should
be responsive, and should be collected into the responsive menu.

Also, it should be an anchor rather than a button, so that it shares
all the same stylings :)

Change-Id: Id663dded6f4420575d38449751548cd03b3911a6
Closes-bug: #1485925
2015-08-18 16:15:44 -07:00
Diana Whitten 9ae749512d Icon font carets should be used over caret class
Icon font carets should be used over the caret class because they
offer more flexibility while themeing. An Icon Font will grow with
the font size dynamically, whereas the caret class is hardcoded to
a specific set of sizes. Also, the fa-caret-down has the same feel
of the other icons --> showing a slight border radius.

Change-Id: I01c01df96d9d3d1bf07b009f94776d53389e0c32
Partially-Implements: blueprint horizon-theme-icons
2015-06-25 11:14:27 -07:00
Jiri Tomasek fca44e6642 Restyled topbar to resemble UX guidelines
Also moved topbar styling into separate component
Adjusted context selection to match other dropdowns, merged it with topbar styles file

Partially-Implements: blueprint css-breakdown
Partially-Implements: blueprint navigation-styling
Change-Id: If30b85f5415a3e8d0416fdafeb233b722feb014f
2014-10-16 09:38:55 +02:00
Lin Hua Cheng 5d32caf3af Update Horizon for Django 1.5 compatibility
Changes made:
- Changed template url tags: {% url myview %} to {% url myview %}
- Import json instead of django.utils.simplejson
- Import django.utils.encoding.force_unicode instead of
  django.utils.translation.force_unicode
- Fixed error in tables/base.py for CheckboxInput, pass a callable
  check_test. Django 1.5 does not silently fail on this now.
- Set SECRET_KEY in test/settingspy, Django 1.5 refuse to start if it
  is not set.
- Added notes about ALLOWED_HOSTS when running Horizon in Production

Fixes bug 1147329

Change-Id: I6ac1e81498f41141dea99760922991feb310a326
2013-04-30 20:54:39 -07:00
Lin Hua Cheng 85157a7cb5 Escape the region name before passing as value in URL.
Fixes bug 1133048.

Change-Id: I03f7eb0df9f5ae46b6b41da76e0486663403e357
2013-02-26 10:36:57 -08:00
Gabriel Hurley c339189b44 Auth refactor.
Switch to using the self-contained django_openstack_auth
package which is a proper django.contrib.auth pluggable
backend.

Notable functional improvements include:

  * Better overall security via use of standard Django
    auth code (well-vetted by security experts).
  * Token expiration checking.
  * User "enabled" attribute checking.
  * Support for full range of Django auth attributes
    such as is_anonymous, is_active, is_superuser, etc.
  * Improved hooks for RBAC/permission-based acess control.

Regarding the RBAC/permission-based access control, this
patch moves all "role" and "service"-oriented checks to
permission checks. This will make transitioning to
policy-driven checking much easier once that fully lands
in OpenStack.

Implements blueprint move-keystone-support-to-django-auth-backend

Change-Id: I4f3112af797aff8c4c5e9930c6ca33a70e45589d
2012-07-09 16:57:52 -07:00
John Postlethwait 9cb0c10025 Removing the current project from the drop-down.
Removing the current region as well. Also renaming
the label to be "Current" Project, and updating
the translation files.

Change-Id: I60e37ff9490b9709fb4bf9b2fd936b39092e215d
2012-05-24 17:09:34 -07:00
Gabriel Hurley 052aa55d34 Unifies the project packaging into one set of modules.
There are no longer two separate projects living inside the horizon
repository. There is a single project now with a single setup.py,
single README, etc.

The openstack-dashboard/dashboard django project is now named
"openstack_dashboard" and lives as an example project in the
topmost horizon directory.

The "horizon/horizon" directory has been bumped up a level and now
is directly on the path when the root horizon directory is on
your python path.

Javascript media which the horizon module directly relies upon
now ships in the horizon/static dir rather than
openstack-dashboard/dashboard/static.

All the corresponding setup, installation, build, and env scripts
have been updated accordingly.

Implements blueprint unified-packaging.

Change-Id: Ieed8e3c777432cd046c3e0298869a9428756ab62
2012-02-29 00:20:13 -08:00