-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
TinyMCE drag and drop bug fixes #15057
TinyMCE drag and drop bug fixes #15057
Conversation
ok, the patch fix the bug with the editor toolbar tooltip rendered in wrong position after the first image upload. |
make @brianteeman happy :)
The last commit transforms the inout to a drop down of possible directories, as @brianteeman suggested in the issue. For the tooltip text please make another PR |
$options = array(); | ||
$root = JComponentHelper::getParams('com_media')->get('image_path'); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line :-)
*/ | ||
class JFormFieldUploaddirs extends JFormFieldList | ||
{ | ||
protected $type = 'uploaddirs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do comment missing
plugins/editors/tinymce/tinymce.php
Outdated
$scriptOptions['uploadUri'] = $uploadUrl; | ||
|
||
$externalPlugins = array( | ||
array('jdragdrop' => ($app->isClient('site') ? JUri::root(false) : str_replace('/administrator', JUri::root(false))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUri::root() should never contain administrator? :-)
Juri::root() in example.com/administrator returns example.com
plugins/editors/tinymce/tinymce.php
Outdated
@@ -573,7 +573,9 @@ public function onDisplay($name, $content, $width, $height, $col, $row, $buttons | |||
|
|||
if ($dragdrop && $user->authorise('core.create', 'com_media')) | |||
{ | |||
$plugins[] = 'jdragdrop'; | |||
$externalPlugins['jdragdrop'] = ($app->isClient('site') ? JUri::root(false) : | |||
str_replace('/administrator', '', JUri::root(false))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUri::root() should never contain administrator? :-)
Juri::root() in example.com/administrator returns example.com
I have tested this item 🔴 unsuccessfully on 330dcc0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15057. |
Sorry but I can't make a PR for the en language file.. my english is very bad :( This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15057. |
Please add a doc block for the new method to fix drone ;) |
@AlexRed thanks, that should be ok now |
no more dropdown ? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15057. |
sorry, dropdown ok but the image continue to go in a subfolder of Path to Files Folder in the Media: Options. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15057. |
@AlexRed are you on M$ win-dos machine? |
No, linux |
@AlexRed so can you post your settings, in tinymce and com_media, I can't really understand why your setup is misbehaving |
yes, I can. But the Joomla users when select the folder in the dropdown think the images go there... but no. The images go in a new subfolder with the same name if the user use the Path to Files Folder in the Media |
This folder that they will select is always a subfolder of their images directory, maybe a better tooltip there could be more helpful |
yes, also for me the tooltip text need to explain better |
use the esisting PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_DESC |
@brianteeman done |
I have not tested this item. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15057. |
@brianteeman was that what you wanted to select in the issue tracker? |
oops no |
I have tested this item ✅ successfully on 9e6415a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15057. |
I have tested this item ✅ successfully on 9e6415a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15057. |
RTC after two successful testes. |
Pull Request for Issue ##14906 .
Summary of Changes
Apart from fixing the bug in #14906 this PR also fixes another bug with the toolbar tooltip rendered in wrong position after the first image upload.
Also moves the plugin javascript code out of the tinyMCE/plugins directory (will make updates easier)
Testing Instructions
Edit the configuration and provide a custom path for the drag and drop upload, this setting is per tab option so make sure that you are using the right one!!!
Try to upload an image,
Check where the image is stored and also try to see if the tooltips in bold, italics etc is in the right position
Apply the patch and repeat
Expected result
Use the provided path
Actual result
Is not using the provided path
Documentation Changes Required
None, bug fix