Skip to content

Commit

Permalink
Add Video Preview Image to Replicator Preview Text
Browse files Browse the repository at this point in the history
  • Loading branch information
jcohlmeyer authored and JRC9 Devs committed Mar 31, 2018
1 parent f1ec309 commit a048248
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion resources/assets/js/fieldtype.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? '<img src="' + this.data.thumbnail_small + '" width="auto" height="20" title="' + this.title + '" />' : '';
},
},

methods: {
getReplicatorPreviewText: function() {
return this.title;
return this.previewImage + ' ' + this.title;
},
focus: function() {
this.$els.videoUrlField.focus();
Expand Down

0 comments on commit a048248

Please sign in to comment.