diff options
author | luxagraf <sng@luxagraf.net> | 2018-10-24 15:53:37 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-10-24 15:53:37 +0000 |
commit | 55b73c69e7faf079642d323985dd48b577615dc6 (patch) | |
tree | 3f18e4d65a6db291451457e5be43288a4aeb7a71 /design/templates/admin/insert_images.html | |
parent | 9d88527a997ced7e01b67bcfee6ba10666f77deb (diff) |
fixed video inserts
Diffstat (limited to 'design/templates/admin/insert_images.html')
-rw-r--r-- | design/templates/admin/insert_images.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/design/templates/admin/insert_images.html b/design/templates/admin/insert_images.html index 57e8a36..fb079c6 100644 --- a/design/templates/admin/insert_images.html +++ b/design/templates/admin/insert_images.html @@ -31,6 +31,7 @@ figure { </style> <script> function buildVideo(video_mp4, video_webm, id, c, poster) { + console.log(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+'"'; @@ -74,7 +75,7 @@ function openInNewTab(url) { <figcaption>{{object.id}} {% if object.caption %}– {{object.caption}}{%endif%}</figcaption> </figure> <ul class="actions">{%if object.get_type == "LuxVideo" %} - <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-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}}" onclick="insertImage(this);return false;" 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" onclick="insertImage(this);return false;" href="#" >full width</a></li> <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picwide" data-caption="true" onclick="insertImage(this);return false;" href="#">full width cap</a></li> <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="cluster pic5" onclick="insertImage(this);return false;" href="#">cluster</a></li> @@ -91,7 +92,8 @@ function openInNewTab(url) { <script> function insertImage(item) { if (item.dataset.isVideo) { - var code = buildVideo(item.dataset.videoMp4, item.dataset.videoWebm, item.dataset.id, item.dataset.class, item.dataset.dataPoster); + console.log(item.dataset.poster); + var code = buildVideo(item.dataset.videoMp4, item.dataset.videoWebm, item.dataset.id, item.dataset.class, item.dataset.poster); } else { var code = buildImage(item.dataset.src, item.dataset.id, item.dataset.class, item.dataset.caption); } |