padma video, test profile forms

This commit is contained in:
Sanj 2012-04-21 16:31:12 +05:30
parent 795c65a999
commit 7b2642c5c0
2 changed files with 21 additions and 6 deletions

View File

@ -93,7 +93,7 @@
{% 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" data-video="http://pad.ma/{{ v.padmavideo.padma_id }}/480p.webm" target="_blank"> <a href="/static/{{ v.padmavideo.padma_link }}" class="padmaLink" data-video="http://pad.ma/{{ v.padmavideo.padma_id }}/480p.webm" target="_blank">
<img src="/static/images/VideoIcon.jpg" title="<span class='ttTitle'>Video: {{ talk.title }}.</span><span class='rightclickHelp'>(Right click and select 'Save Link As' to download)</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>
{% endfor %} {% endfor %}
@ -248,16 +248,28 @@
var $video; var $video;
$('a.padmaLink').toggle(function(e) { $('a.padmaLink').toggle(function(e) {
e.preventDefault(); e.preventDefault();
if ($(this).data("$video") == undefined) {
var videoSrc = $(this).attr("data-video"); var videoSrc = $(this).attr("data-video");
$video = $('<video>').attr("src", videoSrc).attr("autoplay", "autoplay").attr("controls", "controls").addClass("padmaVideo"); var $video = $('<video>').attr("src", videoSrc).attr("autoplay", "autoplay").attr("controls", "controls").addClass("padmaVideo").css({'maxWidth': '100%', 'marginTop': '6px', 'display': 'block'}).hide();
$(this).parents('.talks').eq(0).append($video); $(this).data("$video", $video);
$(this).parents('li').eq(0).append($video);
$video.slideDown();
} else {
$(this).data("$video").slideDown();
}
//console.log("clicked in"); //console.log("clicked in");
}, function(e) { }, function(e) {
e.preventDefault(); e.preventDefault();
//console.log("clicked out"); //console.log("clicked out");
$video.remove(); $(this).data("$video").get(0).pause();
$(this).data("$video").slideUp();
}); });
})(); })();
$('.talkIcon img').tooltip({
showURL: false,
extraClass: 'myToolTip'
});
</script> </script>

View File

@ -5,12 +5,15 @@
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="/static/css/noel/inner.css" type="text/css" /> <link rel="stylesheet" href="/static/css/noel/inner.css" type="text/css" />
<link rel="stylesheet" href="/static/css/noel/inner-details.css" type="text/css" /> <link rel="stylesheet" href="/static/css/noel/inner-details.css" type="text/css" />
<link type="text/css" rel="stylesheet" href="/static/css/jquery.tooltip.css" />
<script type="text/javascript" src="/static/js/history/history.js"></script> <script type="text/javascript" src="/static/js/history/history.js"></script>
<script type="text/javascript" src="/static/js/history/amplify.store.js"></script> <script type="text/javascript" src="/static/js/history/amplify.store.js"></script>
<script type="text/javascript" src="/static/js/history/history.html4.js"></script> <script type="text/javascript" src="/static/js/history/history.html4.js"></script>
<script type="text/javascript" src="/static/js/history/history.adapter.jquery.js"></script> <script type="text/javascript" src="/static/js/history/history.adapter.jquery.js"></script>
<script type="text/javascript" src="/static/js/query_parser.js"></script> <script type="text/javascript" src="/static/js/query_parser.js"></script>
<script type="text/javascript" src="/static/js/jquery.tooltip.js"></script>
<script type="text/javascript" src="/static/js/insidepage.js"></script> <script type="text/javascript" src="/static/js/insidepage.js"></script>
{% endblock %} {% endblock %}