diff options
Diffstat (limited to 'design')
-rw-r--r-- | design/templates/admin/insert_images.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/design/templates/admin/insert_images.html b/design/templates/admin/insert_images.html index 4841f50..08b6d46 100644 --- a/design/templates/admin/insert_images.html +++ b/design/templates/admin/insert_images.html @@ -31,15 +31,15 @@ figure { </style> <script src="/static/jquery.tools.min.js"></script> <script> -function buildVideo(video_url, id, c) { - html = '<div class="embed-container">\n\t<video poster="" loop="true" preload="auto" id="'+id+'" class="vidauto'; +function buildVideo(video_mp4, video_webm, id, c, poster) { + html = '<div class="self-embed-container">\n\t<video poster="'+poster+'" controls="true" loop="false" preload="auto" id="'+id+'" class="vidauto'; if (c) { html += c+'"'; } else { html += '"'; } - html += '>\n\t\t<source src="'+video_url+'.webm" type="video/webm">\n'; - html += '\t\t<source src="'+video_url+'.mp4" type="video/mp4">\n'; + html += '>\n\t\t<source src="'+video_webm+'" type="video/webm">\n'; + html += '\t\t<source src="'+video_mp4+'" type="video/mp4">\n'; html += '\t\tYour browser does not support video playback via HTML5.\n\t</video>\n</div>'; return html; } @@ -70,7 +70,7 @@ $(function(){ $('.insert').click(function(){ if ($(this).attr('data-is-video')) { - var code = buildVideo($(this).attr('data-src'), $(this).attr('data-id'), $(this).attr('data-class')); + var code = buildVideo($(this).attr('data-video-mp4'), $(this).attr('data-video-webm'), $(this).attr('data-id'), $(this).attr('data-class'), $(this).attr('data-poster')); } else { var code = buildImage($(this).attr('data-src'), $(this).attr('data-id'), $(this).attr('data-class'), $(this).attr('data-caption')); } @@ -105,11 +105,11 @@ $(function(){ <div class="up-wrapper">{% for object in object_list %} <div class="item-wrapper"> <figure class="item" > - <img src="{% if object.get_type == "LuxImage" %}{% get_image_by_size object 'tn' %}{%else%}{{object.video_poster.url}}{%endif%}" /> + <img src="{% if object.get_type == "LuxImage" %}{% get_image_by_size object 'tn' %}{%else%}{{object.video_poster.url}}" style="max-width: 150px{%endif%}" /> <figcaption>{{object.id}} - {{object.title}} {% if object.caption %}– {{object.caption}}{%endif%}</figcaption> </figure> <ul class="actions">{%if object.get_type == "LuxVideo" %} - <li><a data-is-video="true" data-src="{{object.image.url}}" data-id="{{object.id}}" data-class="vid" class="insert" href="">Insert video</a>{%else%} + <li><a data-is-video="true" data-video-mp4="{{object.video_mp4.url}}" data-video-webm="{{object.video_webm.url}}" data-id="{{object.id}}" data-class="vid" data-poster="{{object.video_poster.url}}" class="insert" href="">Insert video</a>{%else%} <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picwide" class="insert" href="">full width</a></li> <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picfull" class="insert" href="">column width</a></li> <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picwide" data-caption="true" class="insert" href="">full width cap</a></li> |