Merge branch 'master' into payment
commit
6d48f9c3f7
|
@ -132,20 +132,27 @@ var $j = jQuery.noConflict();
|
||||||
<div class="jsmodule">
|
<div class="jsmodule">
|
||||||
<h3 class="module-title">Start Ungluing Now!</h3>
|
<h3 class="module-title">Start Ungluing Now!</h3>
|
||||||
<div class="jsmod-content">
|
<div class="jsmod-content">
|
||||||
|
<form action='/accounts/register/' method='post'>{% csrf_token %}
|
||||||
<div class="user-name">
|
<div class="user-name">
|
||||||
<label>Username</label>
|
<label>Username</label>
|
||||||
<input type="text" size="25" value="" name="username" />
|
<input id="id_username" type="text" class="required" name="username" maxlength="30" size="25" />
|
||||||
</div>
|
|
||||||
<div class="password">
|
|
||||||
<label>Password</label>
|
|
||||||
<input type="text" size="25" value="" name="password" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="email">
|
<div class="email">
|
||||||
<label>Email</label>
|
<label>Email</label>
|
||||||
<input type="text" size="25" value="" name="email" />
|
<input id="id_email" type="text" class="required" name="email" maxlength="75" size="25" />
|
||||||
|
</div>
|
||||||
|
<div class="password">
|
||||||
|
<label>Password</label>
|
||||||
|
<input id="id_password1" type="password" class="required" name="password1" size="25" />
|
||||||
|
</div>
|
||||||
|
<div class="password">
|
||||||
|
<label>Password (again):</label>
|
||||||
|
<input id="id_password2" type="password" class="required" name="password2" size="25" />
|
||||||
</div>
|
</div>
|
||||||
<div class="button">
|
<div class="button">
|
||||||
<input type="button" value="Submit" />
|
<input type="submit" value="sign up" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<p><a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}"><img src="{{ STATIC_URL }}/images/auth/google_64.png">Sign In With Google</a></p>
|
<p><a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}"><img src="{{ STATIC_URL }}/images/auth/google_64.png">Sign In With Google</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}
|
{% block title %}— {{ work.title }}{% endblock %}
|
||||||
{{ work.title }}
|
|
||||||
{% endblock %}
|
|
||||||
{% block extra_head %}
|
|
||||||
<link type="text/css" rel="stylesheet" href="/static/css/campaign.css" />
|
|
||||||
|
|
||||||
|
{% block extra_css %}
|
||||||
|
<link type="text/css" rel="stylesheet" href="/static/css/campaign.css" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block base_js %}
|
||||||
<script type="text/javascript" src="/static/js/jquery-1.6.3.min.js"></script>
|
<script type="text/javascript" src="/static/js/jquery-1.6.3.min.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/jquery-ui-1.8.16.custom.min.js"></script>
|
<script type="text/javascript" src="/static/js/jquery-ui-1.8.16.custom.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/static/js/wishlist.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/tabs4.js"></script>
|
<script type="text/javascript" src="/static/js/tabs4.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
$('#embed').click(function(){
|
jQuery('#embed').click(function(){
|
||||||
$('div#widgetcode').toggle();
|
jQuery('div#widgetcode').toggle();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -85,7 +86,21 @@ $(document).ready(function(){
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ wishers }} Ungluers have
|
{{ wishers }} Ungluers have
|
||||||
{% endif %}wished for this Work</div><div class="status"><img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" /></div></div>
|
{% endif %}wished for this Work</div><div class="status"><img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" /></div></div>
|
||||||
<div class="btn_support">Add/drop from wishlist</div>
|
<div class="btn_support">
|
||||||
|
{% if request.user.is_anonymous %}
|
||||||
|
<div class="create-account">
|
||||||
|
<span title="{% url work work.id %}">Login to Add</span>
|
||||||
|
</div>
|
||||||
|
{% else %}{% if work in request.user.wishlist.works.all %}
|
||||||
|
<div class="remove-wishlist">
|
||||||
|
<span id="{{ work.id }}">Remove This</span>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="add-wishlist">
|
||||||
|
<span id="{{ work.googlebooks_id }}">Add to Wishlist</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}{% endif %}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -255,3 +255,23 @@ a {
|
||||||
color: #3d4e53;
|
color: #3d4e53;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
.add-wishlist,
|
||||||
|
.remove-wishlist,
|
||||||
|
.on-wishlist,
|
||||||
|
.create-account {
|
||||||
|
margin-right: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
width: 136px;
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.add-wishlist span,
|
||||||
|
.remove-wishlist span,
|
||||||
|
.on-wishlist span,
|
||||||
|
.create-account span {
|
||||||
|
font-weight: normal;
|
||||||
|
color: #3d4e53;
|
||||||
|
text-transform: none;
|
||||||
|
background: url("/static/images/booklist/add-wishlist.png") left center no-repeat;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
display choices accordingly
|
display choices accordingly
|
||||||
or we could just suppress display of those elements and not worry about it for now
|
or we could just suppress display of those elements and not worry about it for now
|
||||||
so we are, with this stylesheet
|
so we are, with this stylesheet
|
||||||
|
(it must go AFTER book_panel.css so these rules will override those)
|
||||||
hackish solution ftw!
|
hackish solution ftw!
|
||||||
*/
|
*/
|
||||||
div.book-list div.booklist-status, .booklist-status, .icons {
|
div.book-list div.booklist-status, .booklist-status, .icons {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.3 KiB |
|
@ -1,13 +1,13 @@
|
||||||
$(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
|
|
||||||
$(".add-wishlist").each(function (index, element) {
|
jQuery(".add-wishlist").each(function (index, element) {
|
||||||
$(element).click(function() {
|
jQuery(element).click(function() {
|
||||||
var span = $(element).find("span");
|
var span = jQuery(element).find("span");
|
||||||
var gb_id = span.attr('id')
|
var gb_id = span.attr('id')
|
||||||
if (!gb_id) return;
|
if (!gb_id) return;
|
||||||
$.post('/wishlist/', {'googlebooks_id': gb_id}, function(data) {
|
jQuery.post('/wishlist/', {'googlebooks_id': gb_id}, function(data) {
|
||||||
span.fadeOut();
|
span.fadeOut();
|
||||||
var newSpan = $('<span class="on-wishlist">On Your Wishlist!</span>').hide();
|
var newSpan = jQuery('<span class="on-wishlist">On Your Wishlist!</span>').hide();
|
||||||
span.replaceWith(newSpan);
|
span.replaceWith(newSpan);
|
||||||
newSpan.fadeIn('slow');
|
newSpan.fadeIn('slow');
|
||||||
newSpan.removeAttr("id");
|
newSpan.removeAttr("id");
|
||||||
|
@ -15,20 +15,20 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".remove-wishlist").each(function (index, element) {
|
jQuery(".remove-wishlist").each(function (index, element) {
|
||||||
$(element).click(function() {
|
jQuery(element).click(function() {
|
||||||
var span = $(element).find("span");
|
var span = jQuery(element).find("span");
|
||||||
var work_id = span.attr('id')
|
var work_id = span.attr('id')
|
||||||
$.post('/wishlist/', {'remove_work_id': work_id}, function(data) {
|
jQuery.post('/wishlist/', {'remove_work_id': work_id}, function(data) {
|
||||||
var book = $(element).parent();
|
var book = jQuery(element).parent();
|
||||||
book.fadeOut();
|
book.fadeOut();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".create-account").each(function (index, element) {
|
jQuery(".create-account").each(function (index, element) {
|
||||||
$(element).click(function() {
|
jQuery(element).click(function() {
|
||||||
var span = $(element).find("span");
|
var span = jQuery(element).find("span");
|
||||||
var work_url = span.attr('title')
|
var work_url = span.attr('title')
|
||||||
window.location = "/accounts/login/?next=" + work_url;
|
window.location = "/accounts/login/?next=" + work_url;
|
||||||
});
|
});
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_support a {
|
.btn_support a {
|
||||||
background:url("@{image-base}btn_bg.png") 0 0 no-repeat;
|
background:url("@{image-base}btn_bg.png") 0 0 no-repeat;
|
||||||
width:104px;
|
width:104px;
|
||||||
height:41px;
|
height:41px;
|
||||||
line-height:41px;
|
line-height:41px;
|
||||||
|
@ -274,4 +274,20 @@ ul.support li {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* differs from sitewide.css. should it? */
|
/* differs from sitewide.css. should it? */
|
||||||
a{ color:#3d4e53; font-size:12px;}
|
a{ color:#3d4e53; font-size:12px;}
|
||||||
|
|
||||||
|
.add-wishlist, &.remove-wishlist, &.on-wishlist, &.create-account {
|
||||||
|
margin-right: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
width: 136px;
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-weight:normal;
|
||||||
|
color:@text-blue;
|
||||||
|
text-transform: none;
|
||||||
|
background:url("@{image-base}booklist/add-wishlist.png") left center no-repeat;
|
||||||
|
padding-left:20px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@
|
||||||
display choices accordingly
|
display choices accordingly
|
||||||
or we could just suppress display of those elements and not worry about it for now
|
or we could just suppress display of those elements and not worry about it for now
|
||||||
so we are, with this stylesheet
|
so we are, with this stylesheet
|
||||||
|
(it must go AFTER book_panel.css so these rules will override those)
|
||||||
hackish solution ftw!
|
hackish solution ftw!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue