summaryrefslogtreecommitdiff
path: root/stapp/templates/video/home.html
diff options
context:
space:
mode:
authorJay Parikh2012-07-23 15:27:25 +0530
committerJay Parikh2012-07-23 15:27:25 +0530
commit92a7668ae75e6b6244083dc56cdf50567f72086e (patch)
tree261d6365af8c4403e57c89213f06471b3cb8344a /stapp/templates/video/home.html
parent4e91b6ee6bc6a329b7382afabcc233a9e3b6e192 (diff)
downloadstproject-92a7668ae75e6b6244083dc56cdf50567f72086e.tar.gz
stproject-92a7668ae75e6b6244083dc56cdf50567f72086e.tar.bz2
stproject-92a7668ae75e6b6244083dc56cdf50567f72086e.zip
modification to change the description and name of the video being played
Diffstat (limited to 'stapp/templates/video/home.html')
-rw-r--r--stapp/templates/video/home.html19
1 files changed, 11 insertions, 8 deletions
diff --git a/stapp/templates/video/home.html b/stapp/templates/video/home.html
index 275a77a..80cc29b 100644
--- a/stapp/templates/video/home.html
+++ b/stapp/templates/video/home.html
@@ -6,15 +6,12 @@
{% block script %}
<script>
-function myfunction(video,image)
+function myfunction(video,image,idname,iddesc)
{
- //document.getElementById('videoname').innerHTML= videoname;
- //alert(v);
+ document.getElementById('videodescription').innerHTML = document.getElementById(iddesc).value;
+ document.getElementById('videoname').innerHTML = document.getElementById(idname).innerHTML;
document.getElementById('mainvideo').poster = image;
document.getElementById('mainvideo').src = video;
-
- //document.getElementById('videodescription').innerHTML= " " + v;
-
}
</script>
{% endblock %}
@@ -38,7 +35,13 @@ function myfunction(video,image)
<div class="module-list"><h3>{{module.name}}</h3>
<h5>{{module.description|safe}}</h5>
{% for video in module.video_list.all %}
- <a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}");javascript:document.getElementById('videoname').innerHTML={{video.name}}; >{{video.name}}</a>
+
+ <textarea style="display:none;" id=vdesc{{forloop.counter}}>{{video.description}}
+ </textarea>
+ <a id='vname{{forloop.counter}}' href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}","vname{{forloop.counter}}","vdesc{{forloop.counter}}");>{{video.name}}</a>
+
+
+
<br />
{% endfor %}</div>
{% endfor %}
@@ -50,7 +53,7 @@ function myfunction(video,image)
<div class="module-list"><h3>{{module.name}}</h3>
<h5>{{module.description|safe}}</h5>
{% for video in module.video_list.all %}
- <a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}");javascript:document.getElementById('videoname').innerHTML={{video.name}}; >{{video.name}}</a>
+ <a href=javascript:myfunction("{{video.filename.url}}","{{video.image.url}}");>{{video.name}}</a>
<br />
{% endfor %}</div>
{% endfor %}