mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
tentative to add asyncupload into modal
This commit is contained in:
parent
154f976762
commit
5f71b46bb7
@ -16,8 +16,8 @@
|
|||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<select class="form-select" v-model="template">
|
<select class="form-select" v-model="template">
|
||||||
<option disabled selected value="">{{ $t('choose_a_template') }}</option>
|
<option disabled selected value="">{{ $t('choose_a_template') }}</option>
|
||||||
<template v-for="t in templates">
|
<template v-for="t in templates" :key="t.id">
|
||||||
<option v-bind:value="t.id">{{ t.name.fr || 'Aucun nom défini' }}</option>
|
<option :value="t.id" >{{ t.name.fr || 'Aucun nom défini' }}</option>
|
||||||
</template>
|
</template>
|
||||||
</select>
|
</select>
|
||||||
<a v-if="canGenerate" class="btn btn-update btn-sm change-icon" :href="buildUrlGenerate" @click.prevent="clickGenerate($event, buildUrlGenerate)"><i class="fa fa-fw fa-cog"></i></a>
|
<a v-if="canGenerate" class="btn btn-update btn-sm change-icon" :href="buildUrlGenerate" @click.prevent="clickGenerate($event, buildUrlGenerate)"><i class="fa fa-fw fa-cog"></i></a>
|
||||||
|
@ -37,7 +37,6 @@ var keyDefinition = {
|
|||||||
|
|
||||||
var searchForZones = function(root) {
|
var searchForZones = function(root) {
|
||||||
var zones = root.querySelectorAll('div[data-stored-object]');
|
var zones = root.querySelectorAll('div[data-stored-object]');
|
||||||
|
|
||||||
for(let i=0; i < zones.length; i++) {
|
for(let i=0; i < zones.length; i++) {
|
||||||
initialize(zones[i]);
|
initialize(zones[i]);
|
||||||
}
|
}
|
||||||
@ -370,3 +369,5 @@ window.addEventListener('load', function(e) {
|
|||||||
window.addEventListener('collection-add-entry', function(e) {
|
window.addEventListener('collection-add-entry', function(e) {
|
||||||
searchForZones(e.detail.entry);
|
searchForZones(e.detail.entry);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export { searchForZones };
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<a class="btn btn-create" :title="$t(buttonTitle)" @click="openModal">
|
<a class="btn btn-create" :title="$t(buttonTitle)" @click="openModal">
|
||||||
<span>{{ $t(buttonTitle) }}</span>
|
<span>{{ $t(buttonTitle) }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<teleport to="body">
|
<teleport to="body">
|
||||||
<div>
|
<div>
|
||||||
<modal v-if="modal.showModal"
|
<modal v-if="modal.showModal"
|
||||||
@ -14,7 +13,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
modal body
|
<div id="dropZoneWrapper">
|
||||||
|
<div
|
||||||
|
data-stored-object="data-stored-object"
|
||||||
|
data-label-preparing="Preparing"
|
||||||
|
data-label-quiet-button="Download existing file"
|
||||||
|
data-label-ready="Ready to show"
|
||||||
|
data-dict-file-too-big="File too big"
|
||||||
|
data-dict-default-message="Drop your file or click here"
|
||||||
|
data-dict-remove-file="Remove file in order to upload a new one"
|
||||||
|
data-dict-max-files-exceeded="Max files exceeded. Remove previous files"
|
||||||
|
data-dict-cancel-upload="Cancel upload"
|
||||||
|
data-dict-cancel-upload-confirm="Are you sure you want to cancel this upload ?"
|
||||||
|
data-dict-upload-canceled="Upload canceled"
|
||||||
|
data-dict-remove="Remove existing file"
|
||||||
|
data-allow-remove="true"
|
||||||
|
data-temp-url-generator="url">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
@ -28,6 +44,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
|
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
|
||||||
|
import { searchForZones } from '../../module/async_upload/uploader';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddAsyncUpload",
|
name: "AddAsyncUpload",
|
||||||
@ -45,14 +62,13 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
openModal() {
|
openModal() {
|
||||||
this.modal.showModal = true;
|
this.modal.showModal = true;
|
||||||
|
let dropZoneWrapper = document.getElementById('dropZoneWrapper');
|
||||||
|
console.log(dropZoneWrapper)
|
||||||
|
searchForZones(document); //TODO: only searchforzone in modal body
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<h5>{{ $t('Documents') }} :</h5>
|
<h5>{{ $t('Documents') }} :</h5>
|
||||||
|
|
||||||
<div class="flex-table">
|
<div class="flex-table">
|
||||||
<div class="item-bloc" v-for="d in evaluation.documents">
|
<div class="item-bloc" v-for="(d, i) in evaluation.documents" :key="i">
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col"><h6>{{ d.template.name.fr }}</h6></div>
|
<div class="item-col"><h6>{{ d.template.name.fr }}</h6></div>
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user