fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'staging'
[wolnelektury.git]
/
wolnelektury
/
templates
/
lessons
/
document_list.html
diff --git
a/wolnelektury/templates/lessons/document_list.html
b/wolnelektury/templates/lessons/document_list.html
index
d8564a5
..
00d161f
100644
(file)
--- a/
wolnelektury/templates/lessons/document_list.html
+++ b/
wolnelektury/templates/lessons/document_list.html
@@
-9,9
+9,9
@@
{% block extrahead %}
<script type="text/javascript" charset="utf-8">
$(function() {
{% block extrahead %}
<script type="text/javascript" charset="utf-8">
$(function() {
- $('#document-list a').click(function() {
+ $('#document-list a
[data-hash]
').click(function() {
if (!$(this).hasClass('active')) {
if (!$(this).hasClass('active')) {
- $('#document-list a').removeClass('active');
+ $('#document-list a
[data-hash]
').removeClass('active');
$(this).addClass('active');
document.location.hash = $(this).attr('data-hash');
}
$(this).addClass('active');
document.location.hash = $(this).attr('data-hash');
}
@@
-35,7
+35,9
@@
.load(documentLink.attr('href'));
};
} else if (!document.location.hash) {
.load(documentLink.attr('href'));
};
} else if (!document.location.hash) {
- $('#document-list a:first').click();
+ $first = $('#document-list a:first');
+ $first.addClass('active');
+ location.replace($first.attr('data-hash'));
}
setTimeout(checkHash, 500);
}
setTimeout(checkHash, 500);
@@
-52,11
+54,7
@@
</form>
<div id="document-list">
</form>
<div id="document-list">
- <ol>
- {% for object in object_list %}
- <li><a href="{{ object.get_absolute_url }}" data-hash="#{{ object.slug }}">{{ object }}</a></li>
- {% endfor %}
- </ol>
+ {% chunk "document-list" %}
</div>
<div id="document-detail">
</div>
</div>
<div id="document-detail">
</div>