replaced useless status indicators with wished-by indicators on supporter page for status = initailized or no campaign and destroyed GR/LT modal dialog
parent
12bde78765
commit
c79b3bdd10
|
@ -85,11 +85,17 @@
|
|||
<span class="booklist-status-label">Status: </span><span class="booklist-status-text">{{ status }}</span>
|
||||
</div>
|
||||
<div class="listview panelfront side1 icons">
|
||||
{% if status == 'No campaign yet' and fromsupport %}
|
||||
<span class="rounded"><span class="grey">Wished by {{ work.wished_by.count }}</span></span>
|
||||
{% if fromsupport %}
|
||||
{% if status == 'No campaign yet' or status == 'INITIALIZED' %}
|
||||
<span class="rounded"><span class="grey">Wished by {{ work.wished_by.count }}</span></span>
|
||||
{% else %}
|
||||
<div class="booklist-status-img">
|
||||
<img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="book list status" alt="book list status" />
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="booklist-status-img">
|
||||
<img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="book list status" alt="book list status" />
|
||||
<img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="book list status" alt="book list status" />
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="booklist-status-label">{{ work.percent_unglued_number }}%</div>
|
||||
|
|
|
@ -135,7 +135,7 @@ how do I integrate the your wishlist thing with the tabs thing?
|
|||
<div class="block block2">
|
||||
<h3 class="title">Links</h3>
|
||||
<div class="check-list">
|
||||
<label>Add your homepage URL:</label>
|
||||
<label> {% if supporter.profile.home_url %}Change{% else %}Add{% endif %} your homepage URL:</label>
|
||||
{{ profile_form.home_url }}{{ profile_form.home_url.errors }}
|
||||
</div>
|
||||
<div class="check-list">
|
||||
|
@ -160,7 +160,7 @@ how do I integrate the your wishlist thing with the tabs thing?
|
|||
{% endif %}
|
||||
</div>
|
||||
<div class="check-list">
|
||||
<label>Add Your LibraryThing User ID:</label>
|
||||
<label>{% if supporter.profile.librarything_id %}Change{% else %}Add{% endif %} your LibraryThing User ID:</label>
|
||||
{{ profile_form.librarything_id }}{{ profile_form.librarything_id.errors }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -172,9 +172,10 @@ how do I integrate the your wishlist thing with the tabs thing?
|
|||
{% csrf_token %}
|
||||
{{ goodreads_shelf_load_form.non_field_errors }}
|
||||
<div class="fieldWrapper">
|
||||
{{ goodreads_shelf_load_form.goodreads_shelf_name_number.errors }}
|
||||
{{ goodreads_shelf_load_form.goodreads_shelf_name_number }}
|
||||
<div id="loadgr"><input type="submit" value="Add your Goodreads shelf" /></div>
|
||||
<div id="loadgr"><span><div>{{ goodreads_shelf_load_form.goodreads_shelf_name_number.errors }}
|
||||
{{ goodreads_shelf_load_form.goodreads_shelf_name_number }}</div>
|
||||
<input type="submit" value="Add this shelf" />
|
||||
</div></span>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
|
@ -186,7 +187,7 @@ how do I integrate the your wishlist thing with the tabs thing?
|
|||
<div id="loadlt"><input type="submit" value="Add your LibraryThing library" /></div>
|
||||
</form>
|
||||
{% else %}
|
||||
<div id="loadlt"><div>Add your LibraryThing ID to import from LibraryThing.</div></div>
|
||||
<div id="loadlt"><div>Add your LibraryThing ID to import from LibraryThing: </div></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -837,7 +837,7 @@ def goodreads_load_shelf(request):
|
|||
ct.description = "Loading Goodread shelf %s to user %s with %s books" % (shelf_name, user, expected_number_of_books)
|
||||
ct.save()
|
||||
|
||||
return HttpResponse("Shelf loading placed on task queue.")
|
||||
return HttpResponse("<span style='margin: auto 10px auto 36px;vertical-align: middle;display: inline-block;'>We're on it! <a href='JavaScript:window.location.reload()'>Reload the page</a> to see the books we've snagged so far.</span>")
|
||||
except Exception,e:
|
||||
return HttpResponse("Error in loading shelf: %s " % (e))
|
||||
logger.info("Error in loading shelf for user %s: %s ", user, e)
|
||||
|
@ -869,8 +869,8 @@ def librarything_load(request):
|
|||
ct.user = user
|
||||
ct.description = "Loading LibraryThing collection of %s to user %s." % (lt_username, user)
|
||||
ct.save()
|
||||
|
||||
return HttpResponse("LibraryThing loading placed on task queue.")
|
||||
|
||||
return HttpResponse("<span style='margin: auto 10px auto 36px;vertical-align: middle;display: inline-block;'>We're on it! <a href='JavaScript:window.location.reload()'>Reload the page</a> to see the books we've snagged so far.</span>")
|
||||
except Exception,e:
|
||||
return HttpResponse("Error in loading LibraryThing library: %s " % (e))
|
||||
logger.info("Error in loading LibraryThing for user %s: %s ", user, e)
|
||||
|
|
|
@ -158,17 +158,26 @@ input.profile-save {
|
|||
#loadgr {
|
||||
background: url("/static/images/supporter_icons/goodreads_square.png") left center no-repeat;
|
||||
min-height: 32px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
#loadgr span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#loadgr div, #loadgr input {
|
||||
margin: 4px 10px 4px 36px;
|
||||
margin: 2px 10px 2px 36px;
|
||||
}
|
||||
#loadlt {
|
||||
background: url("/static/images/supporter_icons/librarything_square.png") left center no-repeat;
|
||||
min-height: 32px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
#loadlt div, #loadlt input {
|
||||
margin: auto 10px auto 36px;
|
||||
}
|
||||
.weareonthat {
|
||||
background: url("/static/images/checkmark_small.png") left center no-repeat;
|
||||
}
|
||||
a.my-setting {
|
||||
background: #d6dde0 url("/static/images/header/explane.png") 90% center no-repeat;
|
||||
border-radius: 7px;
|
||||
|
|
|
@ -3,9 +3,9 @@ jQuery(document).ready(function($) {
|
|||
// post to form_loc and alert with response
|
||||
var post_and_alert = function (form_loc){
|
||||
|
||||
return function(bubble,params) {
|
||||
return function(bubble,location,params) {
|
||||
$.post(form_loc, params, function (data) {
|
||||
alert(data);
|
||||
$(location+' > div').html(data);
|
||||
});
|
||||
|
||||
return bubble;
|
||||
|
@ -14,12 +14,12 @@ jQuery(document).ready(function($) {
|
|||
|
||||
|
||||
$('#load_shelf_form').submit(function(){
|
||||
post_and_alert('/goodreads/load_shelf/')(false,$('#load_shelf_form').serialize());
|
||||
post_and_alert('/goodreads/load_shelf/')(false,'#load_shelf_form',$('#load_shelf_form').serialize());
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#librarything_load').submit(function(){
|
||||
post_and_alert('/librarything/load/')(false,$('#librarything_load').serialize());
|
||||
post_and_alert('/librarything/load/')(false,'#librarything_load',$('#librarything_load').serialize());
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
@ -182,21 +182,31 @@ input.profile-save {
|
|||
#loadgr {
|
||||
background: url("@{image-base}supporter_icons/goodreads_square.png") left center no-repeat;
|
||||
min-height: 32px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div, input {
|
||||
margin: 4px 10px 4px 36px;
|
||||
margin: 2px 10px 2px 36px;
|
||||
}
|
||||
}
|
||||
|
||||
#loadlt {
|
||||
background: url("@{image-base}supporter_icons/librarything_square.png") left center no-repeat;
|
||||
min-height: 32px;
|
||||
padding-top: 4px;
|
||||
|
||||
div, input {
|
||||
margin: auto 10px auto 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.weareonthat {
|
||||
background: url("@{image-base}checkmark_small.png") left center no-repeat;
|
||||
}
|
||||
a.my-setting {
|
||||
background:@blue-grey url("@{image-base}header/explane.png") 90% center no-repeat;
|
||||
border-radius:7px;
|
||||
|
|
Loading…
Reference in New Issue