Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] Corrected different multi-select behavior in media manager. #39824

Open
wants to merge 25 commits into
base: 5.1-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3af0f02
multiselect
rajputanuj31 Feb 8, 2023
6d6bac9
Merge branch 'joomla:4.2-dev' into multi-select
rajputanuj31 Feb 8, 2023
96f16ac
Revert "Improving the consistency of the HTML models (#39715)"
rajputanuj31 Feb 8, 2023
981522f
updates
rajputanuj31 Feb 8, 2023
869b168
updates
rajputanuj31 Feb 8, 2023
a901214
updates
rajputanuj31 Feb 9, 2023
52e7d7d
updates
rajputanuj31 Feb 9, 2023
cabe3cc
comments updated
rajputanuj31 Feb 10, 2023
e4a509f
fixed a typo in comments
rajputanuj31 Feb 10, 2023
005b0d6
updates
rajputanuj31 Feb 10, 2023
831630a
updates
rajputanuj31 Feb 10, 2023
adbc92c
updates
rajputanuj31 Feb 10, 2023
da552d8
updates
rajputanuj31 Feb 10, 2023
30dd2da
ci-error
rajputanuj31 Feb 10, 2023
1e6ee56
updates
rajputanuj31 Feb 10, 2023
7616a50
Update administrator/components/com_media/resources/scripts/component…
rajputanuj31 Feb 10, 2023
e4dfbca
Update administrator/components/com_media/resources/scripts/component…
rajputanuj31 Feb 10, 2023
15a31ad
Merge branch '4.3-dev' into multi-select
rajputanuj31 Feb 11, 2023
a6340d8
Merge branch '4.3-dev' into multi-select
Quy Feb 16, 2023
61f4441
Update utils.es6.js
rajputanuj31 Feb 17, 2023
dff326b
Update utils.es6.js
rajputanuj31 Feb 17, 2023
9dfae97
Update administrator/components/com_media/resources/scripts/component…
rajputanuj31 Feb 17, 2023
7f3ca0d
Merge branch '4.3-dev' into multi-select
rajputanuj31 Feb 17, 2023
092b9de
Merge branch '4.3-dev' into multi-select
rajputanuj31 Mar 9, 2023
f971327
Merge branch '4.3-dev' into multi-select
rajputanuj31 Mar 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,16 @@ export default {
}

// Handle clicks when the item was not selected
const startindex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.$store.state.selectedItems[0]);
const endindex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.item);
if (!this.isSelected()) {
if ((event.shiftKey || event.keyCode === 13)) {
rajputanuj31 marked this conversation as resolved.
Show resolved Hide resolved
rajputanuj31 marked this conversation as resolved.
Show resolved Hide resolved
if (startindex < endindex) {
for (let i = startindex; i <= endindex; i += 1) {
this.$store.commit(types.SELECT_BROWSER_ITEM, this.$store.getters.getSelectedDirectoryContents[i]);
}
const currentIndex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.$store.state.selectedItems[0]);
const endindex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.item);
if (currentIndex < endindex) {
this.$store.getters.getSelectedDirectoryContents.slice(currentIndex, endindex + 1)
.forEach((element) => this.$store.commit(types.SELECT_BROWSER_ITEM, element));
} else {
for (let i = startindex; i >= endindex; i -= 1) {
this.$store.commit(types.SELECT_BROWSER_ITEM, this.$store.getters.getSelectedDirectoryContents[i]);
}
this.$store.getters.getSelectedDirectoryContents.slice(endindex, currentIndex)
.forEach((element) => this.$store.commit(types.SELECT_BROWSER_ITEM, element));
}
} else if ((event.ctrlKey || event.keyCode === 17)) {
rajputanuj31 marked this conversation as resolved.
Show resolved Hide resolved
this.$store.commit(types.SELECT_BROWSER_ITEM, this.item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,16 @@ export default {
}

// Handle clicks when the item was not selected
const startindex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.$store.state.selectedItems[0]);
const endindex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.item);
if (!this.isSelected()) {
if ((event.shiftKey || event.keyCode === 13)) {
if (startindex < endindex) {
for (let i = startindex; i <= endindex; i += 1) {
this.$store.commit(types.SELECT_BROWSER_ITEM, this.$store.getters.getSelectedDirectoryContents[i]);
}
const currentIndex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.$store.state.selectedItems[0]);
const endindex = this.$store.getters.getSelectedDirectoryContents.indexOf(this.item);
if (currentIndex < endindex) {
this.$store.getters.getSelectedDirectoryContents.slice(currentIndex, endindex + 1)
.forEach((element) => this.$store.commit(types.SELECT_BROWSER_ITEM, element));
} else {
for (let i = startindex; i >= endindex; i -= 1) {
this.$store.commit(types.SELECT_BROWSER_ITEM, this.$store.getters.getSelectedDirectoryContents[i]);
}
this.$store.getters.getSelectedDirectoryContents.slice(endindex, currentIndex)
.forEach((element) => this.$store.commit(types.SELECT_BROWSER_ITEM, element));
}
} else if ((event.ctrlKey || event.keyCode === 17)) {
this.$store.commit(types.SELECT_BROWSER_ITEM, this.item);
Expand Down