User tests: Successful: Unsuccessful:
The container of caption should be inside the parent block and not before
Please don't open a new PR for that. You can edit the file in the same branch as this PR is and it will automatically be added to this PR. Use this link to make the change:
https://github.com/colivier/joomla-cms/edit/patch-1/media/system/js/caption.js
Labels |
Added:
?
|
@colivier Thanks!
Do you know what the difference is to #2639?
And I think it does reference to this tracker item: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=32458
Sorry, I had not seen this first solution, next time I'll be more careful.
It is two ways to do the same thing.
First method :
1. $el.before($container);
2. $container.append($el);
This method appends a container before the image (line 1) and moves the image into the container (line 2).
Second method :
1. $el.parent().html($container);
2. $container.append($el);
This method builds a new content of the image's parent. It inserts into the parent a container (line 1) and appends the image into the container (line 2).
For my part, i prefer the first method (not mine) because in the future if there is html code before or after the image, this code will be preserved.
I hope my explications are clear.
I propose to close my PR.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2013-12-04 16:20:04 |
Sounds like a duplicate of #2639, alltought a little different.
Can you make the change also in the compressed version so it can be tested easy?