Skip to content

Commit

Permalink
Bugfix in video & audio block. Fixes #1292
Browse files Browse the repository at this point in the history
  • Loading branch information
tidyui committed Aug 11, 2020
1 parent 6d4b584 commit 83fccd6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
18 changes: 16 additions & 2 deletions core/Piranha.Manager/assets/dist/js/piranha.contentedit.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,14 @@ Vue.component("audio-block", {
update: function (media) {
if (media.type === "Audio") {
this.model.body.id = media.id;
this.model.body.media = media; // Tell parent that title has been updated
this.model.body.media = {
id: media.id,
folderId: media.folderId,
type: media.type,
filename: media.filename,
contentType: media.contentType,
publicUrl: media.publicUrl
}; // Tell parent that title has been updated

this.$emit('update-title', {
uid: this.uid,
Expand Down Expand Up @@ -817,7 +824,14 @@ Vue.component("video-block", {
update: function (media) {
if (media.type === "Video") {
this.model.body.id = media.id;
this.model.body.media = media; // Tell parent that title has been updated
this.model.body.media = {
id: media.id,
folderId: media.folderId,
type: media.type,
filename: media.filename,
contentType: media.contentType,
publicUrl: media.publicUrl
}; // Tell parent that title has been updated

this.$emit('update-title', {
uid: this.uid,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ export default {
update: function (media) {
if (media.type === "Audio") {
this.model.body.id = media.id;
this.model.body.media = media;
this.model.body.media = {
id: media.id,
folderId: media.folderId,
type: media.type,
filename: media.filename,
contentType: media.contentType,
publicUrl: media.publicUrl,
};
// Tell parent that title has been updated
this.$emit('update-title', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ export default {
update: function (media) {
if (media.type === "Video") {
this.model.body.id = media.id;
this.model.body.media = media;
this.model.body.media = {
id: media.id,
folderId: media.folderId,
type: media.type,
filename: media.filename,
contentType: media.contentType,
publicUrl: media.publicUrl,
};
// Tell parent that title has been updated
this.$emit('update-title', {
Expand Down

0 comments on commit 83fccd6

Please sign in to comment.