issue 978: Fixed a bug for resizing an image component

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9948 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-12-13 09:38:30 +00:00
parent 7ebe2051a4
commit 540cd6fd37
5 changed files with 104 additions and 92 deletions

View file

@ -86,7 +86,6 @@
else if($form.find('#align_middle').attr('checked') == true) align = 'middle';
else if($form.find('#align_right').attr('checked') == true) align = 'right';
var width = $form.find('#width').val();
var height = $form.find('#height').val();
@ -126,13 +125,18 @@
$component.find('img').attr(img_attrs);
$component.find('img').css(img_style);
text = $component.html();
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);
try {
var prevNode = opener.editorPrevNode;
prevNode.parentNode.insertBefore($component.find('img').get(0), prevNode);
prevNode.parentNode.removeChild(prevNode);
}catch(e){
try {
text = $component.html();
opener.editorReplaceHTML(iframe_obj, text);
} catch(ee) { }
};
opener.editorFocus(opener.editorPrevSrl);
window.close();
@ -183,4 +187,4 @@
});
}) (jQuery);
}) (jQuery);