merge session.next_page into cookie.next functionality
parent
fbe37359f2
commit
e92532524f
|
@ -55,7 +55,7 @@ $j(document).ready(function() {
|
|||
</div>
|
||||
{% else %}
|
||||
<div class="btn_support kindle">
|
||||
<a href="{% url kindle_config_download kindle_ebook_id %}">Set up Kindle email</a>
|
||||
<a href="{% url kindle_config_download kindle_ebook_id %}">Set up Kindle </a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -65,6 +65,9 @@ $j(document).ready(function() {
|
|||
<div class="send-to-readmill" data-download-url="{{ readmill_epub_url }}" data-buy-url="{{ base_url }}{% url work work.id %}"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not request.user.is_authenticated %}
|
||||
<div style="clear:left"> You'll need an unglue.it account to <i>Send to Kindle</i>.</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if unglued_ebooks or other_ebooks %}
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
|
||||
{% block doccontent %}
|
||||
{% include "kindle_response_message.html" %}
|
||||
<p>
|
||||
You can <a href="{{ request.session.next_page }}download">go back</a> to the book you were downloading.
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
|
@ -26,14 +26,14 @@ Make sure the username box has your <b>username, not your email</b> -- some brow
|
|||
<br />
|
||||
|
||||
|
||||
<a href="{% url auth_password_reset %}?next={% if request.session.next_page %}{{ request.session.next_page|urlencode }}{% else %}{% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}{% endif %}">Forgot</a> your password? <a href="{% url registration_register %}?next={% if request.session.next_page %}{{ request.session.next_page|urlencode }}{% else %}{% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}{% endif %}">Need an account</a>? <a href="/faq/basics/account">Other questions</a>?
|
||||
<a href="{% url auth_password_reset %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Forgot</a> your password? <a href="{% url registration_register %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Need an account</a>? <a href="/faq/basics/account">Other questions</a>?
|
||||
|
||||
|
||||
<br /><br />
|
||||
<div class="google_signup">
|
||||
<div {% if socials.google %}class="errorlist"{% endif %}>
|
||||
<div><a href="/socialauth/login/google?next={% if request.session.next_page %}{{ request.session.next_page|urlencode }}{% else %}{% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}{% endif %}"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png" alt="google" /></a></div>
|
||||
<div>Or: <a href="/socialauth/login/google?next={% if request.session.next_page %}{{ request.session.next_page|urlencode }}{% else %}{% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}{% endif %}">Sign in with Google</a></div>
|
||||
<div><a href="/socialauth/login/google?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png" alt="google" /></a></div>
|
||||
<div>Or: <a href="/socialauth/login/google?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Sign in with Google</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
|
|
|
@ -24,18 +24,20 @@ $j(document).ready(function() {
|
|||
if ($j(this).attr("href").indexOf("download") !== -1) {
|
||||
jQuery.getScript('/static/js/download_page.js');
|
||||
jQuery.getScript('https://platform.readmill.com/send.js');
|
||||
var work_page = $j(this).attr("href").split("download")[0];
|
||||
$j.cookie('next', work_page, {path: '/'});
|
||||
}
|
||||
|
||||
//need to push next cookie for sign-in links
|
||||
var vars = $j(this).attr("href").split("next=");
|
||||
if (vars.length>1){
|
||||
next=vars[1];
|
||||
if(next!='') {
|
||||
next = next.replace(/[\x22\x27\x3c\x3e]/g,'');
|
||||
$j.cookie('next', next, {path: '/'});
|
||||
else {
|
||||
//need to push next cookie for sign-in links
|
||||
var vars = $j(this).attr("href").split("next=");
|
||||
if (vars.length>1){
|
||||
next=vars[1];
|
||||
if(next!='') {
|
||||
next = next.replace(/[\x22\x27\x3c\x3e]/g,'');
|
||||
$j.cookie('next', next, {path: '/'});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fade-out rest of page elements on expand
|
||||
$j('#feedback, #js-page-wrap, #footer').css({"opacity": "0.07"});
|
||||
$j('#about_expandable').css({'position': 'absolute'});
|
||||
|
|
Loading…
Reference in New Issue