first pass at hijaxifying signin link

pull/1/head
Andromeda Yelton 2012-11-07 14:58:40 -05:00
parent e401ad7b99
commit d9905df303
7 changed files with 137 additions and 91 deletions

View File

@ -120,7 +120,7 @@
{% else %}
<div class="js-topmenu">
<ul class="menu">
<li><a href="{% url auth_login %}?next={% firstof request.path '/' %}"><span>Sign In</span></a></li>
<li><a href="{% url auth_login %}?next={% firstof request.path '/' %}" class="hijax"><span>Sign In</span></a></li>
{% if not suppress_search_box %}
{% comment %}
don't display this on landing page where it's superseded by big signup box in splash area

View File

@ -1,7 +1,7 @@
{% extends "registration/registration_base.html" %}
{% block title %}login{% endblock %}
{% block doccontent %}
<div id="lightbox_content">
{% if form.errors %}
<p class="errorlist">Your username and password didn't match. Please try again.</p>
Make sure the username box has your <b>username, not your email</b> -- some browsers automatically fill in your email. We're working on fixing this bug.
@ -25,4 +25,5 @@ Make sure the username box has your <b>username, not your email</b> -- some brow
You are already logged in as <a href="{% url supporter supporter_username=user.username %}">{{ user.username }}</a>.
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -1,5 +1,5 @@
<!-- login_form.html -->
<form method="post" action="{% url django.contrib.auth.views.login %}">{% csrf_token %}
<form method="post" action="{% url django.contrib.auth.views.login %}" class="login">{% csrf_token %}
{{ form.username.label_tag }}
{{ form.username }}
{{ form.password.label_tag }}

View File

@ -115,59 +115,6 @@
padding: 10px;
width: 50%;
}
#login form label {
display: block;
}
#login form input {
width: 90%;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
border: 1px solid #d6dde0;
height: 18px;
line-height: 18px;
margin-bottom: 16px;
}
#login form input[type=submit] {
text-decoration: capitalize;
width: auto;
height: 36px;
line-height: 36px;
background: #8dc63f;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
color: white;
cursor: pointer;
font-size: 13px;
font-weight: bold;
padding: 0 15px;
border: none;
margin: 5px 0;
}
#login form input:focus {
border: solid 1px #8dc63f;
}
#login form span.helptext {
display: block;
margin-top: -11px;
font-style: italic;
font-size: 13px;
}
#login .google_signup {
padding: 14px 0;
}
#login .google_signup div {
height: 24px;
line-height: 24px;
float: left;
padding-left: 5px;
}
#login .google_signup img {
float: left;
height: 24px;
width: 24px;
}
.actionbutton {
width: auto;
height: 36px;

View File

@ -774,6 +774,104 @@ ul.menu {
color: white;
position: absolute;
}
form.login label {
display: block;
}
form.login input {
width: 90%;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
border: 1px solid #d6dde0;
height: 18px;
line-height: 18px;
height: 18px;
line-height: 18px;
margin-bottom: 16px;
}
form.login input[type=submit] {
text-decoration: capitalize;
width: auto;
height: 36px;
line-height: 36px;
height: 36px;
line-height: 36px;
background: #8dc63f;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
color: white;
cursor: pointer;
font-size: 13px;
font-weight: bold;
padding: 0 15px;
border: none;
margin: 5px 0;
width: auto;
height: 36px;
line-height: 36px;
height: 36px;
line-height: 36px;
background: #8dc63f;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
color: white;
cursor: pointer;
font-size: 13px;
font-weight: bold;
padding: 0 15px;
border: none;
margin: 5px 0;
}
form.login input:focus {
border: solid 1px #8dc63f;
}
form.login span.helptext {
display: block;
margin-top: -11px;
font-style: italic;
font-size: 13px;
}
.google_signup {
padding: 14px 0;
padding: 14px 0;
}
.google_signup div {
height: 24px;
line-height: 24px;
height: 24px;
line-height: 24px;
float: left;
padding-left: 5px;
}
.google_signup img {
float: left;
height: 24px;
width: 24px;
}
.google_signup div {
height: 24px;
line-height: 24px;
height: 24px;
line-height: 24px;
float: left;
padding-left: 5px;
}
.google_signup img {
float: left;
height: 24px;
width: 24px;
}
.js-search {
float: left;
padding-top: 25px;

View File

@ -25,41 +25,7 @@
margin: 10px auto;
float: left;
padding: 10px;
width: 50%;
form {
label {
display: block;
}
input {
width: 90%;
.one-border-radius(5px);
border: 1px solid @blue-grey;
.height(18px);
margin-bottom: 16px;
&[type=submit] {
text-decoration: capitalize;
.actionbuttons;
}
&:focus {
border: solid 1px @call-to-action;
}
}
span.helptext {
display: block;
margin-top: -11px;
font-style: italic;
font-size: @font-size-default;
}
}
.google_signup {
.google_signup_div;
}
width: 50%;
}
.actionbutton {

View File

@ -408,6 +408,40 @@ ul.menu{
position: absolute;
}
form.login {
label {
display: block;
}
input {
width: 90%;
.one-border-radius(5px);
border: 1px solid @blue-grey;
.height(18px);
margin-bottom: 16px;
&[type=submit] {
text-decoration: capitalize;
.actionbuttons;
}
&:focus {
border: solid 1px @call-to-action;
}
}
span.helptext {
display: block;
margin-top: -11px;
font-style: italic;
font-size: @font-size-default;
}
}
.google_signup {
.google_signup_div;
}
.js-search {
float:left;
padding-top:25px;