Move editor plugin buttons modals to Bootstrap#5652
Move editor plugin buttons modals to Bootstrap#5652dgrammatiko wants to merge 6 commits intojoomla:stagingfrom dgrammatiko:_plugins_buttons_bs_modal
Conversation
|
I had in mind a different way to override the default modal with a different type. The thing is, I guess you're trying to have it such that both kinds of modals are available. I suppose I don't really agree with that idea. If you want to use bootstrap modals (good!) then why not replace |
|
@okonomiyaki3000 I can understand the way you meant this code to be used, totally replace the modal, and of course is a good approach. The point in this particular case, and I guess to some other places in core, is that you might end up having the core with all modals using bootstrap but some old 3pd component will use the mootools modal.
Of course I might be very wrong with my assumptions here and there might be a way easier solution. But then again thats the reason why I raise this concern... |
|
This is for 3.5!!! |
layouts/joomla/editors/buttons.php
Outdated
There was a problem hiding this comment.
@wilsonge Will the new layouts renderer have some problems with this code above?
There was a problem hiding this comment.
Umm what are you trying to do? If it's create template override paths for the JLayouts then we'll be doing that in JPlugin (unsure as exact paths but using the add include path(s) https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/layout/file.php#L159-L195 functions)
There was a problem hiding this comment.
The problem is that these buttons have some js and some code for closing the modals. Right now only few params are passed to layout and then the button gets rendered. If we are about to eliminate mootools we need to set the correct javascript (modal close is the problem) in the layout. This code is a simple fall back for 3rd party plugins to keep working
|
Needs also #5871 |
|
Patch breaks ability to insert image. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5652. |
|
@phproberto if you have some spare time can you review this one? Reminder it needs #5871 as well (and if you also apply #5654 you 'll drop mootools completely in front end) |
This is a redone for #4664 that uses the jModalClose function introduced #3918 from @okonomiyaki3000
What is changed?
Well this PR leaves the current layouts of the editor plugin button untouched in the root folder of Joomla (this is done for B/C) but introduces the usage of bootstrap for Isis template.
The actual rendering of the buttons:
There are two questions here:
@wilsonge Shall I copy the button layout into protostar as well?
@okonomiyaki3000 I made some changes in behavior.php regarding jModalClose (due to the way bootstrap script is working):
Is that ok? Especially this part:
window.eval(fnCode);