unbind send-to-kindle action after send, don't display options not available without javascript to non-js users

pull/1/head
Andromeda Yelton 2013-06-26 09:43:15 -04:00
parent 8395a4afb4
commit a6879ac20d
8 changed files with 13 additions and 14 deletions

View File

@ -47,11 +47,9 @@ $j(document).ready(function() {
</div> </div>
</div> </div>
<div class="no_js"> <div class="no_js">
<p> <form method="POST" class="btn_support" action="{% url send_to_kindle kindle_ebook_id 0 %}">
<form method="POST" action="{% url send_to_kindle kindle_ebook_id 0 %}"> <input type="submit" value="Send to Kindle">
<input type="submit" value="Send it!"> </form>
</form>
</p>
</div> </div>
{% else %} {% else %}
<div class="btn_support kindle"> <div class="btn_support kindle">
@ -61,7 +59,7 @@ $j(document).ready(function() {
</div> </div>
{% endif %} {% endif %}
{% if readmill_epub_url %} {% if readmill_epub_url %}
<div id="readmill_div"> <div id="readmill_div" class="yes_js">
<div class="send-to-readmill" data-download-url="{{ readmill_epub_url }}" data-buy-url="{{ base_url }}{% url work work.id %}"></div> <div class="send-to-readmill" data-download-url="{{ readmill_epub_url }}" data-buy-url="{{ base_url }}{% url work work.id %}"></div>
</div> </div>
{% endif %} {% endif %}

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}.active{display:inherit!important} .buttons,.yes_js,.other_instructions_paragraph{display:inherit}.instructions>div:not(.active){display:none}.no_js{display:none!important}.active{display:inherit!important}

View File

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

File diff suppressed because one or more lines are too long

View File

@ -29,6 +29,7 @@ $j(document).on('click', '#kindle.authenticated', function() {
$j.post('/send_to_kindle/' + kindle_ebook_id + '/1/', function(data) { $j.post('/send_to_kindle/' + kindle_ebook_id + '/1/', function(data) {
myDiv.removeClass('btn_support'); myDiv.removeClass('btn_support');
myDiv.html(data); myDiv.html(data);
myDiv.removeAttr('id');
return false; return false;
}); });
}); });

View File

@ -1,4 +1,4 @@
.buttons, #kindle_div .yes_js, .other_instructions_paragraph { .buttons, .yes_js, .other_instructions_paragraph {
display: inherit; display: inherit;
} }
@ -6,7 +6,7 @@
display: none; display: none;
} }
#kindle_div .no_js { .no_js {
display: none !important; display: none !important;
} }

View File

@ -1,4 +1,4 @@
#kindle_div .yes_js, .other_instructions_paragraph { .yes_js, .other_instructions_paragraph {
display: inherit; display: inherit;
} }
@ -6,7 +6,7 @@
display: none; display: none;
} }
#kindle_div .no_js { .no_js {
display: none !important; display: none !important;
} }

View File

@ -954,6 +954,6 @@ li.checked {
display: none; display: none;
} }
#kindle_div .yes_js { .yes_js {
display: none; display: none;
} }