Skip to content

Commit 84a6d92

Browse files
authored
Merge branch '4.3-dev' into pr-36552-clone
2 parents 3066a1f + 7ec6806 commit 84a6d92

File tree

100 files changed

+1154
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1154
-580
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@ Pull Request for Issue # .
1616

1717

1818

19-
### Documentation Changes Required
19+
### Link to documentations
20+
Please select:
21+
- [ ] Documentation link for docs.joomla.org: <link>
22+
- [ ] No documentation changes for docs.joomla.org needed
2023

24+
- [ ] Pull Request link for manual.joomla.org: <link>
25+
- [ ] No documentation changes for manual.joomla.org needed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Update the com_templates options to add the diff options
2+
UPDATE `#__extensions` SET `params` = REPLACE(`params`, '}', ',"difference":"SideBySide"}') WHERE `name` = 'com_templates';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Update the com_templates options to add the diff options
2+
UPDATE "#__extensions" SET "params" = REPLACE("params", '}', ',"difference":"SideBySide"}') WHERE "name" = 'com_templates';

administrator/components/com_contact/src/Table/ContactTable.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,13 @@ public function store($updateNulls = true)
119119
$table = Table::getInstance('ContactTable', __NAMESPACE__ . '\\', array('dbo' => $this->getDbo()));
120120

121121
if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0)) {
122+
// Is the existing contact trashed?
122123
$this->setError(Text::_('COM_CONTACT_ERROR_UNIQUE_ALIAS'));
123124

125+
if ($table->published === -2) {
126+
$this->setError(Text::_('COM_CONTACT_ERROR_UNIQUE_ALIAS_TRASHED'));
127+
}
128+
124129
return false;
125130
}
126131

administrator/components/com_finder/src/Controller/DisplayController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function display($cachable = false, $urlparams = array())
7171
if ($view === 'filter' && $layout === 'edit' && !$this->checkEditId('com_finder.edit.filter', $filterId)) {
7272
// Somehow the person just went to the form - we don't allow that.
7373
if (!\count($this->app->getMessageQueue())) {
74-
$this->setMessage(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $f_id), 'error');
74+
$this->setMessage(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $filterId), 'error');
7575
}
7676

7777
$this->setRedirect(Route::_('index.php?option=com_finder&view=filters', false));

administrator/components/com_finder/src/Table/FilterTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function store($updateNulls = true)
157157
$table = new static($this->getDbo());
158158

159159
if ($table->load(array('alias' => $this->alias)) && ($table->filter_id != $this->filter_id || $this->filter_id == 0)) {
160-
$this->setError(Text::_('JLIB_DATABASE_ERROR_ARTICLE_UNIQUE_ALIAS'));
160+
$this->setError(Text::_('COM_FINDER_FILTER_ERROR_UNIQUE_ALIAS'));
161161

162162
return false;
163163
}

administrator/components/com_media/resources/scripts/components/browser/actionItems/actionItemsContainer.vue

Lines changed: 189 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -17,107 +17,129 @@
1717
@on-focused="focused"
1818
@keyup.up="openLastActions()"
1919
@keyup.down="openActions()"
20+
@keyup.end="openLastActions()"
21+
@keyup.home="openActions()"
22+
@keydown.up.prevent
23+
@keydown.down.prevent
24+
@keydown.home.prevent
25+
@keydown.end.prevent
2026
/>
2127
<div
2228
v-if="showActions"
29+
ref="actionList"
2330
class="media-browser-actions-list"
31+
role="toolbar"
32+
aria-orientation="vertical"
33+
:aria-label="sprintf('COM_MEDIA_ACTIONS_TOOLBAR_LABEL',(this.$parent.$props.item.name))"
2434
>
25-
<ul>
26-
<li>
27-
<media-browser-action-item-preview
28-
v-if="previewable"
29-
ref="actionPreview"
30-
:on-focused="focused"
31-
:main-action="openPreview"
32-
:closing-action="hideActions"
33-
@keyup.up="$refs.actionDelete.$el.focus()"
34-
@keyup.down="$refs.actionDelete.$el.previousElementSibling.focus()"
35-
@keyup.esc="hideActions"
36-
/>
37-
</li>
38-
<li>
39-
<media-browser-action-item-download
40-
v-if="downloadable"
41-
ref="actionDownload"
42-
:on-focused="focused"
43-
:main-action="download"
44-
:closing-action="hideActions"
45-
@keyup.up="$refs.actionPreview.$el.focus()"
46-
@keyup.down="$refs.actionPreview.$el.previousElementSibling.focus()"
47-
@keyup.esc="hideActions"
48-
/>
49-
</li>
50-
<li>
51-
<media-browser-action-item-rename
52-
v-if="canEdit"
53-
ref="actionRename"
54-
:on-focused="focused"
55-
:main-action="openRenameModal"
56-
:closing-action="hideActions"
57-
@keyup.up="
58-
downloadable
59-
? $refs.actionDownload.$el.focus()
60-
: $refs.actionDownload.$el.previousElementSibling.focus()
61-
"
62-
@keyup.down="
63-
canEdit
64-
? $refs.actionEdit.$el.focus()
65-
: shareable
66-
? $refs.actionShare.$el.focus()
67-
: $refs.actionShare.$el.previousElementSibling.focus()
68-
"
69-
@keyup.esc="hideActions"
70-
/>
71-
</li>
72-
<li>
73-
<media-browser-action-item-edit
74-
v-if="canEdit && canOpenEditView"
75-
ref="actionEdit"
76-
:on-focused="focused"
77-
:main-action="editItem"
78-
:closing-action="hideActions"
79-
@keyup.up="$refs.actionRename.$el.focus()"
80-
@keyup.down="$refs.actionRename.$el.previousElementSibling.focus()"
81-
@keyup.esc="hideActions"
82-
/>
83-
</li>
84-
<li>
85-
<media-browser-action-item-share
86-
v-if="shareable"
87-
ref="actionShare"
88-
:on-focused="focused"
89-
:main-action="openShareUrlModal"
90-
:closing-action="hideActions"
91-
@keyup.up="
92-
canEdit
93-
? $refs.actionEdit.$el.focus()
94-
: $refs.actionEdit.$el.previousElementSibling.focus()
95-
"
96-
@keyup.down="$refs.actionDelete.$el.focus()"
97-
@keyup.esc="hideActions"
98-
/>
99-
</li>
100-
<li>
101-
<media-browser-action-item-delete
102-
v-if="canDelete"
103-
ref="actionDelete"
104-
:on-focused="focused"
105-
:main-action="openConfirmDeleteModal"
106-
:hide-actions="hideActions"
107-
@keyup.up="
108-
shareable
109-
? $refs.actionShare.$el.focus()
110-
: $refs.actionShare.$el.previousElementSibling.focus()
111-
"
112-
@keyup.down="
113-
previewable
114-
? $refs.actionPreview.$el.focus()
115-
: $refs.actionPreview.$el.previousElementSibling.focus()
116-
"
117-
@keyup.esc="hideActions"
118-
/>
119-
</li>
120-
</ul>
35+
<span
36+
aria-hidden="true"
37+
class="media-browser-actions-item-name"
38+
>
39+
<strong>{{ this.$parent.$props.item.name }}</strong>
40+
</span>
41+
<media-browser-action-item-preview
42+
v-if="previewable"
43+
ref="actionPreview"
44+
:on-focused="focused"
45+
:main-action="openPreview"
46+
:closing-action="hideActions"
47+
@keydown.up.prevent
48+
@keydown.down.prevent
49+
@keyup.up="focusPrev"
50+
@keyup.down="focusNext"
51+
@keyup.end="focusLast"
52+
@keyup.home="focusFirst"
53+
@keydown.home.prevent
54+
@keydown.end.prevent
55+
@keyup.esc="hideActions"
56+
@keydown.tab="hideActions"
57+
/>
58+
<media-browser-action-item-download
59+
v-if="downloadable"
60+
ref="actionDownload"
61+
:on-focused="focused"
62+
:main-action="download"
63+
:closing-action="hideActions"
64+
@keydown.up.prevent
65+
@keydown.down.prevent
66+
@keyup.up="focusPrev"
67+
@keyup.down="focusNext"
68+
@keyup.esc="hideActions"
69+
@keydown.tab="hideActions"
70+
@keyup.end="focusLast"
71+
@keyup.home="focusFirst"
72+
@keydown.home.prevent
73+
@keydown.end.prevent
74+
/>
75+
<media-browser-action-item-rename
76+
v-if="canEdit"
77+
ref="actionRename"
78+
:on-focused="focused"
79+
:main-action="openRenameModal"
80+
:closing-action="hideActions"
81+
@keydown.up.prevent
82+
@keydown.down.prevent
83+
@keyup.up="focusPrev"
84+
@keyup.down="focusNext"
85+
@keyup.esc="hideActions"
86+
@keydown.tab="hideActions"
87+
@keyup.end="focusLast"
88+
@keyup.home="focusFirst"
89+
@keydown.home.prevent
90+
@keydown.end.prevent
91+
/>
92+
<media-browser-action-item-edit
93+
v-if="canEdit && canOpenEditView"
94+
ref="actionEdit"
95+
:on-focused="focused"
96+
:main-action="editItem"
97+
:closing-action="hideActions"
98+
@keydown.up.prevent
99+
@keydown.down.prevent
100+
@keyup.up="focusPrev"
101+
@keyup.down="focusNext"
102+
@keyup.esc="hideActions"
103+
@keydown.tab="hideActions"
104+
@keyup.end="focusLast"
105+
@keyup.home="focusFirst"
106+
@keydown.home.prevent
107+
@keydown.end.prevent
108+
/>
109+
<media-browser-action-item-share
110+
v-if="shareable"
111+
ref="actionShare"
112+
:on-focused="focused"
113+
:main-action="openShareUrlModal"
114+
:closing-action="hideActions"
115+
@keydown.up.prevent
116+
@keydown.down.prevent
117+
@keyup.up="focusPrev"
118+
@keyup.down="focusNext"
119+
@keyup.esc="hideActions"
120+
@keydown.tab="hideActions"
121+
@keyup.end="focusLast"
122+
@keyup.home="focusFirst"
123+
@keydown.home.prevent
124+
@keydown.end.prevent
125+
/>
126+
<media-browser-action-item-delete
127+
v-if="canDelete"
128+
ref="actionDelete"
129+
:on-focused="focused"
130+
:main-action="openConfirmDeleteModal"
131+
:hide-actions="hideActions"
132+
@keydown.up.prevent
133+
@keydown.down.prevent
134+
@keyup.up="focusPrev"
135+
@keyup.down="focusNext"
136+
@keyup.esc="hideActions"
137+
@keydown.tab="hideActions"
138+
@keyup.end="focusLast"
139+
@keyup.home="focusFirst"
140+
@keydown.home.prevent
141+
@keydown.end.prevent
142+
/>
121143
</div>
122144
</div>
123145
</template>
@@ -170,6 +192,7 @@ export default {
170192
/* Hide actions dropdown */
171193
hideActions() {
172194
this.showActions = false;
195+
this.$parent.$parent.$data.actionsActive = false;
173196
},
174197
/* Preview an item */
175198
openPreview() {
@@ -200,19 +223,89 @@ export default {
200223
/* Open actions dropdown */
201224
openActions() {
202225
this.showActions = true;
226+
this.$parent.$parent.$data.actionsActive = true;
203227
const buttons = [...this.$el.parentElement.querySelectorAll('.media-browser-actions-list button')];
204228
if (buttons.length) {
229+
buttons.forEach((button, i) => {
230+
if (i === (0)) {
231+
button.tabIndex = 0;
232+
} else {
233+
button.tabIndex = -1;
234+
}
235+
});
205236
buttons[0].focus();
206237
}
207238
},
208239
/* Open actions dropdown and focus on last element */
209240
openLastActions() {
210241
this.showActions = true;
242+
this.$parent.$parent.$data.actionsActive = true;
211243
const buttons = [...this.$el.parentElement.querySelectorAll('.media-browser-actions-list button')];
212244
if (buttons.length) {
245+
buttons.forEach((button, i) => {
246+
if (i === (buttons.length)) {
247+
button.tabIndex = 0;
248+
} else {
249+
button.tabIndex = -1;
250+
}
251+
});
213252
this.$nextTick(() => buttons[buttons.length - 1].focus());
214253
}
215254
},
255+
/* Focus on the next item or go to the beginning again */
256+
focusNext(event) {
257+
const active = event.target;
258+
const buttons = [...active.parentElement.querySelectorAll('button')];
259+
const lastchild = buttons[buttons.length - 1];
260+
active.tabIndex = -1;
261+
if (active === lastchild) {
262+
buttons[0].focus();
263+
buttons[0].tabIndex = 0;
264+
} else {
265+
active.nextElementSibling.focus();
266+
active.nextElementSibling.tabIndex = 0;
267+
}
268+
},
269+
/* Focus on the previous item or go to the end again */
270+
focusPrev(event) {
271+
const active = event.target;
272+
const buttons = [...active.parentElement.querySelectorAll('button')];
273+
const firstchild = buttons[0];
274+
active.tabIndex = -1;
275+
if (active === firstchild) {
276+
buttons[buttons.length - 1].focus();
277+
buttons[buttons.length - 1].tabIndex = 0;
278+
} else {
279+
active.previousElementSibling.focus();
280+
active.previousElementSibling.tabIndex = 0;
281+
}
282+
},
283+
/* Focus on the first item */
284+
focusFirst(event) {
285+
const active = event.target;
286+
const buttons = [...active.parentElement.querySelectorAll('button')];
287+
buttons[0].focus();
288+
buttons.forEach((button, i) => {
289+
if (i === 0) {
290+
button.tabIndex = 0;
291+
} else {
292+
button.tabIndex = -1;
293+
}
294+
});
295+
},
296+
/* Focus on the last item */
297+
focusLast(event) {
298+
const active = event.target;
299+
const buttons = [...active.parentElement.querySelectorAll('button')];
300+
buttons[buttons.length - 1].focus();
301+
buttons.forEach((button, i) => {
302+
if (i === (buttons.length)) {
303+
button.tabIndex = 0;
304+
} else {
305+
button.tabIndex = -1;
306+
}
307+
});
308+
},
216309
editItem() {
217310
this.edit();
218311
},

administrator/components/com_media/resources/scripts/components/browser/actionItems/delete.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
<button
33
type="button"
44
class="action-delete"
5-
:aria-label="translate('COM_MEDIA_ACTION_DELETE')"
6-
:title="translate('COM_MEDIA_ACTION_DELETE')"
75
@keyup.enter="openConfirmDeleteModal()"
86
@keyup.space="openConfirmDeleteModal()"
97
@focus="focused(true)"
108
@blur="focused(false)"
119
@keyup.esc="hideActions()"
10+
@click.stop="openConfirmDeleteModal()"
1211
>
1312
<span
1413
class="image-browser-action icon-trash"
1514
aria-hidden="true"
16-
@click.stop="openConfirmDeleteModal()"
1715
/>
16+
<span class="action-text">
17+
{{ translate('COM_MEDIA_ACTION_DELETE') }}
18+
</span>
1819
</button>
1920
</template>
2021

0 commit comments

Comments
 (0)