Commit 6a9b1c18 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Ajout de quelques notifications informatives

parent 41afafb9
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
@@ -372,13 +372,6 @@ export default {

    askRemove() {
      this.deleteDialog = true
        // this.$jamaConfirm(
        //     this.$t('remove') + ' ?',
        //     (res) => {
        //       if (res)
        //         this.removeFromCollection()
        //     }
        // )
    },

    removeActionClicked(){
@@ -392,7 +385,8 @@ export default {
    remove() {
      this.$store.dispatch('deleteResource', this.resource.id).then(res => {
        if (res) {
          this.$emit('resource-removed', this.resource)
          this.$emit('resource-removed', this.resource);

        } else {
          this.$jamaAlert("Suppression impossible")
        }
@@ -451,7 +445,12 @@ export default {
          "Nom de la ressource",
          (val) => {
            this.$store.dispatch('renameResource',{resourceId: this.resource.id, name : val}).then(() => {
              this.$emit('resource-renamed', this.resource);
              EventBus.$emit('JAMA_NOTIFICATION', {
                type: 'info',
                timeout: 2000,
                message: "Ressource renommée",
                visible: true
              })
            })
          },
          this.resource.title
@@ -484,6 +483,12 @@ export default {
          from : replaceId,
          to : this.resource.id
        });
        EventBus.$emit('JAMA_NOTIFICATION', {
          type: 'info',
          timeout: 2000,
          message: "Ressource remplacée",
          visible: true
        })
        EventBus.$emit('goto-resource', this.currentCollection.id, replaceId);
      }
      else {
+7 −1
Original line number Diff line number Diff line
@@ -770,7 +770,13 @@ export default {


    resourceRemoved() {
      this.$store.commit('setCurrentResource', null)
      this.$store.commit('setCurrentResource', null);
      EventBus.$emit('JAMA_NOTIFICATION', {
        type: 'info',
        timeout: 2000,
        message: "Ressource supprimée",
        visible: true
      })
    },

    aboutResource(resource) {