Feature RTC Language Change Documentation Required NPM Resource Changed PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
30 May 2024

Summary of Changes

The PR add posibility to select directories usign the Media field.
This is helpfull when the site have multiple Media adapters.

Testing Instructions

Run npm install.

Create custom field Media,
Pick the directory in the "Directory" option.

Edit TinyMCE (plugin config) "Images Directory" (when "Images Drag and Drop" is On). And test TinyMCE drag and drop upload.

Actual result BEFORE applying this Pull Request

You able to pick only one of folder under /images

Expected result AFTER applying this Pull Request

You can pick any directory that available in the Media manager

Link to documentations

Please select:

avatar Fedik Fedik - open - 30 May 2024
avatar Fedik Fedik - change - 30 May 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 May 2024
Category JavaScript Administration com_media NPM Change Repository Layout Libraries Front End Plugins
avatar Fedik Fedik - change - 30 May 2024
The description was changed
avatar Fedik Fedik - edited - 30 May 2024
avatar Fedik Fedik - change - 30 May 2024
Labels Added: Feature NPM Resource Changed PR-5.2-dev
avatar Fedik Fedik - change - 30 May 2024
The description was changed
avatar Fedik Fedik - edited - 30 May 2024
avatar brianteeman
brianteeman - comment - 30 May 2024

Works fine for custom fields but what about in the media plugin? These are all subdirectories of /images

image

avatar dgrammatiko
dgrammatiko - comment - 30 May 2024

@Fedik you could probably patch also this event:


So selecting a folder on the left (disk/folder tree) could be also a valid way to select the folder

avatar Fedik
Fedik - comment - 30 May 2024

@brianteeman I forgot it exists, should be good now.
@dgrammatiko updated

avatar brianteeman
brianteeman - comment - 30 May 2024

Is it possible to use something other than "types" as I am sure people will confuse it with "type"

avatar dgrammatiko
dgrammatiko - comment - 30 May 2024

Is it possible to use something other than "types" as I am sure people will confuse it with "type"

That would be a b/c break so no

avatar Fedik
Fedik - comment - 30 May 2024

Nope, unfortunately. It is what we already use

$this->types = isset($this->element['types']) ? (string) $this->element['types'] : 'images';

For the Media field.

avatar brianteeman
brianteeman - comment - 30 May 2024

ok fair enough. I searched for types = and got no hits - didn't think about types =

;)

avatar Fedik Fedik - change - 30 May 2024
The description was changed
avatar Fedik Fedik - edited - 30 May 2024
avatar Fedik Fedik - change - 2 Jun 2024
Labels Added: Documentation Required
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jun 2024
Category JavaScript Administration com_media NPM Change Repository Layout Libraries Front End Plugins JavaScript Administration com_media NPM Change Language & Strings Repository Layout Libraries Front End Plugins
avatar Fedik Fedik - change - 2 Jun 2024
The description was changed
avatar Fedik Fedik - edited - 2 Jun 2024
avatar Fedik
Fedik - comment - 2 Jun 2024

I also updated TinyMCE upload directory for "drag and drop", to use this feature.

avatar Fedik Fedik - change - 2 Jun 2024
Labels Added: Language Change
avatar Fedik Fedik - change - 2 Jun 2024
The description was changed
avatar Fedik Fedik - edited - 2 Jun 2024
avatar laoneo
laoneo - comment - 5 Jun 2024

Nice work. I tested it with DPMedia and the FTP plugin, unfortunately when I select a folder from the FTP adapter, the field stays empty in the media custom field.

avatar dgrammatiko
dgrammatiko - comment - 5 Jun 2024

@laoneo is right, this approach will never work for anything else other than the local filesystem. Maybe having dolder/path#adapterName://folder could work, but would need patches all over I guess

avatar Fedik
Fedik - comment - 5 Jun 2024

Thanks for checking. I did not have a time to test with external adapters, and expected it works.
I will update later

avatar laoneo
laoneo - comment - 6 Jun 2024

There is a free version of DPMedia with the FTP adapter if you want to try it by yourself.

avatar Fedik
Fedik - comment - 6 Jun 2024

I have checked. The field "Content - DPMedia" override configuration form for the Media Custom field (with own field for it).
You need to disable this plugin then it will work.

After I disable that plugin it works for me
Screenshot 2024-06-06_19-04-16

avatar laoneo
laoneo - comment - 7 Jun 2024

I tested it, when it was disabled. The error I did, I didn't select the folder in the media manager, I just navigated to the folder I wanted to test and then hit the select button. Like in this screenshot:
image

avatar Fedik
Fedik - comment - 7 Jun 2024

I just navigated to the folder I wanted to test and then hit the select button

Hm, it also works for me.
You navigating with Tree select or Breadcrumbs? Breadcrumbs does not do anything, but Tree should work.

avatar laoneo
laoneo - comment - 7 Jun 2024

I clicked the folder inside the main area, where the folders are listed, not the tree or breadcrumbs.

avatar Fedik
Fedik - comment - 7 Jun 2024

I clicked the folder inside the main area, where the folders are listed, not the tree or breadcrumbs.

So you clicked it twice to open?
The media manager cannot handle it as "select".

There only one way to select something in media manager, is to tick the checkbox on the image/folder.
And one addittional way for folders is to click the folder in Tree view.

Yeah, well, it can be confusing.

avatar laoneo
laoneo - comment - 7 Jun 2024

I double clicked on the last folder inside the main area and then the select button. But I had to do it by being in the parent and then select the folder with the checkbox and not navigating into the folder and then click select.

avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2024
Category JavaScript Administration com_media NPM Change Repository Layout Libraries Front End Plugins Language & Strings Administration com_admin com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries Front End Plugins Unit Tests
avatar Fedik Fedik - change - 7 Jun 2024
Labels Added: Unit/System Tests
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2024
Category JavaScript Administration com_media NPM Change Repository Layout Libraries Front End Plugins Language & Strings com_admin SQL Installation Postgresql Unit Tests JavaScript Administration com_media NPM Change Language & Strings Repository Layout Libraries Front End Plugins
avatar Fedik Fedik - change - 7 Jun 2024
Labels Removed: Unit/System Tests
avatar Fedik
Fedik - comment - 7 Jun 2024

I have update PR, now the folder should be also selectable on "double click".

avatar laoneo laoneo - test_item - 22 Jul 2024 - Tested successfully
avatar laoneo
laoneo - comment - 22 Jul 2024

I have tested this item ✅ successfully on 3223f82

See my last comment


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43579.

avatar dgrammatiko dgrammatiko - test_item - 22 Jul 2024 - Tested successfully
avatar dgrammatiko dgrammatiko - test_item - 22 Jul 2024 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 22 Jul 2024

I have tested this item ✅ successfully on 3223f82


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43579.

avatar dgrammatiko
dgrammatiko - comment - 22 Jul 2024

I have tested this item ✅ successfully on 3223f82


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43579.

avatar Quy Quy - change - 22 Jul 2024
Status Pending Ready to Commit
avatar Quy
Quy - comment - 22 Jul 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43579.

avatar dgrammatiko
dgrammatiko - comment - 22 Jul 2024

Just a note for the person that would merge this PR: depending on the order of committing this PR and #43823 the one that would be second would have to update the extra event introduced in please merge first this PR and then #43823.

avatar Quy Quy - change - 23 Jul 2024
Labels Added: RTC
avatar Hackwar
Hackwar - comment - 23 Jul 2024

This feature is nice and I will merge it as soon as drone has passed. One thing which I find strange however is, that you can set it to a subfolder, but then you can still move up the folders and select a different folder. This is also present in the current implementation, but if I set it to folder X, I wouldn't expect to be able to upload in a parent folder of that.

avatar Hackwar Hackwar - change - 23 Jul 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-07-23 20:32:48
Closed_By Hackwar
avatar Hackwar Hackwar - close - 23 Jul 2024
avatar Hackwar Hackwar - merge - 23 Jul 2024
avatar Hackwar
Hackwar - comment - 23 Jul 2024

Thanks @Fedik for your contribution. :-)

avatar Fedik Fedik - change - 24 Jul 2024
The description was changed
avatar Fedik Fedik - edited - 24 Jul 2024

Add a Comment

Login with GitHub to post a comment