-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '4.0-dev' into cpanel-ajax
- Loading branch information
Showing
5 changed files
with
47 additions
and
48 deletions.
There are no files selected for viewing
78 changes: 39 additions & 39 deletions
78
...strator/components/com_media/resources/scripts/components/modals/confirm-delete-modal.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
<template> | ||
<media-modal v-if="$store.state.showConfirmDeleteModal" :size="'md'" @close="close()" :show-close="false"> | ||
<h3 slot="header" class="modal-title">{{ translate('COM_MEDIA_CONFIRM_DELETE_MODEL_HEADING') }}</h3> | ||
<div slot="body"> | ||
<div class="desc"> | ||
{{ translate('COM_MEDIA_CONFIRM_DELETE_MODEL_DESC') }} | ||
</div> | ||
</div> | ||
<div slot="footer"> | ||
<button id="media-delete-item" class="btn btn-danger" @click="deleteItem()">{{ translate('COM_MEDIA_CONFIRM_DELETE_MODEL') }}</button> | ||
<button class="btn btn-success" @click="close()">{{ translate('JCANCEL') }}</button> | ||
</div> | ||
</media-modal> | ||
</template> | ||
|
||
<script> | ||
import * as types from "./../../store/mutation-types"; | ||
export default { | ||
name: 'media-share-modal', | ||
computed: { | ||
item() { | ||
// TODO @DN this is not allowed in vuex strict mode! | ||
return this.$store.state.selectedItems[this.$store.state.selectedItems.length - 1]; | ||
} | ||
}, | ||
methods: { | ||
/* Delete Item */ | ||
deleteItem() { | ||
this.$store.dispatch('deleteSelectedItems'); | ||
this.$store.commit(types.HIDE_CONFIRM_DELETE_MODAL); | ||
}, | ||
/* Close the modal instance */ | ||
close() { | ||
this.$store.commit(types.HIDE_CONFIRM_DELETE_MODAL); | ||
}, | ||
} | ||
} | ||
</script> | ||
<template> | ||
<media-modal v-if="$store.state.showConfirmDeleteModal" :size="'md'" @close="close()" :show-close="false"> | ||
<h3 slot="header" class="modal-title">{{ translate('COM_MEDIA_CONFIRM_DELETE_MODAL_HEADING') }}</h3> | ||
<div slot="body"> | ||
<div class="desc"> | ||
{{ translate('JGLOBAL_CONFIRM_DELETE') }} | ||
</div> | ||
</div> | ||
<div slot="footer"> | ||
<button id="media-delete-item" class="btn btn-danger" @click="deleteItem()">{{ translate('COM_MEDIA_CONFIRM_DELETE_MODAL') }}</button> | ||
<button class="btn btn-success" @click="close()">{{ translate('JCANCEL') }}</button> | ||
</div> | ||
</media-modal> | ||
</template> | ||
|
||
<script> | ||
import * as types from "./../../store/mutation-types"; | ||
export default { | ||
name: 'media-share-modal', | ||
computed: { | ||
item() { | ||
// TODO @DN this is not allowed in vuex strict mode! | ||
return this.$store.state.selectedItems[this.$store.state.selectedItems.length - 1]; | ||
} | ||
}, | ||
methods: { | ||
/* Delete Item */ | ||
deleteItem() { | ||
this.$store.dispatch('deleteSelectedItems'); | ||
this.$store.commit(types.HIDE_CONFIRM_DELETE_MODAL); | ||
}, | ||
/* Close the modal instance */ | ||
close() { | ||
this.$store.commit(types.HIDE_CONFIRM_DELETE_MODAL); | ||
}, | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters