Skip to content

Commit

Permalink
Merge branch '4.0-dev' into cpanel-ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Mar 20, 2019
2 parents 297557e + 8b8a8c2 commit 021fbe5
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 48 deletions.
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>
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
Text::script('COM_MEDIA_ACTION_RENAME', true);
Text::script('COM_MEDIA_ACTION_SHARE', true);
Text::script('COM_MEDIA_BREADCRUMB_LABEL', true);
Text::script('COM_MEDIA_CONFIRM_DELETE_MODEL', true);
Text::script('COM_MEDIA_CONFIRM_DELETE_MODEL_DESC', true);
Text::script('COM_MEDIA_CONFIRM_DELETE_MODEL_HEADING', true);
Text::script('COM_MEDIA_CONFIRM_DELETE_MODAL', true);
Text::script('COM_MEDIA_CONFIRM_DELETE_MODAL_HEADING', true);
Text::script('COM_MEDIA_CREATE_NEW_FOLDER', true);
Text::script('COM_MEDIA_CREATE_NEW_FOLDER_ERROR', true);
Text::script('COM_MEDIA_CREATE_NEW_FOLDER_SUCCESS', true);
Expand Down Expand Up @@ -63,4 +62,5 @@
Text::script('JACTION_CREATE', true);
Text::script('JAPPLY', true);
Text::script('JCANCEL', true);
Text::script('JGLOBAL_CONFIRM_DELETE', true);
Text::script('JLIB_FORM_FIELD_REQUIRED_VALUE', true);
5 changes: 2 additions & 3 deletions administrator/language/en-GB/en-GB.com_media.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ COM_MEDIA_ACTION_RENAME="Rename item"
COM_MEDIA_ACTION_SHARE="Get a sharable link"
COM_MEDIA_BREADCRUMB_LABEL="Breadcrumb"
COM_MEDIA_CONFIGURATION="Media: Options"
COM_MEDIA_CONFIRM_DELETE_MODEL="Delete"
COM_MEDIA_CONFIRM_DELETE_MODEL_DESC="Are you sure you want to delete this item?"
COM_MEDIA_CONFIRM_DELETE_MODEL_HEADING="Confirm Delete"
COM_MEDIA_CONFIRM_DELETE_MODAL="Delete"
COM_MEDIA_CONFIRM_DELETE_MODAL_HEADING="Confirm Delete"
COM_MEDIA_CREATE_NEW_FOLDER="Create New Folder"
COM_MEDIA_CREATE_NEW_FOLDER_ERROR="Error creating folder."
COM_MEDIA_CREATE_NEW_FOLDER_SUCCESS="Folder created."
Expand Down
5 changes: 2 additions & 3 deletions language/en-GB/en-GB.com_media.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ COM_MEDIA_CAPTION_CLASS_DESC="This will apply the entered class to the '<figcapt
COM_MEDIA_CAPTION_CLASS_LABEL="Caption Class"
COM_MEDIA_CLEAR_LIST="Clear List"
COM_MEDIA_CONFIGURATION="Media: Options"
COM_MEDIA_CONFIRM_DELETE_MODEL="Delete"
COM_MEDIA_CONFIRM_DELETE_MODEL_DESC="Are you sure you want to delete this item?"
COM_MEDIA_CONFIRM_DELETE_MODEL_HEADING="Confirm Delete"
COM_MEDIA_CONFIRM_DELETE_MODAL="Delete"
COM_MEDIA_CONFIRM_DELETE_MODAL_HEADING="Confirm Delete"
COM_MEDIA_CREATE_FOLDER="Create Folder"
COM_MEDIA_CREATE_NEW_FOLDER="Create New Folder"
COM_MEDIA_CREATE_NEW_FOLDER_ERROR="Error creating folder."
Expand Down
1 change: 1 addition & 0 deletions language/en-GB/en-GB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ JFIELD_TITLE_DESC="Title for the article."

JGLOBAL_ADD_CUSTOM_CATEGORY="Add new Category"
JGLOBAL_ARTICLES="Articles"
JGLOBAL_CONFIRM_DELETE="Are you sure you want to delete? Confirming will permanently delete the selected item(s)!"
JGLOBAL_FIELDS="Fields"
JGLOBAL_AUTH_ACCESS_DENIED="Access Denied"
JGLOBAL_AUTH_ACCESS_GRANTED="Access Granted"
Expand Down

0 comments on commit 021fbe5

Please sign in to comment.