segregate flows of one-click and information-seeking options, address feedback

pull/1/head
Andromeda Yelton 2013-06-24 13:53:28 -04:00
parent 3c950966bc
commit 69f0451bea
14 changed files with 201 additions and 119 deletions

View File

@ -23,7 +23,7 @@ $j(document).ready(function() {
<div id="lightbox_content">
<div class="border">
<h2>Downloads for <I><a href="{% url work work.id %}">{{ work.title }}</a></i></h2>
<div class="sharing not_unglued">
<div class="sharing ebook_download_container">
<h3 class="jsmod-title"><span>Share</span></h3>
<ul class="social menu">
{% with site.domain as domain %}
@ -31,43 +31,75 @@ $j(document).ready(function() {
<a href="https://twitter.com/intent/tweet?url={{ request.build_absolute_uri|urlencode:"" }}&amp;text=I%27m%20enjoying%20{{ work.title|urlencode }}%2C%20a%20free%2C%20non%2DDRM%20ebook%2E%20You%20can%20too%21"><li class="twitter"><span>Twitter</span></li></a>
{% endwith %}
<a href="{% url emailshare '' %}?next={% url work work.id %}"><li class="email"><span>Email</span></li></a>
<a href="#" id="embed2"><li class="embed"><span>Embed</span></li></a>
<a id="embed2"><li class="embed"><span>Embed</span></li></a>
<div id="widgetcode2">Copy/paste this into your site:<br /><textarea rows="7" cols="22">&lt;iframe src="https://{{ request.META.HTTP_HOST }}/api/widget/{{ work.first_isbn_13 }}/" width="152" height="325" frameborder="0"&gt;&lt;/iframe&gt;</textarea></div>
</ul>
</div>
{% if readmill_epub_url or kindle_ebook_id %}
<div class="one_click clearfix">
<h3>One-click options</h3>
{% if kindle_ebook_id %}
<div id="kindle_div">
{% if request.user.is_authenticated and request.user.profile.kindle_email %}
<div class="yes_js">
<div id="kindle" class="{{ kindle_ebook_id }} btn_support authenticated">
<a>Send to Kindle</a>
</div>
</div>
<div class="no_js">
<p>
<form method="POST" action="{% url send_to_kindle kindle_ebook_id 0 %}">
<input type="submit" value="Send it!">
</form>
</p>
</div>
{% else %}
<div class="btn_support kindle">
<a href="{% url kindle_config_download kindle_ebook_id %}">Set up Kindle sharing</a>
</div>
{% endif %}
</div>
{% endif %}
{% if readmill_epub_url %}
<div id="readmill_div">
<div class="send-to-readmill" data-download-url="{{ readmill_epub_url }}" data-buy-url="{{ base_url }}{% url work work.id %}"></div>
</div>
{% endif %}
</div>
{% endif %}
{% if unglued_ebooks or other_ebooks %}
<div class="ebook_download_container">
{% endif %}
{% if unglued_ebooks %}
<div class="unglued">
<h3>Read the unglued edition!</h3>
<h3>Download the unglued edition</h3>
<div class="ebook_download">
{% for ebook in unglued_ebooks %}
<a href="{% url download_ebook ebook.id %}">
<img src="{{ ebook.rights_badge }}" alt="{{ ebook.rights}}" title="{{ ebook.rights}}" /></a>
<a href="{% url download_ebook ebook.id %}"><img src="/static/images/{{ ebook.format }}32.png" height="32" alt="{{ ebook.format }}" title="{{ ebook.format }}" /></a>
<a href="{% url download_ebook ebook.id %}">{{ ebook.format }}</a>
{% ifequal ebook.format 'mobi' %} (use for Kindle){% endifequal %}
{% ifequal ebook.format 'epub' %} (use for Nook, Apple, Sony){% endifequal %}
{% if not forloop.last %}<br /><br />{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% if other_ebooks %}
<div class="not_unglued">
{% if unglued_ebook %}
<h4>Other freely available editions</h4>
<h4>Download other freely available editions</h4>
{% else %}
<h4>Freely available editions</h4>
<h4>Download freely available editions</h4>
{% endif %}
<div class="ebook_download">
{% for ebook in other_ebooks %}
<a href="{% url download_ebook ebook.id %}">
<img src="{{ ebook.rights_badge }}" alt="{{ ebook.rights}}" title="{{ ebook.rights}}" /></a>
<a href="{% url download_ebook ebook.id %}"><img src="/static/images/{{ ebook.format }}32.png" height="32" alt="{{ ebook.format }} at {{ebook.provider}}" title="{{ ebook.format }} at {{ebook.provider}}" /></a>
<a href="{% url download_ebook ebook.id %}">{{ ebook.format }} at {{ ebook.provider }}</a>
{% ifequal ebook.format 'mobi' %} (use for Kindle){% endifequal %}
{% ifequal ebook.format 'epub' %} (use for Nook, Apple, Sony){% endifequal %}
{% if not forloop.last %}<br /><br />{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% if unglued_ebooks or other_ebooks %}
</div>
{% endif %}
<div class="clearfix"></div>
</div>
@ -77,7 +109,7 @@ $j(document).ready(function() {
<div class="instructions">
<div id="iOS_app_div"{% if iOS_app %} class="active"{% endif %}>
<p>
Looks like you're using an embedded browser in an iOS app (maybe you followed a link in Twitter or Facebook?).
Looks like you're using an embedded browser in an iOS app. (Maybe you followed a link in Twitter or Facebook?)
</p>
<p>
{% if formats.epub %}
@ -93,7 +125,7 @@ $j(document).ready(function() {
{% endif %}{% endif %}{% endif %}{% endif %}
</p>
<p class="other_instructions_paragraph">
Not on iOS? Try the instructions for <a href="#" id="android" class="other_instructions">Android</a>, <a href="#" id="desktop" class="other_instructions">desktop computers</a>, or <a href="#" id="ereader" class="other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
Not on iOS? Try the instructions for <a class="android other_instructions">Android</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p>
</div>
@ -133,11 +165,11 @@ $j(document).ready(function() {
</p>
{% endif %}{% endif %}{% endif %}{% endif %}
<p class="other_instructions_paragraph">
Not on iOS? Try the instructions for <a href="#" id="android" class="other_instructions">Android</a>, <a href="#" id="desktop" class="other_instructions">desktop computers</a>, or <a href="#" id="ereader" class="other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
Not on iOS? Try the instructions for <a class="android other_instructions">Android</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p>
</div>
<div id="android_div"{% if android %}class="active"{% endif %}>
<div id="android_div"{% if android %} class="active"{% endif %}>
<h4>Android devices</h4>
{% if formats.epub %}
<p>
@ -175,7 +207,7 @@ $j(document).ready(function() {
</p>
{% endif %}{% endif %}{% endif %}{% endif %}
<p class="other_instructions_paragraph">
Not on Android? Try the instructions for <a href="#" id="ios" class="other_instructions">iPhone/iPad</a>, <a href="#" id="desktop" class="other_instructions">desktop computers</a>, or <a href="#" id="ereader" class="other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
Not on Android? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p>
</div>
@ -209,11 +241,11 @@ $j(document).ready(function() {
</p>
{% endif %}{% endif %}{% endif %}{% endif %}
<p class="other_instructions_paragraph">
Not on a desktop computer? Try the instructions for <a href="#" id="ios" class="other_instructions">iPhone/iPad</a>, <a href="#" id="android" class="other_instructions">Android</a>, or <a href="#" id="ereader" class="other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
Not on a desktop computer? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="android other_instructions">Android</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p>
</div>
<div id="ereader_div"{% if desktop %}class="active"{% endif %}>
<div id="ereader_div"{% if desktop %} class="active"{% endif %}>
<h4>Ereaders (Kindle, Nook, Kobo, etc.)</h4>
{% if formats.mobi or formats.pdf or formats.epub %}
@ -245,79 +277,11 @@ $j(document).ready(function() {
</p>
{% endif %}
<p class="other_instructions_paragraph">
Not using an ereader? Try the instructions for <a href="#" id="ios" class="other_instructions">iPhone/iPad</a>, <a href="#" id="android" class="other_instructions">Android</a>, or <a href="#" id="desktop" class="other_instructions">desktop computers</a>.
Not using an ereader? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="android other_instructions">Android</a>, or <a class="desktop other_instructions">desktop computers</a>.
</p>
</div>
</div>
{% if kindle_ebook_id %}
<div id="kindle_div">
<h4>Send to Kindle</h4>
{% if request.user.is_authenticated and request.user.profile.kindle_email %}
<div class="yes_js">
<p>Sending...<img src="/static/images/loading.gif"></p>
<p>(For large files, this may take some time.)</p>
<p>If your Kindle email has changed, you can <a href="{% url kindle_config %}">add the new one to Unglue.it here</a>.</p>
</div>
<div class="no_js">
<p>
<form method="POST" action="{% url send_to_kindle kindle_ebook_id 0 %}">
<input type="submit" value="Send it!">
</form>
</p>
<p>(For large files, this may take some time.)</p>
<p>If your Kindle email has changed, you can <a href="{% url kindle_config %}">add the new one to Unglue.it here</a>.</p>
</div>
{% else %}
<ul>
<li>
Add kindle@gluejar.com to your approved personal document list under Personal Document Settings at your <a href="http://amazon.com/myk" target="_blank">Amazon Manage Your Kindle page</a>.
</li>
<li>
Then, enter your Kindle address below.
</li>
</ul>
<div class="yes_js">
<form method="POST" action="{% url send_to_kindle kindle_ebook_id 1 %}">
<label for="kindle_email">Your Kindle email address</label>
<input type="text" name="kindle_email">
<input type="submit" value="Send it!">
</form>
<p>
(This may take a moment.)
</p>
</div>
<div class="no_js">
<form method="POST" action="{% url send_to_kindle kindle_ebook_id 0 %}">
<label for="kindle_email">Your Kindle email address</label>
<input type="text" name="kindle_email">
<input type="submit" value="Send it!">
</form>
<p>
(This may take a moment.)
</p>
</div>
{% endif %}
</div>
{% endif %}
{% comment %}
will need to deal with readmill handling later
{% if readmill_epub_url %}
<div id="readmill_div">
<h4>Readmill users</h4>
<p>
If you're a <a href="http://readmill.com/">Readmill</a> member, you can send unglued ebooks to your iPad with one click. Here you go:
</p>
<div class="send-to-readmill" data-download-url="{{ readmill_epub_url }}" data-buy-url="{{ base_url }}{% url work work.id %}" data-display="small"></div>
<p>
If you're not, Readmill is a reading app designed for beauty, sharing, and conversation. You can <a href="https://readmill.com/">learn more and get Readmill here</a>.
</p>
</div>
{% endif %}
{% endcomment %}
{% comment %}
If we're going to be providing mobi as the norm, let's not bother with these instructions.
<div class="instructions">

View File

@ -3,12 +3,37 @@
{% block title %}Kindle email change successful{% endblock %}
{% block extra_js %}
{{ block.super }}
<script>
var $j = jQuery.noConflict();
$j(document).ready(function() {
var kindle_ebook_id = {{ kindle_ebook_id }};
if(kindle_ebook_id) {
$j.post('/send_to_kindle/' + kindle_ebook_id + '/1/', function(data) {
$j('#replace_me').html(data);
return false;
});
}
});
</script>
{% endblock %}
{% block ce_content %}
<h2>Kindle email change successful</h2>
<div id="content-main">
<p>Hooray! We can now send unglued ebooks to you at {{ request.user.profile.kindle_email }}.</p>
<p>Why not <a href="{% url unglued_list '' %}">start downloading free books</a>?
{% if kindle_ebook_id %}
<p>
We're emailing you the ebook you wanted, <i>{{ title }}</i>...
</p>
<span id="replace_me"><img src="{{ STATIC_URL }}images/loading.gif"></span>
{% else %}
<p>
Why not <a href="{% url unglued_list '' %}">start downloading free books</a>?
</p>
{% endif %}
</div>
{% endblock %}
{% endwith %}

View File

@ -2,21 +2,54 @@
{% block title %}Add or change your Kindle email{% endblock %}
{% block extra_js %}
{{ block.super }}
<script>
var $j = jQuery.noConflict();
$j(document).ready(function() {
var kindle_ebook_id = {{ kindle_ebook_id }};
if(kindle_ebook_id) {
$j.post('/send_to_kindle/' + kindle_ebook_id + '/1/', function(data) {
$j('#replace_me').html(data);
return false;
});
}
});
</script>
{% endblock %}
{% block ce_content %}
{% with request.user.profile.kindle_email as kindle_email %}
<h2>Add or change your Kindle email</h2>
<div id="content-main">
{% if kindle_email %}
<p>You already have a Kindle email on file with Unglue.it: {{ kindle_email }} .</p>
<p>You can change it below.</p>
{% if kindle_ebook_id %}
<p>
Welcome back, {{ user.username }}! We're sending <I>{{ title }}</I> to {{ kindle_email }}.
</p>
<span id="replace_me"><img src="{{ STATIC_URL }}images/loading.gif"></span>
<p>
(If you'd like to change your Kindle email, you can do so below. You'll need to download the book again.)
</p>
{% else %}
<p>You already have a Kindle email on file with Unglue.it: {{ kindle_email }} .</p>
<p>You can change it below.</p>
{% endif %}
{% else %}
<p>Enter your Kindle email address below:</p>
{% endif %}
<form method="post" action="{% url kindle_config %}">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% if kindle_email %}Change{% else %}Add{% endif %}" />
</form>
{% if kindle_ebook_id %}
<form method="post" action="{% url kindle_config_download kindle_ebook_id %}">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% if kindle_email %}Change{% else %}Add{% endif %}" />
</form>
{% else %}
<form method="post" action="{% url kindle_config %}">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% if kindle_email %}Change{% else %}Add{% endif %}" />
</form>
{% endif %}
<script type="text/javascript">
document.getElementById('id_kindle_email').focus()
</script>

View File

@ -128,6 +128,7 @@ urlpatterns = patterns(
url(r"^press/$","press", name="press"),
url(r"^press_submitterator/$","press_submitterator", name="press_submitterator"),
url(r"^accounts/edit/kindle_config/$", "kindle_config", name="kindle_config"),
url(r"^accounts/edit/kindle_config/(?P<kindle_ebook_id>\d+)/$", "kindle_config", name="kindle_config_download"),
url(r"^send_to_kindle/(?P<kindle_ebook_id>\d+)/(?P<javascript>\d)/$", "send_to_kindle", name="send_to_kindle"),
url(r"^send_to_kindle/result/(?P<message>\d)/$", "send_to_kindle_graceful", name="send_to_kindle_graceful"),
)

View File

@ -2518,17 +2518,40 @@ def press_submitterator(request):
})
@login_required
def kindle_config(request):
def kindle_config(request, kindle_ebook_id=None):
def get_title_from_kindle_id(kindle_ebook_id):
# protect against user URL manipulation
title = None
if kindle_ebook_id:
try:
ebook = models.Ebook.objects.get(pk=kindle_ebook_id)
title = ebook.edition.work.title
except:
kindle_ebook_id = None
return title, kindle_ebook_id
if request.method == 'POST':
form = KindleEmailForm(request.POST)
if form.is_valid():
request.user.profile.kindle_email = form.cleaned_data['kindle_email']
request.user.profile.save()
return render(request, "kindle_change_successful.html")
(title, kindle_ebook_id) = get_title_from_kindle_id(kindle_ebook_id)
return render(
request,
"kindle_change_successful.html",
{'kindle_ebook_id': kindle_ebook_id, 'title':title}
)
else:
form = KindleEmailForm()
form = KindleEmailForm()
return render(request, "kindle_config.html", {'form': form})
(title, kindle_ebook_id) = get_title_from_kindle_id(kindle_ebook_id)
return render(
request,
"kindle_config.html",
{'form': form, 'kindle_ebook_id': kindle_ebook_id, 'title': title}
)
kindle_response_params = [
'This ebook is too big to be sent by email. Please download the file and then sideload it to your device using the instructions under Ereaders or Desktop.',
@ -2559,7 +2582,7 @@ def send_to_kindle(request, kindle_ebook_id, javascript='0'):
except ValidationError:
return local_response(request, javascript, 3)
request.session['kindle_email'] = kindle_email
else:
elif request.user.is_authenticated():
kindle_email = request.user.profile.kindle_email
# don't forget to increment the download counter!

View File

@ -1 +1 @@
.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{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:0;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}ul.social a:hover{text-decoration:none}ul.social li{padding:5px 0 5px 30px!important;height:28px;line-height:28px!important;margin:0!important;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}ul.social li.facebook{background:url("/static/images/icons/facebook.png") 10px center no-repeat;cursor:pointer}ul.social li.facebook span{padding-left:10px}ul.social li.facebook:hover{background:#8dc63f url("/static/images/icons/facebook-hover.png") 10px center no-repeat}ul.social li.facebook:hover span{color:#fff}ul.social li.twitter{background:url("/static/images/icons/twitter.png") 10px center no-repeat;cursor:pointer}ul.social li.twitter span{padding-left:10px}ul.social li.twitter:hover{background:#8dc63f url("/static/images/icons/twitter-hover.png") 10px center no-repeat}ul.social li.twitter:hover span{color:#fff}ul.social li.email{background:url("/static/images/icons/email.png") 10px center no-repeat;cursor:pointer}ul.social li.email span{padding-left:10px}ul.social li.email:hover{background:#8dc63f url("/static/images/icons/email-hover.png") 10px center no-repeat}ul.social li.email:hover span{color:#fff}ul.social li.embed{background:url("/static/images/icons/embed.png") 10px center no-repeat;cursor:pointer}ul.social li.embed span{padding-left:10px}ul.social li.embed:hover{background:#8dc63f url("/static/images/icons/embed-hover.png") 10px center no-repeat}ul.social li.embed:hover span{color:#fff}.download_container{width:75%;margin:auto}#lightbox_content a{color:#6994a3}#lightbox_content .signuptoday a{color:white}#lightbox_content h2,#lightbox_content h3,#lightbox_content h4{margin-top:15px}#lightbox_content h2 a{font-size:18.75px}#lightbox_content .ebook_download a{margin:auto 5px auto 0;font-size:15px}#lightbox_content .ebook_download img{vertical-align:middle}#lightbox_content .logo{font-size:15px}#lightbox_content .logo img{-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;height:50px;width:50px;margin-right:5px}#lightbox_content .unglued,#lightbox_content .not_unglued{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin-left:-0.25%;padding:.5%;padding-bottom:15px;margin-bottom:5px;width:74%}#lightbox_content .unglued h3,#lightbox_content .not_unglued h3{margin-top:5px}#lightbox_content .unglued{border:solid 2px #8dc63f}#lightbox_content .not_unglued{border:solid 2px #d6dde0}#lightbox_content a.add-wishlist .on-wishlist,#lightbox_content a.success,a.success:hover{text-decoration:none;color:#3d4e53}#lightbox_content a.success,a.success:hover{cursor:default}#lightbox_content ul{padding-left:50px}#lightbox_content ul li{margin-bottom:4px}.border{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:solid 2px #d6dde0;margin:5px auto;padding-right:5px;padding-left:5px}.sharing{float:right;padding:.5%!important;width:23%!important;min-width:105px}.sharing ul{padding:.5%!important}.sharing .jsmod-title{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;height:auto}.sharing .jsmod-title span{padding:5%!important;color:white!important;font-style:normal}#widgetcode2{display:none;border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px}#widgetcode2 textarea{max-width:90%}
.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{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:0;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}ul.social a:hover{text-decoration:none}ul.social li{padding:5px 0 5px 30px!important;height:28px;line-height:28px!important;margin:0!important;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}ul.social li.facebook{background:url("/static/images/icons/facebook.png") 10px center no-repeat;cursor:pointer}ul.social li.facebook span{padding-left:10px}ul.social li.facebook:hover{background:#8dc63f url("/static/images/icons/facebook-hover.png") 10px center no-repeat}ul.social li.facebook:hover span{color:#fff}ul.social li.twitter{background:url("/static/images/icons/twitter.png") 10px center no-repeat;cursor:pointer}ul.social li.twitter span{padding-left:10px}ul.social li.twitter:hover{background:#8dc63f url("/static/images/icons/twitter-hover.png") 10px center no-repeat}ul.social li.twitter:hover span{color:#fff}ul.social li.email{background:url("/static/images/icons/email.png") 10px center no-repeat;cursor:pointer}ul.social li.email span{padding-left:10px}ul.social li.email:hover{background:#8dc63f url("/static/images/icons/email-hover.png") 10px center no-repeat}ul.social li.email:hover span{color:#fff}ul.social li.embed{background:url("/static/images/icons/embed.png") 10px center no-repeat;cursor:pointer}ul.social li.embed span{padding-left:10px}ul.social li.embed:hover{background:#8dc63f url("/static/images/icons/embed-hover.png") 10px center no-repeat}ul.social li.embed:hover span{color:#fff}.download_container{width:75%;margin:auto}#lightbox_content a{color:#6994a3}#lightbox_content .signuptoday a{color:white}#lightbox_content h2,#lightbox_content h3,#lightbox_content h4{margin-top:15px}#lightbox_content h2 a{font-size:18.75px}#lightbox_content .ebook_download a{margin:auto 5px auto 0;font-size:15px}#lightbox_content .ebook_download img{vertical-align:middle}#lightbox_content .logo{font-size:15px}#lightbox_content .logo img{-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;height:50px;width:50px;margin-right:5px}#lightbox_content .one_click,#lightbox_content .ebook_download_container{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin-left:-0.25%;padding:.5%;padding-bottom:15px;margin-bottom:5px;width:74%}#lightbox_content .one_click h3,#lightbox_content .ebook_download_container h3{margin-top:5px}#lightbox_content .one_click{border:solid 2px #8dc63f}#lightbox_content .ebook_download_container{border:solid 2px #d6dde0}#lightbox_content a.add-wishlist .on-wishlist,#lightbox_content a.success,a.success:hover{text-decoration:none;color:#3d4e53}#lightbox_content a.success,a.success:hover{cursor:default}#lightbox_content ul{padding-left:50px}#lightbox_content ul li{margin-bottom:4px}.border{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:solid 2px #d6dde0;margin:5px auto;padding-right:5px;padding-left:5px}.sharing{float:right;padding:.5%!important;width:23%!important;min-width:105px}.sharing ul{padding:.5%!important}.sharing .jsmod-title{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;height:auto}.sharing .jsmod-title span{padding:5%!important;color:white!important;font-style:normal}#widgetcode2{display:none;border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px}#widgetcode2 textarea{max-width:90%}.btn_support.kindle{height:40px}.btn_support.kindle a{width:auto;font-size:15px}

View File

@ -1 +1 @@
.buttons,#kindle_div .yes_js,.other_instructions_paragraph{display:inherit}.instructions>div:not(.active){display:none}#kindle_div .no_js{display:none!important}
.buttons,#kindle_div .yes_js,.other_instructions_paragraph{display:inherit}.instructions>div:not(.active){display:none}#kindle_div .no_js{display:none!important}.active{display:inherit!important}

View File

@ -1 +1 @@
.buttons,#kindle_div .yes_js,.other_instructions_paragraph{display:inherit}.instructions>div{display:none}#kindle_div .no_js{display:none!important}.active{display:inherit}
#kindle_div .yes_js,.other_instructions_paragraph{display:inherit}.instructions>div{display:none}#kindle_div .no_js{display:none!important}.active{display:inherit!important}

File diff suppressed because one or more lines are too long

View File

@ -13,18 +13,22 @@ else {
// browser has a better sense of DOM changes than jQuery, so user can trigger click element
$j(document).on('click', '.other_instructions', function(e) {
e.preventDefault();
var myID = $j(this).attr('id');
var divSelector = '#' + myID + '_div';
var myLink = $j(this);
classes = myLink.attr('class').split(' ');
mySelector = classes[0];
var divSelector = '#' + mySelector + '_div';
var activeDiv = $j(divSelector);
activeDiv.show();
activeDiv.siblings().hide();
activeDiv.siblings().removeClass('active').hide();
});
$j(document).on('click', '#kindle.authenticated', function() {
classes = $j(this).attr('class').split(' ');
var myDiv = $j(this);
classes = myDiv.attr('class').split(' ');
kindle_ebook_id = classes[0];
myDiv.html('<img src="/static/images/loading.gif">')
$j.post('/send_to_kindle/' + kindle_ebook_id + '/1/', function(data) {
$j('#kindle_div').html(data);
myDiv.html(data);
return false;
});
});

View File

@ -8,7 +8,6 @@
#lightbox_content a {
color: @medium-blue;
}
#lightbox_content .signuptoday a {
@ -34,7 +33,7 @@
}
}
#lightbox_content .logo {
#lightbox_content .logo {
img {
.one-border-radius(7px);
height: 50px;
@ -45,7 +44,7 @@
font-size: @font-size-larger;
}
#lightbox_content .unglued, #lightbox_content .not_unglued {
#lightbox_content .one_click, #lightbox_content .ebook_download_container {
.one-border-radius(5px);
margin-left: -.25%;
padding: 0.5%;
@ -58,11 +57,11 @@
}
}
#lightbox_content .unglued {
border: solid 2px @call-to-action;
#lightbox_content .one_click {
border: solid 2px @call-to-action;
}
#lightbox_content .not_unglued {
#lightbox_content .ebook_download_container {
border: solid 2px @blue-grey;
}
@ -122,4 +121,13 @@
textarea {
max-width: 90%;
}
}
.btn_support.kindle{
height: 40px;
a {
width: auto;
font-size: @font-size-larger;
}
}

View File

@ -8,4 +8,8 @@
#kindle_div .no_js {
display: none !important;
}
.active {
display: inherit !important;
}

View File

@ -1,4 +1,4 @@
.buttons, #kindle_div .yes_js, .other_instructions_paragraph {
#kindle_div .yes_js, .other_instructions_paragraph {
display: inherit;
}
@ -12,5 +12,5 @@
/* the not selector doesn't work in IE <= 8 */
.active {
display: inherit;
display: inherit !important;
}

View File

@ -747,7 +747,7 @@ a.nounderline {
}
#lightbox_content {
p {
p, li {
padding: 9px 0;
font-size: @font-size-larger;
line-height: 20px;
@ -922,6 +922,26 @@ li.checked {
}
}
.one_click {
float: left;
& > div {
float: left;
#kindle a, .kindle a {
font-size: @font-size-larger;
padding: 9px 0;
}
div {
margin: 0 10px 0 0;
}
}
}
.ebook_download_container {
clear: left;
}
.other_instructions_paragraph {
display: none;
}