$this)); ?>
-
- items[0]->checks[$name];
- if ($check === true) :
- $class = 'text-success icon-check';
- $button = 'btn-success';
- $text = Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');
- elseif ($check === false) :
- $class = 'text-danger icon-times';
- $button = 'btn-danger';
- $text = Text::_('COM_USERS_DEBUG_EXPLICIT_DENY');
- elseif ($check === null) :
- $class = 'text-danger icon-minus-circle';
- $button = 'btn-warning';
- $text = Text::_('COM_USERS_DEBUG_IMPLICIT_DENY');
+ items)) : ?>
+
+
+
+
+
+ actions as $action) :
+ $name = $action[0];
+ if (in_array($name, ['core.login.site', 'core.login.admin', 'core.login.offline', 'core.login.api', 'core.admin'])) :
+ $loginActions[] = $action;
else :
- $class = '';
- $button = '';
- $text = '';
+ $actions[] = $action;
endif;
- ?>
-
-
-
-
+ endforeach;
+ ?>
+
+ items[0]->checks[$name];
+ if ($check === true) :
+ $class = 'text-success icon-check';
+ $button = 'btn-success';
+ $text = Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');
+ elseif ($check === false) :
+ $class = 'text-danger icon-times';
+ $button = 'btn-danger';
+ $text = Text::_('COM_USERS_DEBUG_EXPLICIT_DENY');
+ elseif ($check === null) :
+ $class = 'text-danger icon-minus-circle';
+ $button = 'btn-warning';
+ $text = Text::_('COM_USERS_DEBUG_IMPLICIT_DENY');
+ endif;
+ ?>
+
+
+
+
+
+
-
-
-
-
- ,
- ,
-
-
-
-
- |
-
- |
-
-
- |
- $action) : ?>
-
-
- |
-
-
-
- |
-
-
- |
-
-
-
- items as $i => $item) :?>
-
- |
- escape(Text::_($item->title)); ?>
- |
-
- $item->level + 1)) . $this->escape($item->name); ?>
- |
-
- checks[$name];
- if ($check === true) :
- $class = 'text-success icon-check';
- $button = 'btn-success';
- $text = Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');
- elseif ($check === false) :
- $class = 'text-danger icon-times';
- $button = 'btn-danger';
- $text = Text::_('COM_USERS_DEBUG_EXPLICIT_DENY');
- elseif ($check === null) :
- $class = 'text-danger icon-minus-circle';
- $button = 'btn-warning';
- $text = Text::_('COM_USERS_DEBUG_IMPLICIT_DENY');
- else :
- $class = '';
- $button = '';
- $text = '';
- endif;
- ?>
-
-
-
- |
+
+
+ ,
+ ,
+
+
+
+
+ |
+
+ |
+
+
+ |
+ $action) : ?>
+
+
+ |
-
- lft; ?>
- - rgt; ?>
- |
-
- id; ?>
- |
+
+
+ |
+
+
+ |
-
-
-
+
+
+ items as $i => $item) :?>
+
+ |
+ escape(Text::_($item->title)); ?>
+ |
+
+ $item->level + 1)) . $this->escape($item->name); ?>
+ |
+
+ checks[$name];
+ if ($check === true) :
+ $class = 'text-success icon-check';
+ $button = 'btn-success';
+ $text = Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');
+ elseif ($check === false) :
+ $class = 'text-danger icon-times';
+ $button = 'btn-danger';
+ $text = Text::_('COM_USERS_DEBUG_EXPLICIT_DENY');
+ elseif ($check === null) :
+ $class = 'text-danger icon-minus-circle';
+ $button = 'btn-warning';
+ $text = Text::_('COM_USERS_DEBUG_IMPLICIT_DENY');
+ else :
+ $class = '';
+ $button = '';
+ $text = '';
+ endif;
+ ?>
+
+
+
+ |
+
+
+ lft; ?>
+ - rgt; ?>
+ |
+
+ id; ?>
+ |
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
- pagination->getListFooter(); ?>
+
+ pagination->getListFooter(); ?>
-
-
-
+
+
+
+
diff --git a/administrator/language/en-GB/com_contact.ini b/administrator/language/en-GB/com_contact.ini
index 7e1a0d50e87f7..012fc3b377294 100644
--- a/administrator/language/en-GB/com_contact.ini
+++ b/administrator/language/en-GB/com_contact.ini
@@ -20,7 +20,8 @@ COM_CONTACT_EMPTYSTATE_BUTTON_ADD="Add your first contact"
COM_CONTACT_EMPTYSTATE_CONTENT="Contacts can be as simple as a contact form or as complex as a staff directory. You can use this component to create and manage your contacts."
COM_CONTACT_EMPTYSTATE_TITLE="No Contacts have been created yet."
COM_CONTACT_ERROR_ALL_LANGUAGE_ASSOCIATED="A contact item set to All languages can't be associated. Associations have not been set."
-COM_CONTACT_ERROR_UNIQUE_ALIAS="Another Contact from this category has the same alias (remember it may be a trashed item)."
+COM_CONTACT_ERROR_UNIQUE_ALIAS="Another Contact in this category has the same alias."
+COM_CONTACT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Contact in this category has the same alias."
COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_LABEL="# Articles to List"
COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL="User Articles"
COM_CONTACT_FIELD_CAPTCHA_LABEL="Allow Captcha on Contact"
diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini
index c2deb46c0263c..21007f8db4d8e 100644
--- a/administrator/language/en-GB/com_content.ini
+++ b/administrator/language/en-GB/com_content.ini
@@ -44,6 +44,8 @@ COM_CONTENT_ERROR_CANNOT_ARCHIVE="One or more of the selected articles can't be
COM_CONTENT_ERROR_CANNOT_PUBLISH="One or more of the selected articles can't be set to published."
COM_CONTENT_ERROR_CANNOT_TRASH="One or more of the selected articles can't be set to trashed."
COM_CONTENT_ERROR_CANNOT_UNPUBLISH="One or more of the selected articles can't be set to unpublished."
+COM_CONTENT_ERROR_UNIQUE_ALIAS="Another Article in this category has the same alias."
+COM_CONTENT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Article in this category has the same alias."
COM_CONTENT_ERROR_UPDATE_STAGE="You cannot execute this transition and update the stage."
COM_CONTENT_FEATURED_ARTICLES="Featured Articles"
COM_CONTENT_FEATURED_CATEGORIES_LABEL="Select Categories"
diff --git a/administrator/language/en-GB/com_finder.ini b/administrator/language/en-GB/com_finder.ini
index 2251edd00a8a8..ce5e0df1d17af 100644
--- a/administrator/language/en-GB/com_finder.ini
+++ b/administrator/language/en-GB/com_finder.ini
@@ -75,6 +75,7 @@ COM_FINDER_FIELDSET_SEARCH_OPTIONS_LABEL="Smart Search"
COM_FINDER_FILTER_BRANCH_LABEL="Search by %s"
COM_FINDER_FILTER_EDIT_TOOLBAR_TITLE="Smart Search: Edit Filter"
COM_FINDER_FILTER_END_DATE_LABEL="End Date"
+COM_FINDER_FILTER_ERROR_UNIQUE_ALIAS="Another Filter has the same alias."
COM_FINDER_FILTER_FIELDSET_PARAMS="Filter Timeline"
COM_FINDER_FILTER_FORM_TITLE_EDIT="Edit Filter"
COM_FINDER_FILTER_FORM_TITLE_NEW="New Filter"
diff --git a/administrator/language/en-GB/com_media.ini b/administrator/language/en-GB/com_media.ini
index 0fd7852dc7cb9..e2c1877b9cbf2 100644
--- a/administrator/language/en-GB/com_media.ini
+++ b/administrator/language/en-GB/com_media.ini
@@ -4,12 +4,13 @@
; Note : All ini files need to be saved as UTF-8
COM_MEDIA="Media"
-COM_MEDIA_ACTION_DELETE="Delete item"
-COM_MEDIA_ACTION_DOWNLOAD="Download item"
-COM_MEDIA_ACTION_EDIT="Edit item"
-COM_MEDIA_ACTION_PREVIEW="Preview item"
-COM_MEDIA_ACTION_RENAME="Rename item"
-COM_MEDIA_ACTION_SHARE="Get a shareable link"
+COM_MEDIA_ACTIONS_TOOLBAR_LABEL="Item: %s"
+COM_MEDIA_ACTION_DELETE="Delete"
+COM_MEDIA_ACTION_DOWNLOAD="Download"
+COM_MEDIA_ACTION_EDIT="Edit"
+COM_MEDIA_ACTION_PREVIEW="Preview"
+COM_MEDIA_ACTION_RENAME="Rename"
+COM_MEDIA_ACTION_SHARE="Get Link"
COM_MEDIA_BREADCRUMB_LABEL="Breadcrumb"
COM_MEDIA_BROWSER_TABLE_CAPTION="Contents of Directory %s"
COM_MEDIA_CONFIGURATION="Media: Options"
@@ -69,6 +70,7 @@ COM_MEDIA_FOLDER="Folder"
COM_MEDIA_FOLDERS="Media Folders"
COM_MEDIA_FOLDER_NAME="Folder Name"
COM_MEDIA_INCREASE_GRID="Increase grid size"
+COM_MEDIA_MANAGE_ITEM="Manage item: %s"
COM_MEDIA_MEDIA_DATE_CREATED="Date Created"
COM_MEDIA_MEDIA_DATE_MODIFIED="Date Modified"
COM_MEDIA_MEDIA_DIMENSION="Dimensions"
@@ -78,6 +80,8 @@ COM_MEDIA_MEDIA_NAME="Name"
COM_MEDIA_MEDIA_SIZE="Size"
COM_MEDIA_MEDIA_TYPE="Type"
COM_MEDIA_NAME="Name"
+; The string COM_MEDIA_OPEN_ITEM_ACTIONS is deprecated and no longer in use as of __DEPLOY_VERSION__
+; Please use the string COM_MEDIA_MANAGE_ITEM (with the file name) instead.
COM_MEDIA_OPEN_ITEM_ACTIONS="Open item actions"
COM_MEDIA_PLEASE_SELECT_ITEM="Please select item."
COM_MEDIA_RENAME="Rename"
diff --git a/administrator/language/en-GB/com_newsfeeds.ini b/administrator/language/en-GB/com_newsfeeds.ini
index d5aaeb6fde7ec..029372e5987c7 100644
--- a/administrator/language/en-GB/com_newsfeeds.ini
+++ b/administrator/language/en-GB/com_newsfeeds.ini
@@ -17,7 +17,8 @@ COM_NEWSFEEDS_EMPTYSTATE_BUTTON_ADD="Add your first news feed"
COM_NEWSFEEDS_EMPTYSTATE_CONTENT="Adding News Feeds to your sites is a way of integrating content from other web sites."
COM_NEWSFEEDS_EMPTYSTATE_TITLE="No News Feeds have been created yet."
COM_NEWSFEEDS_ERROR_ALL_LANGUAGE_ASSOCIATED="A news feed item set to All languages can't be associated. Associations have not been set."
-COM_NEWSFEEDS_ERROR_UNIQUE_ALIAS="Another News feed from this category has the same alias (remember it may be a trashed item)."
+COM_NEWSFEEDS_ERROR_UNIQUE_ALIAS="Another News feed from this category has the same alias."
+COM_NEWSFEEDS_ERROR_UNIQUE_ALIAS_TRASHED="A trashed News feed in this category has the same alias."
COM_NEWSFEEDS_FIELD_CACHETIME_LABEL="Cache Time"
COM_NEWSFEEDS_FIELD_CHARACTER_COUNT_DESC="0 will show all the text."
COM_NEWSFEEDS_FIELD_CHARACTER_COUNT_LABEL="Characters Count"
diff --git a/administrator/language/en-GB/com_tags.ini b/administrator/language/en-GB/com_tags.ini
index 2524b3f0f196c..ca9196afc3948 100644
--- a/administrator/language/en-GB/com_tags.ini
+++ b/administrator/language/en-GB/com_tags.ini
@@ -37,7 +37,8 @@ COM_TAGS_COUNT_UNPUBLISHED_ITEMS="Unpublished items"
COM_TAGS_EMPTYSTATE_BUTTON_ADD="Add your first tag"
COM_TAGS_EMPTYSTATE_CONTENT="Tags in Joomla! provide a flexible way of organizing content. The same tag can be applied to many different content items across content types."
COM_TAGS_EMPTYSTATE_TITLE="No Tags have been created yet."
-COM_TAGS_ERROR_UNIQUE_ALIAS="Another Tag with the same parent tag has the same alias (remember it may be a trashed item)."
+COM_TAGS_ERROR_UNIQUE_ALIAS="Another Tag has the same alias."
+COM_TAGS_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Tag has the same alias."
COM_TAGS_EXCLUDE="Exclude"
COM_TAGS_FIELD_CONTENT_TYPE_LABEL="Content types"
COM_TAGS_FIELD_FULL_LABEL="Full Image"
@@ -98,7 +99,7 @@ COM_TAGS_N_ITEMS_UNPUBLISHED_1="Tag unpublished."
COM_TAGS_N_QUICKICON="Tags"
COM_TAGS_N_QUICKICON_0="Tags"
COM_TAGS_N_QUICKICON_1="Tag"
-COM_TAGS_N_QUICKICON_SRONLY="Tags: %d tags are published."
+COM_TAGS_N_QUICKICON_SRONLY="Tags: %s tags are published."
COM_TAGS_N_QUICKICON_SRONLY_0="Tags: No tag is published."
COM_TAGS_N_QUICKICON_SRONLY_1="Tags: One tag is published."
COM_TAGS_NONE="None"
diff --git a/administrator/language/en-GB/lib_joomla.ini b/administrator/language/en-GB/lib_joomla.ini
index 4c6f31ee5d5b0..acf419e7af347 100644
--- a/administrator/language/en-GB/lib_joomla.ini
+++ b/administrator/language/en-GB/lib_joomla.ini
@@ -111,7 +111,8 @@ JLIB_DATABASE_ERROR_ADAPTER_MYSQLI="The MySQL adapter 'mysqli' is not available.
JLIB_DATABASE_ERROR_ARTICLE_UNIQUE_ALIAS="Another article from this category has the same alias (remember it may be a trashed item)."
JLIB_DATABASE_ERROR_BIND_FAILED_INVALID_SOURCE_ARGUMENT="%s: :bind failed. Invalid source argument."
JLIB_DATABASE_ERROR_CATEGORY_REQUIRED="Category is required."
-JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS="Another category with the same parent category has the same alias (remember it may be a trashed item)."
+JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS="Another category with the same parent category has the same alias."
+JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS_TRASHED="A trashed category with the same parent category has the same alias."
JLIB_DATABASE_ERROR_CHECK_FAILED="%s: :check Failed - %s"
JLIB_DATABASE_ERROR_CHECKIN_FAILED="%s: :check-in failed - %s"
JLIB_DATABASE_ERROR_CHECKOUT_FAILED="%s: :check-out failed - %s"
@@ -149,8 +150,9 @@ JLIB_DATABASE_ERROR_MENU_HOME_NOT_COMPONENT="The home menu item must be a compon
JLIB_DATABASE_ERROR_MENU_HOME_NOT_UNIQUE_IN_MENU="A menu should have only one Default home."
JLIB_DATABASE_ERROR_MENU_ROOT_ALIAS_COMPONENT="A first level menu item alias can't be 'component'."
JLIB_DATABASE_ERROR_MENU_ROOT_ALIAS_FOLDER="A first level menu item alias can't be '%s' because '%s' is a sub-folder of your Joomla installation folder."
-JLIB_DATABASE_ERROR_MENU_UNIQUE_ALIAS="The alias
%1$s is already being used by
%2$s menu item in the
%3$s menu (remember it may be a trashed item)."
+JLIB_DATABASE_ERROR_MENU_UNIQUE_ALIAS="The alias
%1$s is already being used by the
%2$s menu item in the
%3$s menu."
JLIB_DATABASE_ERROR_MENU_UNIQUE_ALIAS_ROOT="Another menu item has the same alias in Root (remember it may be a trashed item). Root is the top level parent."
+JLIB_DATABASE_ERROR_MENU_UNIQUE_ALIAS_TRASHED="The alias
%1$s is already being used by the trashed
%2$s menu item in the
%3$s menu."
JLIB_DATABASE_ERROR_MENU_UNPUBLISH_DEFAULT_HOME="Can't unpublish default home."
JLIB_DATABASE_ERROR_MENUTYPE="Some menu items or some menu modules related to this menutype are checked out by another user or the default menu item is in this menu."
JLIB_DATABASE_ERROR_MENUTYPE_CHECKOUT="The user checking out does not match the user who checked out this menu and/or its linked menu module."
diff --git a/build/media_source/com_media/scss/_variables.scss b/build/media_source/com_media/scss/_variables.scss
index 561f325cf51ca..d0014a9c249f2 100644
--- a/build/media_source/com_media/scss/_variables.scss
+++ b/build/media_source/com_media/scss/_variables.scss
@@ -44,10 +44,10 @@ $grid-item-icon-color-hover: rgba(0,0,0,.8);
$grid-item-icon-bg-color-hover: #fff;
$grid-item-icon-warning-icon-bg: #d9534f;
$grid-item-no-preview-bg: #f5f5f5;
-$grid-item-width-sm: 12.5%;
-$grid-item-width-md: 16.666%;
-$grid-item-width-lg: 25%;
-$grid-item-width-xl: 50%;
+$grid-item-width-sm: 13%;
+$grid-item-width-md: 18%;
+$grid-item-width-lg: 26%;
+$grid-item-width-xl: 40%;
// Media Browser Table
$table-item-height: 30px;
diff --git a/build/media_source/com_media/scss/components/_media-browser.scss b/build/media_source/com_media/scss/components/_media-browser.scss
index b6bcfa75231d0..25577a3f3a8fd 100644
--- a/build/media_source/com_media/scss/components/_media-browser.scss
+++ b/build/media_source/com_media/scss/components/_media-browser.scss
@@ -8,32 +8,30 @@
// Grid View
.media-browser-grid {
- padding: $grid-outside-padding 0 $grid-outside-padding $grid-outside-padding;
+ padding: $grid-outside-padding;
}
.media-browser-items {
- display: flex;
- flex-wrap: wrap;
+ display: grid;
+ gap: $grid-gutter-width;
+ &.media-browser-items-sm {
+ grid-template-columns: repeat(auto-fill, minmax($grid-item-width-sm, 1fr));
+ }
+ &.media-browser-items-md {
+ grid-template-columns: repeat(auto-fill, minmax($grid-item-width-md, 1fr));
+ }
+ &.media-browser-items-lg {
+ grid-template-columns: repeat(auto-fill, minmax($grid-item-width-lg, 1fr));
+ }
+ &.media-browser-items-xl {
+ grid-template-columns: repeat(auto-fill, minmax($grid-item-width-xl, 1fr));
+ }
}
.media-browser-item {
position: relative;
- margin-right: $grid-gutter-width;
- margin-bottom: $grid-gutter-width;
cursor: pointer;
user-select: none;
- .media-browser-items-sm & {
- width: calc(#{$grid-item-width-sm} - #{$grid-gutter-width});
- }
- .media-browser-items-md & {
- width: calc(#{$grid-item-width-md} - #{$grid-gutter-width});
- }
- .media-browser-items-lg & {
- width: calc(#{$grid-item-width-lg} - #{$grid-gutter-width});
- }
- .media-browser-items-xl & {
- width: calc(#{$grid-item-width-xl} - #{$grid-gutter-width});
- }
}
.media-browser-item-preview {
@@ -125,27 +123,48 @@
}
}
&.active {
+ top: 0;
+ z-index: 1;
+ width: max-content;
+ min-width: 100%;
+ background-color: var(--template-bg-dark-3);
+ border: 1px solid hsl(var(--hue), 35%, 95%);
+ border-radius: .25rem;
+ box-shadow: 0 2px 10px -8px var(--template-bg-dark-50);
> button {
display: none;
}
- }
- ul {
- padding: 0;
- margin: 0;
- list-style: none;
- column-gap: 5px;
- columns: 2;
+ @media (max-width: 576px) {
+ .actions & {
+ height: 100%;
+ overflow: visible;
+ .media-browser-actions-list {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ background-color: var(--template-bg-dark-3);
+ }
+ }
+
+ }
}
}
.media-browser-actions-list {
display: flex;
flex-direction: column;
+ margin-top: 2px;
+ .media-browser-actions-item-name {
+ padding: 2px;
+ margin-block-end: 3px;
+ }
button, a {
position: relative;
top: 0;
- padding: 0;
- margin-bottom: 3px;
+ padding: 2px;
+ margin-block-end: 3px;
visibility: hidden;
background-color: transparent;
border: 0;
@@ -154,20 +173,18 @@
transition-delay: 0s;
.media-browser-actions.active & {
top: 0;
+ display: flex;
+ align-items: center;
+ width: 100%;
visibility: visible;
opacity: 1;
transition-duration: .2s;
- &:first-of-type {
- transition-delay: .1s;
- }
- &:nth-of-type(2) {
- transition-delay: .15s;
- }
- &:nth-of-type(3) {
- transition-delay: .2s;
- }
- &:nth-of-type(4) {
- transition-delay: .25s;
+ &:hover, &:focus {
+ background-color: var(--template-bg-dark-10);
+ &.action-delete {
+ color: $grid-item-icon-color;
+ background-color: $grid-item-icon-warning-icon-bg;
+ }
}
}
}
@@ -176,13 +193,14 @@
.image-browser-action {
width: calc(#{$grid-item-icon-size} * 1.55);
height: calc(#{$grid-item-icon-size} * 1.55);
- margin-right: 4px;
- margin-left: 4px;
+ margin-inline: 4px;
color: $grid-item-icon-color;
text-align: center;
cursor: pointer;
background-color: $grid-item-icon-bg-color;
border-radius: $grid-item-border-radius;
+ flex-shrink: 0;
+ transition-duration: .2s;
.action-delete & {
background-color: $grid-item-icon-warning-icon-bg;
}
@@ -190,11 +208,18 @@
font-size: $grid-item-icon-size;
line-height: calc(#{$grid-item-icon-size} * 1.55);
}
- &:hover {
+ &:hover, &:focus,
+ button:hover &,
+ button:focus & {
color: $grid-item-icon-color-hover;
background-color: $grid-item-icon-bg-color-hover;
}
}
+.action-text {
+ flex-shrink: 0;
+ text-align: start;
+ padding-inline: 5px;
+}
.image-background {
background-color: #fff;
@@ -205,8 +230,8 @@
.image-cropped {
aspect-ratio: 1/1;
- max-width: 100%;
- height: auto;
+ width: 100%;
+ height: 100%;
object-fit: contain;
border-radius: $grid-item-border-radius;
}
diff --git a/build/media_source/plg_editors_tinymce/js/plugins/dragdrop/plugin.es5.js b/build/media_source/plg_editors_tinymce/js/plugins/dragdrop/plugin.es5.js
index f5d65d5be3238..5104b965c74e6 100644
--- a/build/media_source/plg_editors_tinymce/js/plugins/dragdrop/plugin.es5.js
+++ b/build/media_source/plg_editors_tinymce/js/plugins/dragdrop/plugin.es5.js
@@ -3,21 +3,31 @@
/* eslint-disable no-undef */
tinymce.PluginManager.add('jdragndrop', function (editor) {
- var responseData; // Reset the drop area border
-
- tinyMCE.DOM.bind(document, 'dragleave', function (e) {
+ // Reset the drop area border
+ var dragleaveCallback = function (e) {
+ if (!e.dataTransfer.types.includes('Files')) return;
e.stopPropagation();
e.preventDefault();
- editor.contentAreaContainer.style.borderWidth = '1px 0 0';
+ editor.contentAreaContainer.style.borderWidth = '0';
return false;
- }); // Fix for Chrome
+ }
+ tinyMCE.DOM.bind(document, 'dragleave', dragleaveCallback);
+ // Remove listener when editor are removed
+ editor.on('remove', function () {
+ tinyMCE.DOM.unbind(document, 'dragleave', dragleaveCallback);
+ });
+
+ // Fix for Chrome
editor.on('dragenter', function (e) {
+ if (!e.dataTransfer.types.includes('Files')) return;
e.stopPropagation();
return false;
- }); // Notify user when file is over the drop area
+ });
+ // Notify user when file is over the drop area
editor.on('dragover', function (e) {
+ if (!e.dataTransfer.types.includes('Files')) return;
e.preventDefault();
editor.contentAreaContainer.style.borderStyle = 'dashed';
editor.contentAreaContainer.style.borderWidth = '5px';
@@ -46,7 +56,7 @@
}
if (response.data && response.data.path) {
- responseData = response.data;
+ var responseData = response.data;
var urlPath; // For local adapters use relative paths
var _Joomla$getOptions = Joomla.getOptions('system.paths'),
@@ -119,47 +129,39 @@
function readFile(file) {
// Create a new file reader instance
- var reader = new FileReader(); // Add the on load callback
+ var reader = new FileReader();
+ // Add the on load callback
reader.onload = function (progressEvent) {
var result = progressEvent.target.result;
var splitIndex = result.indexOf('base64') + 7;
- var content = result.slice(splitIndex, result.length); // Upload the file
+ var content = result.slice(splitIndex, result.length);
+ // Upload the file
uploadFile(file.name, content);
};
reader.readAsDataURL(file);
- } // Listeners for drag and drop
-
+ }
- if (typeof FormData !== 'undefined') {
- // Logic for the dropped file
- editor.on('drop', function (e) {
- e.preventDefault(); // We override only for files
+ // Logic for the dropped file
+ editor.on('drop', function (e) {
+ if (!e.dataTransfer.types.includes('Files')) return;
+ e.preventDefault();
- if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length > 0) {
- var files = [].slice.call(e.dataTransfer.files);
- files.forEach(function (file) {
- // Only images allowed
- if (file.name.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)) {
- // Upload the file(s)
- readFile(file);
- }
- });
- }
+ // Read and upload files
+ if (e.dataTransfer.files.length > 0) {
+ var files = [].slice.call(e.dataTransfer.files);
+ files.forEach(function (file) {
+ // Only images allowed
+ if (file.name.toLowerCase().match(/\.(jpg|jpeg|png|gif|webp)$/)) {
+ // Upload the file(s)
+ readFile(file);
+ }
+ });
+ }
- editor.contentAreaContainer.style.borderWidth = '1px 0 0';
- });
- } else {
- Joomla.renderMessages({
- error: [Joomla.Text._('PLG_TINY_ERR_UNSUPPORTEDBROWSER')]
- });
- editor.on('drop', function (e) {
- e.preventDefault();
- return false;
- });
- }
+ editor.contentAreaContainer.style.borderWidth = '0';
+ });
});
-
}());
diff --git a/build/media_source/system/js/draggable.es6.js b/build/media_source/system/js/draggable.es6.js
index 8d8a17cf954e0..ff4d451510557 100644
--- a/build/media_source/system/js/draggable.es6.js
+++ b/build/media_source/system/js/draggable.es6.js
@@ -54,19 +54,17 @@ if (container) {
// Element is moved down
if (dragIndex < dropIndex) {
- rows[dropIndex].setAttribute('value', rows[dropIndex - 1].value);
+ rows[dropIndex].value = rows[dropIndex - 1].value;
for (i = dragIndex; i < dropIndex; i += 1) {
if (direction === 'asc') {
- rows[i].setAttribute('value', parseInt(rows[i].value, 10) - 1);
+ rows[i].value = parseInt(rows[i].value, 10) - 1;
} else {
- rows[i].setAttribute('value', parseInt(rows[i].value, 10) + 1);
+ rows[i].value = parseInt(rows[i].value, 10) + 1;
}
}
} else {
// Element is moved up
-
- rows[dropIndex].setAttribute('value', rows[dropIndex + 1].value);
rows[dropIndex].value = rows[dropIndex + 1].value;
for (i = dropIndex + 1; i <= dragIndex; i += 1) {
diff --git a/build/media_source/templates/administrator/atum/scss/blocks/_form.scss b/build/media_source/templates/administrator/atum/scss/blocks/_form.scss
index 2c9a947a16cec..6b20321f9a2b4 100644
--- a/build/media_source/templates/administrator/atum/scss/blocks/_form.scss
+++ b/build/media_source/templates/administrator/atum/scss/blocks/_form.scss
@@ -10,6 +10,11 @@
border-color: $focuscolor;
box-shadow: $focusshadow;
}
+
+ &::placeholder {
+ font-size: .8rem;
+ font-style: italic;
+ }
}
.control-group {
diff --git a/language/en-GB/com_media.ini b/language/en-GB/com_media.ini
index 8de4eb7b7f388..72c411b7fd7f6 100644
--- a/language/en-GB/com_media.ini
+++ b/language/en-GB/com_media.ini
@@ -4,12 +4,13 @@
; Note : All ini files need to be saved as UTF-8
COM_MEDIA="Media"
-COM_MEDIA_ACTION_DELETE="Delete item"
-COM_MEDIA_ACTION_DOWNLOAD="Download item"
-COM_MEDIA_ACTION_EDIT="Edit item"
-COM_MEDIA_ACTION_PREVIEW="Preview item"
-COM_MEDIA_ACTION_RENAME="Rename item"
-COM_MEDIA_ACTION_SHARE="Get a shareable link"
+COM_MEDIA_ACTIONS_TOOLBAR_LABEL="Item: %s"
+COM_MEDIA_ACTION_DELETE="Delete"
+COM_MEDIA_ACTION_DOWNLOAD="Download"
+COM_MEDIA_ACTION_EDIT="Edit"
+COM_MEDIA_ACTION_PREVIEW="Preview"
+COM_MEDIA_ACTION_RENAME="Rename"
+COM_MEDIA_ACTION_SHARE="Get Link"
COM_MEDIA_ALIGN="Image Float"
COM_MEDIA_ALIGN_DESC="This will apply the classes 'float-start', 'pull-center' or 'float-end' to the '
' or '
' element."
COM_MEDIA_BREADCRUMB_LABEL="Breadcrumb"
@@ -78,6 +79,7 @@ COM_MEDIA_IMAGE_URL="Image URL"
COM_MEDIA_INCREASE_GRID="Increase grid size"
COM_MEDIA_INSERT="Insert"
COM_MEDIA_INSERT_IMAGE="Insert Image"
+COM_MEDIA_MANAGE_ITEM="Manage item: %s"
COM_MEDIA_MAXIMUM_SIZE="Maximum Size"
COM_MEDIA_MEDIA="Media"
COM_MEDIA_MEDIA_DATE_CREATED="Date created"
@@ -91,6 +93,8 @@ COM_MEDIA_MEDIA_TYPE="Type"
COM_MEDIA_NAME="Image Name"
COM_MEDIA_NO_IMAGES_FOUND="No Images Found"
COM_MEDIA_NOT_SET="Not Set"
+; The string COM_MEDIA_OPEN_ITEM_ACTIONS is deprecated and no longer in use as of __DEPLOY_VERSION__
+; Please use the string COM_MEDIA_MANAGE_ITEM (with the file name) instead.
COM_MEDIA_OPEN_ITEM_ACTIONS="Open item actions"
COM_MEDIA_OVERALL_PROGRESS="Overall Progress"
COM_MEDIA_PIXEL_DIMENSIONS="Pixel Dimensions (w x h)"
diff --git a/libraries/namespacemap.php b/libraries/namespacemap.php
index c47fcdb969484..2123fc563e082 100644
--- a/libraries/namespacemap.php
+++ b/libraries/namespacemap.php
@@ -228,7 +228,7 @@ private function getNamespaces(string $type): array
}
// Load the manifest file
- $xml = simplexml_load_file($file);
+ $xml = simplexml_load_file($file, 'SimpleXMLElement', LIBXML_NOERROR);
// When invalid, ignore
if (!$xml) {
diff --git a/libraries/src/Document/HtmlDocument.php b/libraries/src/Document/HtmlDocument.php
index f4bf65ae23dd7..ee4c33e9267c3 100644
--- a/libraries/src/Document/HtmlDocument.php
+++ b/libraries/src/Document/HtmlDocument.php
@@ -542,7 +542,7 @@ public function getBuffer($type = null, $name = null, $attribs = array())
]
)
);
- $cbuffer = $cache->get('cbuffer_' . $type);
+ $cbuffer = $cache->get('cbuffer_' . $type) ?: [];
if (isset($cbuffer[$hash])) {
return Cache::getWorkarounds($cbuffer[$hash], array('mergehead' => 1));
diff --git a/libraries/src/MVC/Model/FormModel.php b/libraries/src/MVC/Model/FormModel.php
index e9a14c3ce47ee..ffb80a6c3e13a 100644
--- a/libraries/src/MVC/Model/FormModel.php
+++ b/libraries/src/MVC/Model/FormModel.php
@@ -150,7 +150,13 @@ public function checkout($pk = null)
return true;
}
- $user = $this->getCurrentUser();
+ $user = $this->getCurrentUser();
+
+ // When the user is a guest, don't do a checkout
+ if (!$user->id) {
+ return false;
+ }
+
$checkedOutField = $table->getColumnAlias('checked_out');
// Check if this is the user having previously checked out the row.
diff --git a/libraries/src/Table/Category.php b/libraries/src/Table/Category.php
index 3c97183efa10c..b207680887c29 100644
--- a/libraries/src/Table/Category.php
+++ b/libraries/src/Table/Category.php
@@ -257,8 +257,13 @@ public function store($updateNulls = true)
$table->load(array('alias' => $this->alias, 'parent_id' => (int) $this->parent_id, 'extension' => $this->extension))
&& ($table->id != $this->id || $this->id == 0)
) {
+ // Is the existing category trashed?
$this->setError(Text::_('JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS'));
+ if ($table->published === -2) {
+ $this->setError(Text::_('JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS_TRASHED'));
+ }
+
return false;
}
diff --git a/libraries/src/Table/Content.php b/libraries/src/Table/Content.php
index 9d9f6c71b9076..8af5739afe6d7 100644
--- a/libraries/src/Table/Content.php
+++ b/libraries/src/Table/Content.php
@@ -346,7 +346,12 @@ public function store($updateNulls = true)
$table = Table::getInstance('Content', 'JTable', array('dbo' => $this->getDbo()));
if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0)) {
- $this->setError(Text::_('JLIB_DATABASE_ERROR_ARTICLE_UNIQUE_ALIAS'));
+ // Is the existing article trashed?
+ $this->setError(Text::_('COM_CONTENT_ERROR_UNIQUE_ALIAS'));
+
+ if ($table->published === -2) {
+ $this->setError(Text::_('COM_CONTENT_ERROR_UNIQUE_ALIAS_TRASHED'));
+ }
return false;
}
diff --git a/libraries/src/Table/Menu.php b/libraries/src/Table/Menu.php
index 2c2d69aa847bf..bb0f45a77fa0c 100644
--- a/libraries/src/Table/Menu.php
+++ b/libraries/src/Table/Menu.php
@@ -14,6 +14,7 @@
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\Router\Route;
use Joomla\Database\DatabaseDriver;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
@@ -241,7 +242,14 @@ public function store($updateNulls = true)
if ($error) {
$menuTypeTable = Table::getInstance('MenuType', 'JTable', array('dbo' => $db));
$menuTypeTable->load(array('menutype' => $table->menutype));
- $this->setError(Text::sprintf('JLIB_DATABASE_ERROR_MENU_UNIQUE_ALIAS', $this->alias, $table->title, $menuTypeTable->title));
+ $url = Route::_('index.php?option=com_menus&task=item.edit&id=' . (int) $table->id);
+
+ // Is the existing menu item trashed?
+ $this->setError(Text::sprintf('JLIB_DATABASE_ERROR_MENU_UNIQUE_ALIAS', $this->alias, $table->title, $menuTypeTable->title, $url));
+
+ if ($table->published === -2) {
+ $this->setError(Text::sprintf('JLIB_DATABASE_ERROR_MENU_UNIQUE_ALIAS_TRASHED', $this->alias, $table->title, $menuTypeTable->title, $url));
+ }
return false;
}
diff --git a/tests/Unit/Libraries/Cms/MVC/Model/FormModelTest.php b/tests/Unit/Libraries/Cms/MVC/Model/FormModelTest.php
index b49f143e7b54c..ccc582c4a26b4 100644
--- a/tests/Unit/Libraries/Cms/MVC/Model/FormModelTest.php
+++ b/tests/Unit/Libraries/Cms/MVC/Model/FormModelTest.php
@@ -244,7 +244,7 @@ public function getForm($data = array(), $loadData = true)
*
* @since 4.2.0
*/
- public function testSucessfullCheckout()
+ public function testSuccessfulCheckout()
{
$table = $this->createStub(Table::class);
$table->checked_out = 0;
@@ -263,7 +263,11 @@ public function getForm($data = array(), $loadData = true)
return null;
}
};
- $model->setCurrentUser(new User());
+
+ // Must be a valid user
+ $user = new User();
+ $user->id = 1;
+ $model->setCurrentUser($user);
$this->assertTrue($model->checkout(1));
}
@@ -275,7 +279,7 @@ public function getForm($data = array(), $loadData = true)
*
* @since 4.2.0
*/
- public function testSucessfullCheckoutWithEmptyRecord()
+ public function testSuccessfulCheckoutWithEmptyRecord()
{
$model = new class (['dbo' => $this->createStub(DatabaseInterface::class)], $this->createStub(MVCFactoryInterface::class)) extends FormModel
{
@@ -307,6 +311,41 @@ public function testFailedCheckout()
$mvcFactory = $this->createStub(MVCFactoryInterface::class);
$mvcFactory->method('createTable')->willReturn($table);
+ $model = new class (['dbo' => $this->createStub(DatabaseInterface::class)], $mvcFactory) extends FormModel
+ {
+ public function getForm($data = array(), $loadData = true)
+ {
+ return null;
+ }
+ };
+
+ // Must be a valid user
+ $user = new User();
+ $user->id = 1;
+ $model->setCurrentUser($user);
+
+ $this->assertFalse($model->checkout(1));
+ }
+
+ /**
+ * @testdox can't checkout a record when the current user is a guest
+ *
+ * @return void
+ *
+ * @since 4.2.0
+ */
+ public function testFailedCheckoutAsGuest()
+ {
+ $table = $this->createStub(Table::class);
+ $table->checked_out = 0;
+ $table->method('load')->willReturn(true);
+ $table->method('hasField')->willReturn(true);
+ $table->method('checkIn')->willReturn(false);
+ $table->method('getColumnAlias')->willReturn('checked_out');
+
+ $mvcFactory = $this->createStub(MVCFactoryInterface::class);
+ $mvcFactory->method('createTable')->willReturn($table);
+
$model = new class (['dbo' => $this->createStub(DatabaseInterface::class)], $mvcFactory) extends FormModel
{
public function getForm($data = array(), $loadData = true)