From 9695264e5e8d13f86f7816b179874b323985df3b Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Wed, 22 Jun 2011 16:23:11 -0500 Subject: [PATCH 1/6] login page is now standalone, and error messages have been styled --- django-openstack/django_openstack/auth/views.py | 2 +- openstack-dashboard/media/dashboard/css/style.css | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/django-openstack/django_openstack/auth/views.py b/django-openstack/django_openstack/auth/views.py index cad64106b..72ba285fe 100644 --- a/django-openstack/django_openstack/auth/views.py +++ b/django-openstack/django_openstack/auth/views.py @@ -50,7 +50,7 @@ def login(request): if handled: return handled - return shortcuts.render_to_response('login_required.html', { + return shortcuts.render_to_response('splash.html', { 'form': form, }, context_instance=template.RequestContext(request)) diff --git a/openstack-dashboard/media/dashboard/css/style.css b/openstack-dashboard/media/dashboard/css/style.css index c25be10a4..968ff4370 100644 --- a/openstack-dashboard/media/dashboard/css/style.css +++ b/openstack-dashboard/media/dashboard/css/style.css @@ -1,3 +1,5 @@ +/* @override http://looce.com:8080/media/dashboard/css/style.css */ + @import url("reset.css"); @font-face { @@ -731,11 +733,17 @@ p#copy { float: left; } -.dash_block form .errorlist { +.dash_block form .errorlist, #standalone .errorlist { color: #ff5c5f; font-size: 11px; } +#standalone .errorlist li { + float: left; + width: 100%; + margin-top: -10px; +} + .dash_block label { clear: both; } From c7e286555e18805e5b25e8c0cd2b4ee24538369a Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Wed, 22 Jun 2011 17:09:21 -0500 Subject: [PATCH 2/6] made the status message box less wide --- django-openstack/django_openstack/auth/views.py | 1 + openstack-dashboard/media/dashboard/css/style.css | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/django-openstack/django_openstack/auth/views.py b/django-openstack/django_openstack/auth/views.py index 72ba285fe..7fd7a6bf8 100644 --- a/django-openstack/django_openstack/auth/views.py +++ b/django-openstack/django_openstack/auth/views.py @@ -40,6 +40,7 @@ class Login(forms.SelfHandlingForm): def login(request): + messages.error(request, "Your sesions has expired blah blah blah") if request.user and request.user.is_authenticated(): if request.user.is_admin(): return shortcuts.redirect('syspanel_overview') diff --git a/openstack-dashboard/media/dashboard/css/style.css b/openstack-dashboard/media/dashboard/css/style.css index 968ff4370..b1596de5f 100644 --- a/openstack-dashboard/media/dashboard/css/style.css +++ b/openstack-dashboard/media/dashboard/css/style.css @@ -218,6 +218,10 @@ border: 1px solid #cbe0e8; -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.2); } +#standlone .status_box { + width: 200px !important; +} + .clear { clear: both; } From 284adb405b4555eec2f367a44cae575de583e105 Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Wed, 22 Jun 2011 17:15:04 -0500 Subject: [PATCH 3/6] actually committing the right stylesheet this time --- .../media/dashboard/css/style.css | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/openstack-dashboard/media/dashboard/css/style.css b/openstack-dashboard/media/dashboard/css/style.css index b1596de5f..16aa1e5b0 100644 --- a/openstack-dashboard/media/dashboard/css/style.css +++ b/openstack-dashboard/media/dashboard/css/style.css @@ -218,10 +218,17 @@ border: 1px solid #cbe0e8; -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.2); } -#standlone .status_box { - width: 200px !important; +#standalone #login_wrapper .status_box { + width: 335px; + margin: 0; + margin-bottom: 25px; +} +#standalone #login_wrapper h2 { + min-width: 65px; +} +#standalone #login_wrapper p { + width: 183px; } - .clear { clear: both; } @@ -737,17 +744,11 @@ p#copy { float: left; } -.dash_block form .errorlist, #standalone .errorlist { +.dash_block form .errorlist { color: #ff5c5f; font-size: 11px; } -#standalone .errorlist li { - float: left; - width: 100%; - margin-top: -10px; -} - .dash_block label { clear: both; } From 1cd352a9b7be900da0b21df42402b7cc068e6047 Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Wed, 22 Jun 2011 17:16:18 -0500 Subject: [PATCH 4/6] removing error message --- django-openstack/django_openstack/auth/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/django-openstack/django_openstack/auth/views.py b/django-openstack/django_openstack/auth/views.py index 7fd7a6bf8..72ba285fe 100644 --- a/django-openstack/django_openstack/auth/views.py +++ b/django-openstack/django_openstack/auth/views.py @@ -40,7 +40,6 @@ class Login(forms.SelfHandlingForm): def login(request): - messages.error(request, "Your sesions has expired blah blah blah") if request.user and request.user.is_authenticated(): if request.user.is_admin(): return shortcuts.redirect('syspanel_overview') From 59ca8372f2f74aaed27691a3d049247f922f155f Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Wed, 22 Jun 2011 17:21:56 -0500 Subject: [PATCH 5/6] fixing and styling the create user form --- openstack-dashboard/dashboard/templates/_user_form.html | 2 +- openstack-dashboard/media/dashboard/css/style.css | 8 ++++---- openstack-dashboard/media/dashboard/js/form_examples.js | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/openstack-dashboard/dashboard/templates/_user_form.html b/openstack-dashboard/dashboard/templates/_user_form.html index b0534ccd8..68b1882c7 100644 --- a/openstack-dashboard/dashboard/templates/_user_form.html +++ b/openstack-dashboard/dashboard/templates/_user_form.html @@ -6,5 +6,5 @@ {{ field.errors }} {{ field }} {% endfor %} - + diff --git a/openstack-dashboard/media/dashboard/css/style.css b/openstack-dashboard/media/dashboard/css/style.css index 16aa1e5b0..deb944ce6 100644 --- a/openstack-dashboard/media/dashboard/css/style.css +++ b/openstack-dashboard/media/dashboard/css/style.css @@ -383,7 +383,7 @@ input[readonly="readonly"] { padding-right: 21px; } -.search input[type="text"], .dash_block form input[type="text"], .dash_block form textarea{ +.search input[type="text"], .dash_block form input[type="text"], .dash_block form input[type="password"], .dash_block form textarea{ margin-left: -1px; border: 1px solid #ccc; height: 31px; @@ -398,7 +398,7 @@ input[readonly="readonly"] { margin-bottom: 15px; } -.search input[type="text"]:focus, .modal_window input:focus, .modal_window textarea:focus, .dash_block form input[type="text"]:focus { +.search input[type="text"]:focus, .modal_window input:focus, .modal_window textarea:focus, .dash_block form input[type="text"]:focus, .dash_block form input[type="password"]:focus { outline: none; box-shadow:0 0 3px #41bad4; -moz-box-shadow:0 0 3px #41bad4; @@ -1042,8 +1042,8 @@ ol li.first a { margin-bottom: 5px; } -.dash_block form input[type="text"] { - width: 284px; +.dash_block form input[type="text"],.dash_block form input[type="password"] { + width: 309px; } .modal_window .continue_link, .dash_block form input[type="submit"], .dash_block a.more { diff --git a/openstack-dashboard/media/dashboard/js/form_examples.js b/openstack-dashboard/media/dashboard/js/form_examples.js index 8b1e5866c..59de48a02 100644 --- a/openstack-dashboard/media/dashboard/js/form_examples.js +++ b/openstack-dashboard/media/dashboard/js/form_examples.js @@ -25,6 +25,11 @@ $(function(){ $("#tenant_form input#id__id").example("YetAnotherTenant"); $("#tenant_form textarea#id_description").example("One or two sentence description."); +// update/create tenant + $("#user_form input#id_id").example("username"); + $("#user_form input#id_email").example("email@example.com"); + $("#user_form input#id_password").example("password"); + // table search box $("input#table_search").example("Search...") }) \ No newline at end of file From 5ca0e8eb4630f888b308c5efb38995c417bb2b28 Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Wed, 22 Jun 2011 17:25:08 -0500 Subject: [PATCH 6/6] made success message after deleting a user an info message --- django-openstack/django_openstack/syspanel/views/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-openstack/django_openstack/syspanel/views/users.py b/django-openstack/django_openstack/syspanel/views/users.py index 31b3595ea..0ae1380d8 100644 --- a/django-openstack/django_openstack/syspanel/views/users.py +++ b/django-openstack/django_openstack/syspanel/views/users.py @@ -39,7 +39,7 @@ class UserDeleteForm(forms.SelfHandlingForm): def handle(self, request, data): user_id = data['user'] api.user_delete(request, user_id) - messages.success(request, + messages.info(request, '%s was successfully deleted.' % user_id) return redirect(request.build_absolute_uri())