From a04824898126a51d22875d94bbd6f2971da94e3e Mon Sep 17 00:00:00 2001 From: Jonathan Cohlmeyer Date: Sat, 31 Mar 2018 17:25:10 +0000 Subject: [PATCH] Add Video Preview Image to Replicator Preview Text --- meta.yaml | 2 +- readme.md | 3 ++- resources/assets/js/fieldtype.js | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meta.yaml b/meta.yaml index 08215c6..69c687d 100755 --- a/meta.yaml +++ b/meta.yaml @@ -1,5 +1,5 @@ name: VideoEmbed -version: 2.2.3 +version: 2.2.4 description: A field type for embedding YouTube and Vimeo Videos url: https://github.com/jrc9designstudio/statamic-video-embed developer: JRC9 Design Studio diff --git a/readme.md b/readme.md index 509f57a..87559c7 100755 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Video Embed for Statamic 2 *Requirement:* Statamic v2.6.x, curl -*Version:* 2.2.3 +*Version:* 2.2.4 ### What is this? Add YouTube and Vimeo videos to Statamic with a Video Embed field. @@ -120,6 +120,7 @@ If you really want a simple tag that does it all for you, you can create your ow - `portrait_cinema` 9:21 ### Version Log +- 2.2.4 Add Video Preview Image to Replicator Preview Text - 2.2.3 Auto Focus & Change Watcher Fix - 2.2.2 Add Replicator Preview Text - 2.2.1 Fix for Statamic 2.6 diff --git a/resources/assets/js/fieldtype.js b/resources/assets/js/fieldtype.js index 6d2b96f..9bb9baf 100755 --- a/resources/assets/js/fieldtype.js +++ b/resources/assets/js/fieldtype.js @@ -106,11 +106,14 @@ Vue.component('video_embed-fieldtype', { // Return the current description (striping html) for vue preview. return this.data.description.replace(/<\/?[^>]+(>|$)/g, ""); }, + previewImage: function() { + return this.data.thumbnail_small ? '' : ''; + }, }, methods: { getReplicatorPreviewText: function() { - return this.title; + return this.previewImage + ' ' + this.title; }, focus: function() { this.$els.videoUrlField.focus();