diff --git a/src/api/gql/entite.fragment.gql b/src/api/gql/entite.fragment.gql index 73bec60..56a8e64 100644 --- a/src/api/gql/entite.fragment.gql +++ b/src/api/gql/entite.fragment.gql @@ -14,6 +14,7 @@ fragment EntiteFields on Entite { } sources { id + uuid description images { alt diff --git a/src/assets/main.scss b/src/assets/main.scss index 764e3eb..f50463e 100644 --- a/src/assets/main.scss +++ b/src/assets/main.scss @@ -397,7 +397,7 @@ body{ >section{ padding-bottom: 2em; } - >section.image{ + // >section.image{ figure{ // border: #333 1px solid; position: relative; @@ -421,11 +421,14 @@ body{ opacity: 1; } } - } + // } .sources{ // padding-top: 1em; .source{ padding-top: 0.5em; + >section{ + padding-bottom: 0.5em; + } // div.date{ // display: block; // font-weight: 100; @@ -436,11 +439,20 @@ body{ >div{ // @include font_reponses(); font-size: inherit; - padding-bottom: 1em; + // padding-bottom: 1em; } } - .liens{ + section.audio{ + padding:1em 0; + label{ + padding: 0; + } + div.plyr__controls{ + padding:0; + } + } + section.liens{ a{ text-decoration: underline; @include font_reponses(); @@ -1056,10 +1068,11 @@ body{ } } -div.editable-image{ +div.editable-image, +div.editable-video{ background: #eee; max-width: 100%; - div.btn{ + div.file-btn{ border: #eee 2px solid; border-radius: 5px; margin: 1em 0 0; @@ -1083,6 +1096,14 @@ div.editable-image{ } } + div.video-btn{ + cursor: pointer; + } + div.editable-wrapper{ + padding:0.3em 0.5em; + margin:0.5em 0; + } + div.delete-btn{ cursor: pointer; } diff --git a/src/components/contents/Entite.vue b/src/components/contents/Entite.vue index 079dc96..d53a61c 100644 --- a/src/components/contents/Entite.vue +++ b/src/components/contents/Entite.vue @@ -52,11 +52,11 @@ export default {
@@ -61,33 +66,41 @@ export default { v-on:updated="reloadEntite" />
+
-
-
- -
{{ image.alt }}
-
-
+
+
- -
- - -
-
+ class="video"> +
- + diff --git a/src/components/contents/TerrainDeVie.vue b/src/components/contents/TerrainDeVie.vue index b6f5dd4..5afadc6 100644 --- a/src/components/contents/TerrainDeVie.vue +++ b/src/components/contents/TerrainDeVie.vue @@ -202,9 +202,9 @@ export default { }) }, onMainScrolled(scrolled){ - console.log('this.$refs', this.$refs); + // console.log('this.$refs', this.$refs); let cartouche_main = this.$refs.cartouche_layout.$refs.cartouche_main; - console.log('cartouche_main', cartouche_main); + // console.log('cartouche_main', cartouche_main); if(scrolled && cartouche_main.scrollHeight > 600){ this.headerreduced = true; } else { diff --git a/src/components/editable/ContentEditable.vue b/src/components/editable/ContentEditable.vue index 041daf7..6eb950d 100644 --- a/src/components/editable/ContentEditable.vue +++ b/src/components/editable/ContentEditable.vue @@ -39,12 +39,14 @@ export default { console.log('ContentEditable created'); }, mounted () { - this.editor = new MediumEditor(this.$refs.html_editable, { - toolbar: { - allowMultiParagraphSelection: false, - buttons: ['anchor'], - } - }); + if (this.contenteditable && this.html) { + this.editor = new MediumEditor(this.$refs.html_editable, { + toolbar: { + allowMultiParagraphSelection: false, + buttons: ['anchor'], + } + }); + } }, beforeUnmount() { }, @@ -91,7 +93,7 @@ export default { this.$emit('updated'); }) .catch(error => { - console.warn(`Issue with patch node ${this.data.bundle}`, error) + console.warn(`Issue with patch ${this.data.entitytype} ${this.data.bundle}`, error) Promise.reject(error) }) } @@ -106,7 +108,7 @@ export default { v-if="!html" :is="tag" :contenteditable="contenteditable" - :spellcheck="speelcheck" + :spellcheck="spellcheck" @focusout="onContentEditableFocusOut" >{{ value }} \ No newline at end of file diff --git a/src/components/editable/ImageEditable.vue b/src/components/editable/ImageEditable.vue index 2ca7ddd..ae431f8 100644 --- a/src/components/editable/ImageEditable.vue +++ b/src/components/editable/ImageEditable.vue @@ -71,13 +71,21 @@ export default { const params = { type: this.data.bundle, - nid: [{"value":this.data.nid}], + // nid: [{"value":this.data.id}], [this.data.field]: {value: null} }; + if (this.data.entitytype === 'node') { + params.nid = [{"value":this.data.id}]; + } else { + params.id = [{"value":this.data.id}]; + } + const configs = { headers: {'X-CSRF-Token': this.csrf_token} }; - REST.patch(`/node/${this.data.nid}?_format=json`, params, configs) + + let url_base = `/${this.data.entitytype === 'node' ? '' : 'entity/'}${this.data.entitytype}`; + REST.patch(`${url_base}/${this.data.id}?_format=json`, params, configs) .then(({ data }) => { console.log(`user REST patch node ${this.data.bundle} ${this.data.field}`, data) // TODO if success update the data in pinia @@ -122,24 +130,24 @@ export default {