remove index, eq magic and just reference videos by db ids
This commit is contained in:
parent
e86eb2e096
commit
1500a97c35
|
@ -92,7 +92,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for v in talk.videos.all %}
|
{% for v in talk.videos.all %}
|
||||||
<span class="talkIcon">
|
<span class="talkIcon">
|
||||||
<a href="/static/{{ v.padmavideo.padma_link }}" class="padmaLink" target="_blank">
|
<a href="/static/{{ v.padmavideo.padma_link }}" class="padmaLink" data-video-id="{{v.id}}" target="_blank">
|
||||||
<img src="/static/images/VideoIcon.jpg" title="<span class='ttTitle'>Video: {{ talk.title }}.</span><span class='rightclickHelp'>Click to view on page</span>">
|
<img src="/static/images/VideoIcon.jpg" title="<span class='ttTitle'>Video: {{ talk.title }}.</span><span class='rightclickHelp'>Click to view on page</span>">
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
</span>
|
</span>
|
||||||
{{ talk.title }} {% if talk.presenter %} by {{ talk.presenter }} {% endif %}
|
{{ talk.title }} {% if talk.presenter %} by {{ talk.presenter }} {% endif %}
|
||||||
{% for v in talk.videos.all %}
|
{% for v in talk.videos.all %}
|
||||||
<div class="padmaVideo" data-pandora-id="{{ v.padmavideo.padma_id }}" data-pandora-in="{{ v.time_in }}" data-pandora-out="{{ v.time_out }}" data-pandora-layers="transcripts" data-pandora-width="480" data-pandora-resolution="240p"></div>
|
<div class="padmaVideo" data-pandora-id="{{ v.padmavideo.padma_id }}" data-video-id="{{ v.id }}" data-pandora-in="{{ v.time_in }}" data-pandora-out="{{ v.time_out }}" data-pandora-layers="transcripts" data-pandora-width="480" data-pandora-resolution="240p"></div>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</li>
|
</li>
|
||||||
|
@ -256,8 +256,9 @@
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
$('a.padmaLink').toggle(function() {
|
$('a.padmaLink').toggle(function() {
|
||||||
var index = $(this).index('.padmaLink');
|
var padma_id = $(this).attr("data-video-id");
|
||||||
var $video = $('.padmaVideo').eq(index);
|
|
||||||
|
var $video = $('.padmaVideo[data-video-id=' + padma_id + ']');
|
||||||
if ($video.data("padmaLoaded")) {
|
if ($video.data("padmaLoaded")) {
|
||||||
$video.slideDown();
|
$video.slideDown();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user