diff --git a/frontend/templates/home.html b/frontend/templates/home.html
index 2cd2b56f..d2555043 100755
--- a/frontend/templates/home.html
+++ b/frontend/templates/home.html
@@ -132,20 +132,27 @@ var $j = jQuery.noConflict();
Start Ungluing Now!
diff --git a/frontend/templates/work.html b/frontend/templates/work.html
index 1756a0db..3dd310d0 100644
--- a/frontend/templates/work.html
+++ b/frontend/templates/work.html
@@ -1,22 +1,23 @@
{% extends "base.html" %}
-{% block title %}
-{{ work.title }}
-{% endblock %}
-{% block extra_head %}
-
+{% block title %} {{ work.title }}{% endblock %}
+{% block extra_css %}
+
+{% endblock %}
+
+{% block base_js %}
+
-
{% endblock %}
{% block content %}
@@ -85,7 +86,21 @@ $(document).ready(function(){
{% else %}
{{ wishers }} Ungluers have
{% endif %}wished for this Work
- Add/drop from wishlist
+
+ {% if request.user.is_anonymous %}
+
+ Login to Add
+
+ {% else %}{% if work in request.user.wishlist.works.all %}
+
+ Remove This
+
+ {% else %}
+
+ Add to Wishlist
+
+ {% endif %}{% endif %}
+
{% endif %}
diff --git a/static/css/campaign.css b/static/css/campaign.css
index 3f51b74c..a2a65c6f 100755
--- a/static/css/campaign.css
+++ b/static/css/campaign.css
@@ -255,3 +255,23 @@ 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;
+}
+.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;
+}
diff --git a/static/css/search.css b/static/css/search.css
index cc499d06..0e2b5b1e 100644
--- a/static/css/search.css
+++ b/static/css/search.css
@@ -5,6 +5,7 @@
display choices accordingly
or we could just suppress display of those elements and not worry about it for now
so we are, with this stylesheet
+ (it must go AFTER book_panel.css so these rules will override those)
hackish solution ftw!
*/
div.book-list div.booklist-status, .booklist-status, .icons {
diff --git a/static/images/supporter_icons/openlibrary_square.png b/static/images/supporter_icons/openlibrary_square.png
index ffb7e7fe..034dad9a 100644
Binary files a/static/images/supporter_icons/openlibrary_square.png and b/static/images/supporter_icons/openlibrary_square.png differ
diff --git a/static/js/wishlist.js b/static/js/wishlist.js
index 890fae45..40529271 100644
--- a/static/js/wishlist.js
+++ b/static/js/wishlist.js
@@ -1,13 +1,13 @@
-$(document).ready(function() {
+jQuery(document).ready(function() {
- $(".add-wishlist").each(function (index, element) {
- $(element).click(function() {
- var span = $(element).find("span");
+ jQuery(".add-wishlist").each(function (index, element) {
+ jQuery(element).click(function() {
+ var span = jQuery(element).find("span");
var gb_id = span.attr('id')
if (!gb_id) return;
- $.post('/wishlist/', {'googlebooks_id': gb_id}, function(data) {
+ jQuery.post('/wishlist/', {'googlebooks_id': gb_id}, function(data) {
span.fadeOut();
- var newSpan = $('On Your Wishlist!').hide();
+ var newSpan = jQuery('On Your Wishlist!').hide();
span.replaceWith(newSpan);
newSpan.fadeIn('slow');
newSpan.removeAttr("id");
@@ -15,20 +15,20 @@ $(document).ready(function() {
});
});
- $(".remove-wishlist").each(function (index, element) {
- $(element).click(function() {
- var span = $(element).find("span");
+ jQuery(".remove-wishlist").each(function (index, element) {
+ jQuery(element).click(function() {
+ var span = jQuery(element).find("span");
var work_id = span.attr('id')
- $.post('/wishlist/', {'remove_work_id': work_id}, function(data) {
- var book = $(element).parent();
+ jQuery.post('/wishlist/', {'remove_work_id': work_id}, function(data) {
+ var book = jQuery(element).parent();
book.fadeOut();
});
});
});
- $(".create-account").each(function (index, element) {
- $(element).click(function() {
- var span = $(element).find("span");
+ jQuery(".create-account").each(function (index, element) {
+ jQuery(element).click(function() {
+ var span = jQuery(element).find("span");
var work_url = span.attr('title')
window.location = "/accounts/login/?next=" + work_url;
});
diff --git a/static/less/campaign.less b/static/less/campaign.less
index c3600150..f67706f6 100644
--- a/static/less/campaign.less
+++ b/static/less/campaign.less
@@ -104,7 +104,7 @@
}
.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;
height:41px;
line-height:41px;
@@ -274,4 +274,20 @@ ul.support li {
}
/* differs from sitewide.css. should it? */
-a{ color:#3d4e53; font-size:12px;}
\ No newline at end of file
+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;
+ }
+}
\ No newline at end of file
diff --git a/static/less/search.less b/static/less/search.less
index f3119235..4d98b10c 100644
--- a/static/less/search.less
+++ b/static/less/search.less
@@ -5,6 +5,7 @@
display choices accordingly
or we could just suppress display of those elements and not worry about it for now
so we are, with this stylesheet
+ (it must go AFTER book_panel.css so these rules will override those)
hackish solution ftw!
*/