Loading src/components/JamaResource.vue +2 −23 Original line number Diff line number Diff line Loading @@ -138,15 +138,8 @@ <v-icon color="grey darken-1"> mdi-delete </v-icon> <!-- <span v-if="ancestors.length>1">{{ $t('remove_from_collection') }}</span>--> <span>{{ $t('remove') }}</span> </span> <!-- <v-tooltip left>--> <!-- <template v-slot:activator="{ on }">--> <!-- <v-icon x-small class="ml-5" color="black" dark v-on="on">mdi-help</v-icon>--> <!-- </template>--> <!-- <span v-html="$t('remove_help')"/>--> <!-- </v-tooltip>--> </v-list-item-title> </v-list-item> </v-list> Loading @@ -170,10 +163,6 @@ :resource="resource" /> <!-- <v-container v-if="resource.title!=resource.original_name"> <label class="text-h6 ml-1">Nom original</label><span class="ml-5">{{ resource.original_name }}</span> </v-container>--> <jama-tag-editor :item="resource" :concepts-config="conceptsConfig" Loading Loading @@ -445,12 +434,7 @@ export default { "Nom de la ressource", (val) => { this.$store.dispatch('renameResource',{resourceId: this.resource.id, name : val}).then(() => { EventBus.$emit('JAMA_NOTIFICATION', { type: 'info', timeout: 2000, message: "Ressource renommée", visible: true }) this.$alertInfo("Ressource renommée"); }) }, this.resource.title Loading Loading @@ -483,12 +467,7 @@ export default { from : replaceId, to : this.resource.id }); EventBus.$emit('JAMA_NOTIFICATION', { type: 'info', timeout: 2000, message: "Ressource remplacée", visible: true }) this.$alertInfo("Ressource remplacée"); EventBus.$emit('goto-resource', this.currentCollection.id, replaceId); } else { Loading src/components/JamaTrash.vue +5 −6 Original line number Diff line number Diff line Loading @@ -152,12 +152,11 @@ export default { this.items.splice(this.items.indexOf(this.restoringItem),1); EventBus.$emit('reload-current-collection'); } EventBus.$emit('JAMA_NOTIFICATION', { type: res ? 'success' : 'error', timeout: 2000, message: res ? this.$t('restore_success') : this.$t('restore_fail') , visible: true }) if(res) this.$alertInfo(this.$t('restore_success')); else this.$alertError(this.$t('restore_fail')); this.restoringItem = null; this.restoringDest = null; } Loading src/components/JamaUploadView.vue +27 −21 Original line number Diff line number Diff line Loading @@ -50,7 +50,11 @@ v-for="(upload, hash) in uncompletedUploads" :key="'uncomplete-'+hash" > <v-row> <v-col cols="6"> {{ upload.name }} : {{ Math.min(Math.round(Number(upload.available_chunks.length)/Number(upload.nb_chunks) * 100),100) }}% </v-col> <v-col cols="6"> <v-btn small class="ml-5" Loading @@ -64,6 +68,8 @@ style="display: none" @change="resume('resume-input-'+hash, upload)" > </v-col> </v-row> </v-list-item> </v-list> </div> Loading @@ -75,7 +81,6 @@ import {upload_events} from '../utils/JamaClient'; const JAMA_LSTORAGE_INCOMPLETED_KEY = 'jama_uncompleted_upload'; import EventBus from '../events/event-bus'; import {mapGetters} from "vuex"; export default { Loading Loading @@ -153,12 +158,12 @@ export default { endFileUploadEvent(e) { this.done ++; EventBus.$emit('JAMA_NOTIFICATION', { type: e.detail.ok ? 'success' : 'error', timeout: 2000, message: e.detail.message, visible: true }) if(e.detail.ok){ this.$alertInfo(e.detail.message); } else { this.$alertError(e.detail.message); } if(e.detail.status === 'available') { delete this.uncompletedUploads[e.detail.hash]; localStorage.setItem(JAMA_LSTORAGE_INCOMPLETED_KEY, JSON.stringify(this.uncompletedUploads)); Loading Loading @@ -203,6 +208,7 @@ export default { localStorage.setItem(JAMA_LSTORAGE_INCOMPLETED_KEY, JSON.stringify(this.uncompletedUploads)); this.$forceUpdate(); } } } } Loading src/components/VueJama.vue +3 −1 Original line number Diff line number Diff line Loading @@ -430,6 +430,8 @@ export default { this.$store.commit('setCurrentProjectId', this.options.defaultProjectId || null); this.$store.commit('setAppTitle', this.options.appTitle || this.$t('jama_title') + 'JAMA',); Vue.prototype.$jamaClient = jamaClient; Vue.prototype.$alertInfo = this.alertInfo; Vue.prototype.$alertError = this.alertError; return { permissionsReady: false, //overridable by config (options property) Loading Loading @@ -591,7 +593,7 @@ export default { this.fetchUserPermissions().then(() => this.initJamaPermissions()) } else{ alert('Une erreur est survenue. Service indisponible.') alert('Une erreur est survenue. Service indisponible.'); } }) if (!this.currentProjectId) { Loading Loading
src/components/JamaResource.vue +2 −23 Original line number Diff line number Diff line Loading @@ -138,15 +138,8 @@ <v-icon color="grey darken-1"> mdi-delete </v-icon> <!-- <span v-if="ancestors.length>1">{{ $t('remove_from_collection') }}</span>--> <span>{{ $t('remove') }}</span> </span> <!-- <v-tooltip left>--> <!-- <template v-slot:activator="{ on }">--> <!-- <v-icon x-small class="ml-5" color="black" dark v-on="on">mdi-help</v-icon>--> <!-- </template>--> <!-- <span v-html="$t('remove_help')"/>--> <!-- </v-tooltip>--> </v-list-item-title> </v-list-item> </v-list> Loading @@ -170,10 +163,6 @@ :resource="resource" /> <!-- <v-container v-if="resource.title!=resource.original_name"> <label class="text-h6 ml-1">Nom original</label><span class="ml-5">{{ resource.original_name }}</span> </v-container>--> <jama-tag-editor :item="resource" :concepts-config="conceptsConfig" Loading Loading @@ -445,12 +434,7 @@ export default { "Nom de la ressource", (val) => { this.$store.dispatch('renameResource',{resourceId: this.resource.id, name : val}).then(() => { EventBus.$emit('JAMA_NOTIFICATION', { type: 'info', timeout: 2000, message: "Ressource renommée", visible: true }) this.$alertInfo("Ressource renommée"); }) }, this.resource.title Loading Loading @@ -483,12 +467,7 @@ export default { from : replaceId, to : this.resource.id }); EventBus.$emit('JAMA_NOTIFICATION', { type: 'info', timeout: 2000, message: "Ressource remplacée", visible: true }) this.$alertInfo("Ressource remplacée"); EventBus.$emit('goto-resource', this.currentCollection.id, replaceId); } else { Loading
src/components/JamaTrash.vue +5 −6 Original line number Diff line number Diff line Loading @@ -152,12 +152,11 @@ export default { this.items.splice(this.items.indexOf(this.restoringItem),1); EventBus.$emit('reload-current-collection'); } EventBus.$emit('JAMA_NOTIFICATION', { type: res ? 'success' : 'error', timeout: 2000, message: res ? this.$t('restore_success') : this.$t('restore_fail') , visible: true }) if(res) this.$alertInfo(this.$t('restore_success')); else this.$alertError(this.$t('restore_fail')); this.restoringItem = null; this.restoringDest = null; } Loading
src/components/JamaUploadView.vue +27 −21 Original line number Diff line number Diff line Loading @@ -50,7 +50,11 @@ v-for="(upload, hash) in uncompletedUploads" :key="'uncomplete-'+hash" > <v-row> <v-col cols="6"> {{ upload.name }} : {{ Math.min(Math.round(Number(upload.available_chunks.length)/Number(upload.nb_chunks) * 100),100) }}% </v-col> <v-col cols="6"> <v-btn small class="ml-5" Loading @@ -64,6 +68,8 @@ style="display: none" @change="resume('resume-input-'+hash, upload)" > </v-col> </v-row> </v-list-item> </v-list> </div> Loading @@ -75,7 +81,6 @@ import {upload_events} from '../utils/JamaClient'; const JAMA_LSTORAGE_INCOMPLETED_KEY = 'jama_uncompleted_upload'; import EventBus from '../events/event-bus'; import {mapGetters} from "vuex"; export default { Loading Loading @@ -153,12 +158,12 @@ export default { endFileUploadEvent(e) { this.done ++; EventBus.$emit('JAMA_NOTIFICATION', { type: e.detail.ok ? 'success' : 'error', timeout: 2000, message: e.detail.message, visible: true }) if(e.detail.ok){ this.$alertInfo(e.detail.message); } else { this.$alertError(e.detail.message); } if(e.detail.status === 'available') { delete this.uncompletedUploads[e.detail.hash]; localStorage.setItem(JAMA_LSTORAGE_INCOMPLETED_KEY, JSON.stringify(this.uncompletedUploads)); Loading Loading @@ -203,6 +208,7 @@ export default { localStorage.setItem(JAMA_LSTORAGE_INCOMPLETED_KEY, JSON.stringify(this.uncompletedUploads)); this.$forceUpdate(); } } } } Loading
src/components/VueJama.vue +3 −1 Original line number Diff line number Diff line Loading @@ -430,6 +430,8 @@ export default { this.$store.commit('setCurrentProjectId', this.options.defaultProjectId || null); this.$store.commit('setAppTitle', this.options.appTitle || this.$t('jama_title') + 'JAMA',); Vue.prototype.$jamaClient = jamaClient; Vue.prototype.$alertInfo = this.alertInfo; Vue.prototype.$alertError = this.alertError; return { permissionsReady: false, //overridable by config (options property) Loading Loading @@ -591,7 +593,7 @@ export default { this.fetchUserPermissions().then(() => this.initJamaPermissions()) } else{ alert('Une erreur est survenue. Service indisponible.') alert('Une erreur est survenue. Service indisponible.'); } }) if (!this.currentProjectId) { Loading