Permalink
Browse files

Merge pull request #1151 from silverstripe-rebelalliance/bug/image_re…

…edit_attr

FIX Assiging width to caption instead of container
  • Loading branch information...
2 parents dc75d9a + aa3eb98 commit 6a1fe051912b7c342e92619be74a4e0fd5107a15 @halkyon halkyon committed Jan 31, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 javascript/HtmlEditorField.js
@@ -1085,13 +1085,13 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
container = $('<div></div>');
}
- container.attr('class', 'captionImage '+attrs['class']);
+ container.attr('class', 'captionImage '+attrs['class']).css('width', attrs.width);
if (!caption.length) {
caption = $('<p class="caption"></p>').appendTo(container);
}
- caption.attr('class', 'caption '+attrs['class']).css('width', attrs.width).text(extraData.CaptionText);
+ caption.attr('class', 'caption '+attrs['class']).text(extraData.CaptionText);
}
// Otherwise forget they exist
else {

0 comments on commit 6a1fe05

Please sign in to comment.