+
{{ asset.asset_name }}
({{ asset.nb_occurences }})
diff --git a/src/components/pages/breakdown/AssetBlock.vue b/src/components/pages/breakdown/AssetBlock.vue
index 09731e4305..3e8156c4c7 100644
--- a/src/components/pages/breakdown/AssetBlock.vue
+++ b/src/components/pages/breakdown/AssetBlock.vue
@@ -279,4 +279,8 @@ export default {
.modify-asset {
min-width: 20px;
}
+
+.asset-text-name {
+ word-wrap: anywhere;
+}
diff --git a/src/components/pages/playlists/PlaylistPlayer.vue b/src/components/pages/playlists/PlaylistPlayer.vue
index bc3c5e0a7f..79c945b663 100644
--- a/src/components/pages/playlists/PlaylistPlayer.vue
+++ b/src/components/pages/playlists/PlaylistPlayer.vue
@@ -798,6 +798,7 @@
@play-click="entityListClicked"
@remove-entity="removeEntity"
@preview-changed="onPreviewChanged"
+ @entity-to-add="$emit('entity-to-add', $event)"
@entity-dropped="onEntityDropped"
/>
@@ -1350,19 +1351,30 @@ export default {
this.updateTaskPanel()
},
+ /*
+ * Called when an entity is dropped in the playlist. The entity is moved
+ * to the new position and the order of the entities is updated.
+ * @param {Object} info - {
+ * before: where entity is dropped (id of the entity before),
+ * after: the id of the entity dropped.
+ * }
+ */
onEntityDropped(info) {
const playlistEl = this.$refs['playlisted-entities']
const scrollLeft = playlistEl.scrollLeft
-
const entityToMove = this.entityList.find(s => s.id === info.after)
- const toMoveIndex = this.entityList.findIndex(s => s.id === info.after)
- let targetIndex = this.entityList.findIndex(s => s.id === info.before)
- if (toMoveIndex > targetIndex) targetIndex += 1
- this.moveSelectedEntity(entityToMove, toMoveIndex, targetIndex)
- this.$nextTick(() => {
- playlistEl.scrollLeft = scrollLeft
- })
- this.$emit('order-change', info)
+ if (!entityToMove) {
+ this.$emit('new-entity-dropped', info)
+ } else {
+ const toMoveIndex = this.entityList.findIndex(s => s.id === info.after)
+ let targetIndex = this.entityList.findIndex(s => s.id === info.before)
+ if (toMoveIndex > targetIndex) targetIndex += 1
+ this.moveSelectedEntity(entityToMove, toMoveIndex, targetIndex)
+ this.$nextTick(() => {
+ playlistEl.scrollLeft = scrollLeft
+ })
+ this.$emit('order-change', info)
+ }
},
moveSelectedEntityToLeft() {
diff --git a/src/components/widgets/AddComment.vue b/src/components/widgets/AddComment.vue
index d29f8fee0f..33dfb37ecb 100644
--- a/src/components/widgets/AddComment.vue
+++ b/src/components/widgets/AddComment.vue
@@ -108,7 +108,7 @@